Rev 4 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4 | Rev 16 | ||
---|---|---|---|
Line 61... | Line 61... | ||
61 | procedure SetRight(Value: integer); |
61 | procedure SetRight(Value: integer); |
62 | procedure SetTop(Value: integer); |
62 | procedure SetTop(Value: integer); |
63 | procedure SetBottom(Value: integer); |
63 | procedure SetBottom(Value: integer); |
64 | protected |
64 | protected |
65 | public |
65 | public |
66 | procedure Assign(Value: TScreenRect); |
66 | procedure Assign(Value: TScreenRect); reintroduce; |
67 | published |
67 | published |
68 | property Left: integer read FLeft write SetLeft; |
68 | property Left: integer read FLeft write SetLeft; |
69 | property Right: integer read FRight write SetRight; |
69 | property Right: integer read FRight write SetRight; |
70 | property Top: integer read FTop write SetTop; |
70 | property Top: integer read FTop write SetTop; |
71 | property Bottom: integer read FBottom write SetBottom; |
71 | property Bottom: integer read FBottom write SetBottom; |
Line 252... | Line 252... | ||
252 | end; |
252 | end; |
253 | end; |
253 | end; |
254 | 254 | ||
255 | procedure TSXMovie.CreateMediaStream; |
255 | procedure TSXMovie.CreateMediaStream; |
256 | var |
256 | var |
257 | wPath:{$IFDEF UNICODE}array of Char{$ELSE}array[0..MAX_PATH] of WChar{$ELSE}{$ENDIF}; |
257 | wPath:{$IFDEF UNICODE}string{$ELSE}array[0..MAX_PATH] of WChar{$ENDIF}; |
258 | AMStream:IAMMultiMediaStream; |
258 | AMStream:IAMMultiMediaStream; |
259 | Media:IMediaStream; |
259 | Media:IMediaStream; |
260 | begin |
260 | begin |
261 | Media := nil; |
261 | Media := nil; |
262 | AMStream := nil; |
262 | AMStream := nil; |
263 | try |
263 | try |
264 | CoCreateinstance(CLSID_AMMULTIMEDIASTREAM,nil,CLSCTX_INPROC_SERVER,IID_IAMMULTIMEDIASTREAM,AMStream); |
264 | CoCreateinstance(CLSID_AMMULTIMEDIASTREAM,nil,CLSCTX_INPROC_SERVER,IID_IAMMULTIMEDIASTREAM,AMStream); |
265 | {$IFDEF UNICODE} |
265 | {$IFDEF UNICODE} |
266 | SetLength(wPath, Length(Filename) + 1); |
- | |
267 | StrPCopy(@wPath, Filename); |
266 | wPath := Filename; |
268 | {$ELSE} |
267 | {$ELSE} |
269 | MultiByteToWideChar(CP_ACP,0,PAnsiChar(Filename),-1,wPath,Sizeof(wPAth) div sizeof(wPath[0])); |
268 | MultiByteToWideChar(CP_ACP,0,PAnsiChar(Filename),-1,wPath,Sizeof(wPAth) div sizeof(wPath[0])); |
270 | {$ENDIF} |
269 | {$ENDIF} |
271 | AMStream.Initialize(STREAMTYPE_READ,AMMSF_NOGRAPHTHREAD,nil); |
270 | AMStream.Initialize(STREAMTYPE_READ,AMMSF_NOGRAPHTHREAD,nil); |
272 | if (DXSound <> nil) and (DXSound.DSound <> nil) and (DXSound.DSound.ISound <> nil) then |
271 | if (DXSound <> nil) and (DXSound.DSound <> nil) and (DXSound.DSound.ISound <> nil) then |
273 | AMStream.AddMediaStream(DXSound.DSound.ISound,{$IFDEF UNICODE}@{$ENDIF}MSPID_PrimaryAudio,AMMSF_ADDDEFAULTRENDERER,IMediaStream(nil^)); |
272 | AMStream.AddMediaStream(DXSound.DSound.ISound,{$IFDEF UNICODE}{$IFNDEF D26UP}@{$ENDIF}{$ENDIF}MSPID_PrimaryAudio,AMMSF_ADDDEFAULTRENDERER,IMediaStream(nil^)); |
274 | AMStream.AddMediaStream(DXDraw.DDraw.IDraw,{$IFDEF UNICODE}@{$ENDIF}MSPID_PrimaryVideo,0,Media); |
273 | AMStream.AddMediaStream(DXDraw.DDraw.IDraw,{$IFDEF UNICODE}{$IFNDEF D26UP}@{$ENDIF}{$ENDIF}MSPID_PrimaryVideo,0,Media); |
275 | AMStream.OpenFile({$IFDEF UNICODE}@{$ENDIF}wPAth,0); |
274 | AMStream.OpenFile({$IFDEF UNICODE}@wPAth[1]{$ELSE}wPAth{$ENDIF},0); |
276 | FMMStream := AMStream; |
275 | FMMStream := AMStream; |
277 | except |
276 | except |
278 | FMMStream := nil; |
277 | FMMStream := nil; |
279 | end; |
278 | end; |
280 | end; |
279 | end; |