| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- {========================================================================}
- {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
- {========================================================================}
- {= All Rights Reserved =}
- {========================================================================}
- {= D 01099 Dresden = Tel.: +0351-8012255 =}
- {= Loewenstr.7a = info@swiftsoft.de =}
- {========================================================================}
- {= Actual versions on http://www.swiftsoft.de/mmtools.html =}
- {========================================================================}
- {= This code is for reference purposes only and may not be copied or =}
- {= distributed in any format electronic or otherwise except one copy =}
- {= for backup purposes. =}
- {= =}
- {= No Delphi Component Kit or Component individually or in a collection=}
- {= subclassed or otherwise from the code in this unit, or associated =}
- {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =}
- {= without express permission from SwiftSoft. =}
- {= =}
- {= For more licence informations please refer to the associated =}
- {= HelpFile. =}
- {========================================================================}
- {= $Date: 20.01.1998 - 18:00:00 $ =}
- {========================================================================}
- unit MMAVICtl;
- {$I COMPILER.INC}
- interface
- uses
- SysUtils,
- Windows,
- Classes,
- StdCtrls,
- ExtCtrls,
- Controls,
- Graphics,
- Forms,
- MMSystem,
- MMObj,
- MMDSPObj,
- MMScale,
- MMRegs,
- MMUtils,
- MMPanel,
- MMLEDs,
- MMSlider,
- MMLevel,
- MMButton,
- MMHTimer,
- MMConect,
- MMWavOut,
- MMPcmCvt,
- MMAVI;
- const
- defWidth = 225;
- defHeight = 65;
- type
- {-- TMMAVIVideoDisplay ----------------------------------------------------}
- TMMAVIVideoDisplay = class(TMMGraphicControl)
- public
- constructor Create(aOwner: TComponent); override;
- destructor Destroy; override;
- function GetVideoSize(Frame: Longint): TRect;
- procedure AddStream(S: TMMAVIStream);
- procedure AddFile(F: TMMCustomAVIFile);
- procedure FreeStreams;
- property StreamCount: Integer read GetStreamCount;
- property Streams[i: Integer]: TMMAVIStream read GetStreams;
- published
- property OnClick;
- property OnDblClick;
- property OnMouseDown;
- property OnMouseMove;
- property OnMouseUp;
- property Width default 100;
- property Height default 100;
- property Align;
- property Bevel;
- property Enabled;
- property PopupMenu;
- property ParentShowHint;
- property ShowHint;
- property Visible;
- property StreamIdx: integer read FStreamIdx write SetStreamIndex;
- property FrameIdx: Longint read FFrameIdx write SetFrameIndex;
- end;
- {-- TMMAVIControl ---------------------------------------------------------}
- TMMAVIControl = class(TMMCustomPanel)
- public
- constructor Create(aOwner: TComponent); override;
- destructor Destroy; override;
- procedure FreeStreams;
- procedure AddStream(S: TMMAVIStream);
- procedure AddFile(F: TMMCustomAVIFile);
- function hasAudio: Boolean;
- function hasVideo: Boolean;
- property PWaveFormat: PWaveFormatEx read GetPWaveFormat;
- procedure Play;
- procedure Pause;
- procedure Stop;
- property Playing: Boolean read FPlaying;
- property Paused: Boolean read FPaused;
- property StreamCount: Integer read GetStreamCount;
- property Streams[i: Integer]: TMMAVIStream read GetStreams;
- property TypedStreams[st: TMMAVIStreamType; i: LongInt]: TMMAVIStream read GetTypedStreams;
- property TypedStreamCount[st: TMMAVIStreamType]: LongInt read GetTypedStreamCount;
- property MaxPlayTime: Longint read GetMaxPlaytime;
- property MinWidth: integer read GetMinWidth;
- property MinHeight: integer read GetMinHeight;
-
- published
- property OnClick;
- property OnDblClick;
- property OnMouseDown;
- property OnMouseMove;
- property OnMouseUp;
- property Align;
- property Bevel;
- property Height default defHeight;
- property Width default defWidth;
- property ParentShowHint;
- property ShowHint;
- property PopupMenu;
- property Enabled;
- property Visible;
- property VideoDisplay: TMMAVIVideoDisplay read FVideoDisplay write SetVideoDisplay;
- property AudioStreamIdx: integer read FAudioStreamIdx write SetAudioStreamIndex;
- property VideoStreamIdx: integer read FVideoStreamIdx write SetVideoStreamIndex;
- property CurrentTime: Longint read FCurTime write SetCurrentTime;
- property ShowDisplay: Boolean read FShowDisplay write SetShowDisplay default True;
- property ShowControls: Boolean read FShowControls write SetShowControls default True;
- property LEDColor: TColor read FLEDColor write SetLEDColor default clWhite;
- property DeviceID: integer read FDeviceID write FDeviceID default -1;
- property NumBuffers: integer read FNumBuffers write FNumBuffers default 25;
- property BufferSize: integer read FBufferSize write FBufferSize default 4096;
- property CallbackMode: TMMCBMode read FCBMode write FCBMode default cmWindow;
- property Decay: integer read FDecay write FDecay default 10;
- end;
- implementation
|