?? dspack.pas
字號:
(*********************************************************************
* DSPack 2.3.3 *
* *
* home page : http://www.progdigy.com *
* email : hgourvest@progdigy.com *
* Thanks to Michael Andersen. (DSVideoWindowEx) *
* *
* date : 2003-09-08 *
* *
* The contents of this file are used with permission, subject to *
* the Mozilla Public License Version 1.1 (the "License"); you may *
* not use this file except in compliance with the License. You may *
* obtain a copy of the License at *
* http://www.mozilla.org/MPL/MPL-1.1.html *
* *
* Software distributed under the License is distributed on an *
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or *
* implied. See the License for the specific language governing *
* rights and limitations under the License. *
* *
* Contributor(s) *
* Peter J. Haas <DSPack@pjh2.de> *
* Andriy Nevhasymyy <a.n@email.com> *
* Milenko Mitrovic <dcoder@dsp-worx.de> *
* Michael Andersen <michael@mechdata.dk> *
* Martin Offenwanger <coder@dsplayer.de> *
* *
*********************************************************************)
{
@abstract(DSPack Components.)
@author(Henri Gourvest: hgourvest@progdigy.com)
@created(Mar 14, 2002)
@lastmod(Oct 24, 2003)
}
{$I jedi.inc}
{$IFDEF COMPILER6_UP}
{$WARN SYMBOL_DEPRECATED OFF}
{$ENDIF}
{$IFDEF COMPILER7_UP}
{$WARN SYMBOL_DEPRECATED OFF}
{$WARN UNSAFE_CODE OFF}
{$WARN UNSAFE_TYPE OFF}
{$WARN UNSAFE_CAST OFF}
{$ENDIF}
{$ALIGN ON}
{$MINENUMSIZE 4}
unit DSPack;
interface
uses
Windows, Classes, SysUtils, Messages, Graphics, Forms, Controls, ActiveX, DirectShow9,
DirectDraw, DSUtil, ComCtrls, MMSystem, Math, Consts, ExtCtrls,
MultiMon, Dialogs, Registry, SyncObjs, Direct3D9, WMF9;
const
{ Filter Graph message identifier. }
WM_GRAPHNOTIFY = WM_APP + 1;
{ Sample Grabber message identifier. }
WM_CAPTURE_BITMAP = WM_APP + 2;
type
{ Video mode to use with @link(TVideoWindow). }
TVideoMode = (
vmNormal,
vmVMR
);
{ Graph Mode to use with @link(TFilterGraph).}
TGraphMode = (
gmNormal,
gmCapture,
gmDVD
);
{ Render device returned by then OnGraphVMRRenderDevice event. }
{$IFDEF VER140}
TVMRRenderDevice = (
rdOverlay = 1,
rdVidMem = 2,
rdSysMem = 4
);
{$ELSE}
TVMRRenderDevice = Integer;
const
rdOverlay = 1;
rdVidMem = 2;
rdSysMem = 4;
type
{$ENDIF}
{@exclude}
TGraphState = (
gsUninitialized,
gsStopped,
gsPaused,
gsPlaying
);
{ Specifies the seeking capabilities of a media stream. }
TSeekingCap = (
CanSeekAbsolute, // The stream can seek to an absolute position.
CanSeekForwards, // The stream can seek forward.
CanSeekBackwards, // The stream can seek backward.
CanGetCurrentPos, // The stream can report its current position.
CanGetStopPos, // The stream can report its stop position.
CanGetDuration, // The stream can report its duration.
CanPlayBackwards, // The stream can play backward.
CanDoSegments, // The stream can do seamless looping (see IMediaSeeking.SetPositions).
Source // Reserved.
);
{ Specifies the seeking capabilities of a media stream. }
TSeekingCaps = set of TSeekingCap;
{ Video Mixer Render Preferences: <br>
<b>vpForceOffscreen:</b> Indicates that the VMR should use only offscreen surfaces for rendering.<br>
<b>vpForceOverlays:</b> Indicates that the VMR should fail if no overlay surfaces are available.<br>
<b>vpForceMixer:</b> Indicates that the VMR must use Mixer when the number of streams is 1.<br>
<b>vpDoNotRenderColorKeyAndBorder:</b> Indicates that the application is responsible for painting the color keys.<br>
<b>vpRestrictToInitialMonitor:</b> Indicates that the VMR should output only to the initial monitor.<br>
<b>vpPreferAGPMemWhenMixing:</b> Indicates that the VMR should attempt to use AGP memory when allocating texture surfaces.}
TVMRPreference = (
vpForceOffscreen,
vpForceOverlays,
vpForceMixer,
vpDoNotRenderColorKeyAndBorder,
vpRestrictToInitialMonitor,
vpPreferAGPMemWhenMixing
);
{ Pointer to @link(TVMRPreferences).}
PVMRPreferences = ^TVMRPreferences;
{ Set of @link(TVMRPreference).}
TVMRPreferences = set of TVMRPreference;
TOnDSEvent = procedure(sender: TComponent; Event, Param1, Param2: Integer) of object;
{@exclude}
TOnGraphBufferingData = procedure(sender: TObject; Buffering: boolean) of object ; {@exclude}
TOnGraphComplete = procedure(sender: TObject; Result: HRESULT; Renderer: IBaseFilter) of object ; {@exclude}
TOnGraphDeviceLost = procedure(sender: TObject; Device: IUnknown; Removed: Boolean) of object ; {@exclude}
TOnGraphEndOfSegment = procedure(sender: TObject; StreamTime: TReferenceTime; NumSegment: Cardinal) of object ; {@exclude}
TOnDSResult = procedure(sender: TObject; Result: HRESULT) of object ; {@exclude}
TOnGraphFullscreenLost = procedure(sender: TObject; Renderer: IBaseFilter) of object ; {@exclude}
TOnGraphOleEvent = procedure(sender: TObject; String1, String2: WideString) of object ; {@exclude}
TOnGraphOpeningFile = procedure(sender: TObject; opening: boolean) of object ; {@exclude}
TOnGraphSNDDevError = procedure(sender: TObject; OccurWhen: TSndDevErr; ErrorCode: LongWord) of object ; {@exclude}
TOnGraphStreamControl = procedure(sender: TObject; PinSender: IPin; Cookie: LongWord) of object ; {@exclude}
TOnGraphStreamError = procedure(sender: TObject; Operation: HRESULT; Value: LongWord) of object ; {@exclude}
TOnGraphVideoSizeChanged = procedure(sender: TObject; Width, height: word) of object ; {@exclude}
TOnGraphTimeCodeAvailable = procedure(sender: TObject; From: IBaseFilter; DeviceID: LongWord) of object ; {@exclude}
TOnGraphEXTDeviceModeChange = procedure(sender: TObject; NewMode, DeviceID: LongWord) of object ; {@exclude}
TOnGraphVMRRenderDevice = procedure(sender: TObject; RenderDevice: TVMRRenderDevice) of object;
{@exclude}
TOnDVDAudioStreamChange = procedure(sender: TObject; stream, lcid: Integer; Lang: string) of object; {@exclude}
TOnDVDCurrentTime = procedure(sender: TObject; Hours, minutes,seconds,frames,frate : Integer) of object; {@exclude}
TOnDVDTitleChange = procedure(sender: TObject; title: Integer) of object; {@exclude}
TOnDVDChapterStart = procedure(sender: TObject; chapter: Integer) of object; {@exclude}
TOnDVDValidUOPSChange = procedure(sender: TObject; UOPS: Integer) of object; {@exclude}
TOnDVDChange = procedure(sender: TObject; total,current: Integer) of object; {@exclude}
TOnDVDStillOn = procedure(sender: TObject; NoButtonAvailable: boolean; seconds: Integer) of object; {@exclude}
TOnDVDSubpictureStreamChange = procedure(sender: TObject; SubNum, lcid: Integer; Lang: string) of object; {@exclude}
TOnDVDPlaybackRateChange = procedure(sender: TObject; rate: single) of object; {@exclude}
TOnDVDParentalLevelChange = procedure(sender: TObject; level: Integer) of object; {@exclude}
TOnDVDAnglesAvailable = procedure(sender: TObject; available: boolean) of object; {@exclude}
TOnDVDButtonAutoActivated = procedure(sender: TObject; Button: Cardinal) of object; {@exclude}
TOnDVDCMD = procedure(sender: TObject; CmdID: Cardinal) of object; {@exclude}
TOnDVDCurrentHMSFTime = procedure(sender: TObject; HMSFTimeCode: TDVDHMSFTimeCode; TimeCode: TDVDTimeCode) of object; {@exclude}
TOnDVDKaraokeMode = procedure(sender: TObject; Played: boolean) of object;
{@exclude}
TOnBuffer = procedure(sender: TObject; SampleTime: Double; pBuffer: Pointer; BufferLen: longint) of object ;
TOnSelectedFilter = function (Moniker: IMoniker; FilterName: WideString; ClassID: TGuid): Boolean of Object;
TOnCreatedFilter = function (Filter: IBaseFilter; ClassID: TGuid): Boolean of Object;
TOnUnableToRender = function (Pin: IPin): Boolean of Object;
// *****************************************************************************
// IFilter
// *****************************************************************************
{@exclude}
TFilterOperation = (
foAdding, // Before the filter is added to graph.
foAdded, // After the filter is added to graph.
foRemoving, // Before the filter is removed from graph.
foRemoved, // After the filter is removed from graph.
foRefresh // Designer notification to Refresh the filter .
);
{@exclude}
IFilter = interface
['{887F94DA-29E9-44C6-B48E-1FBF0FB59878}']
{ Return the IBaseFilter Interface (All DirectShow filters expose this interface). }
function GetFilter: IBaseFilter;
{ Return the filter name (generally the component name). }
function GetName: string;
{ Called by the @link(TFilterGraph) component, this method receive notifications
on what the TFilterGraph is doing. if Operation = foGraphEvent then Param is the
event code received by the FilterGraph.}
procedure NotifyFilter(operation: TFilterOperation; Param: integer = 0);
end;
{@exclude}
TControlEvent = (
cePlay,
cePause,
ceStop,
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -