Name | Description |
---|---|
Class EDirectShowException | DirectShow Exception class |
Class EDSPackException | |
Interface IDivXFilterInterface | Interface to control the Divx Decoder filter. TODO: discover the last function ... |
Class TBaseFilter | This class can store a custom filter as a moniker within the dfm file. |
Class TEnumMediaType | This class can retrieve all media types from a pin, a file or an IEnumMediaTypes interface. |
Class TFilterList | This class can enumerate all filters in a FilterGraph. |
Class TMediaType | Uses TMediaType to configure media types. This class have a special property editor. See TSampleGrabber |
Class TPersistentMemory | For internal use. This class is designed to store a custom memory stream with a form. It is the ancestor of TBaseFilter . |
Class TPinList | Helper class to enumerate pins on a filter. |
Class TSysDevEnum | Usefull class to enumerate availables filters. See "Filter Enumerator" sample. |
function AddGraphToRot(Graph: IFilterGraph; out ID: integer): HRESULT; |
function CheckDSError(HR: HRESULT): HRESULT; |
procedure CopyMediaType(pmtTarget: PAMMediaType; pmtSource: PAMMediaType); |
function CreateAudioMediaType(pwfx: PWaveFormatEx; pmt: PAMMediaType; bSetFormat: boolean): HRESULT; |
function CreateMediaType(pSrc: PAMMediaType): PAMMediaType; |
procedure DeleteMediaType(pmt: PAMMediaType); |
function FCC(str: String): Cardinal; |
function FOURCCMap(Fourcc: Cardinal): TGUID; |
procedure FreeAndNil(var Obj); |
procedure FreeMediaType(mt: PAMMediaType); |
function GetBitmapFormatSize(const Header: TBitmapInfoHeader): Integer; |
function GetBitmapSize(const pHeader: TBITMAPINFOHEADER): DWORD; |
function GetErrorString(hr: HRESULT): string; |
function GetEventCodeDef(code: longint): string; |
function GetFOURCC(Fourcc: Cardinal): string; |
function GetMediaTypeDescription(MediaType: TAMMediaType): string; |
function GetSourceRectFromMediaType(const MediaType: TAMMediaType): TRect; |
function HaveFilterPropertyPage(Filter: IBaseFilter; PropertyPage: TPropertyPage = ppDefault): boolean; |
function IntToTimeCode(x : longint): TDVDTimeCode; |
function MAKEFOURCC(ch0, ch1, ch2, ch3: char): Cardinal; |
function MiliSecToRefTime(Milisec: int64): Int64; |
function ProfileFromGUID(const GUID: TGUID): TWMPofiles8; |
function RefTimeToMiliSec(RefTime: Int64): Cardinal; |
function RemoveGraphFromRot(ID: integer): HRESULT; |
function ShowFilterPropertyPage(parent: THandle; Filter: IBaseFilter; PropertyPage: TPropertyPage = ppDefault): HRESULT; |
function ShowPinPropertyPage(parent: THandle; Pin: IPin): HRESULT; |
function StretchRect(R, IR: TRect): TRect; |
function AddGraphToRot(Graph: IFilterGraph; out ID: integer): HRESULT; |
Enable Graphedit to connect with a filter graph.
The application must register the filter graph instance in the Running Object Table (ROT). The ROT is a globally accessible look-up table that keeps track of running objects. Objects are registered in the ROT by moniker. To connect to the graph, GraphEdit searches the ROT for monikers whose display name matches a particular format: !FilterGraph X pid Y.
Graph: a graph interface (IGraphBuilder, IFilterGraph, IFilterGraph2).
ID: return the ROT identifier.
function CheckDSError(HR: HRESULT): HRESULT; |
raise EDirectShowException
exception if failed.
procedure CopyMediaType(pmtTarget: PAMMediaType; pmtSource: PAMMediaType); |
The CopyMediaType function copies an AM_MEDIA_TYPE structure into another structure, including the format block. This function allocates the memory for the format block. If the pmtTarget parameter already contains an allocated format block, a memory leak will occur. To avoid a memory leak, call FreeMediaType before calling this function.
function CreateAudioMediaType(pwfx: PWaveFormatEx; pmt: PAMMediaType; bSetFormat: boolean): HRESULT; |
The CreateAudioMediaType function initializes a media type from a TWAVEFORMATEX structure. If the bSetFormat parameter is TRUE, the method allocates the memory for the format block. If the pmt parameter already contains an allocated format block, a memory leak will occur. To avoid a memory leak, call FreeMediaType before calling this function. After the method returns, call FreeMediaType again to free the format block.
function CreateMediaType(pSrc: PAMMediaType): PAMMediaType; |
The CreateMediaType function allocates a new AM_MEDIA_TYPE structure, including the format block. This also comes in useful when using the IEnumMediaTypes interface so that you can copy a media type, you can do nearly the same by creating a TMediaType class but as soon as it goes out of scope the destructor will delete the memory it allocated (this takes a copy of the memory).
procedure DeleteMediaType(pmt: PAMMediaType); |
General purpose function to delete a heap allocated TAM_MEDIA_TYPE structure which is useful when calling IEnumMediaTypes.Next as the interface implementation allocates the structures which you must later delete the format block may also be a pointer to an interface to release.
function FCC(str: String): Cardinal; |
Convert a FCC (Four Char Codes) to Cardinal. A FCC identifie a media type.
function FOURCCMap(Fourcc: Cardinal): TGUID; |
The FOURCCMap function provides conversion between GUID media subtypes and old-style FOURCC 32-bit media tags. In the original Microsoft® Windows® multimedia APIs, media types were tagged with 32-bit values created from four 8-bit characters and were known as FOURCCs. Microsoft DirectShow® media types have GUIDs for the subtype, partly because these are simpler to create (creation of a new FOURCC requires its registration with Microsoft). Because FOURCCs are unique, a one-to-one mapping has been made possible by allocating a range of 4,000 million GUIDs representing FOURCCs. This range is all GUIDs of the form: XXXXXXXX-0000-0010-8000-00AA00389B71.
procedure FreeAndNil(var Obj); |
Frees an object reference and replaces the reference with Nil. (Delphi4 compatibility)
procedure FreeMediaType(mt: PAMMediaType); |
The FreeMediaType function frees the format block in an AM_MEDIA_TYPE structure. Use this function to free just the format block. To delete the AM_MEDIA_TYPE structure, call DeleteMediaType.
function GetBitmapFormatSize(const Header: TBitmapInfoHeader): Integer; |
The mechanism for describing a bitmap format is with the BITMAPINFOHEADER This is really messy to deal with because it invariably has fields that follow it holding bit fields, palettes and the rest. This function gives the number of bytes required to hold a VIDEOINFO that represents it. This count includes the prefix information (like the rcSource rectangle) the BITMAPINFOHEADER field, and any other colour information on the end. WARNING If you want to copy a BITMAPINFOHEADER into a VIDEOINFO always make sure that you use the HEADER macro because the BITMAPINFOHEADER field isn't right at the start of the VIDEOINFO (there are a number of other fields), CopyMemory(HEADER(pVideoInfo),pbmi,sizeof(BITMAPINFOHEADER));
function GetBitmapSize(const pHeader: TBITMAPINFOHEADER): DWORD; |
Retrieve the Size needed to store a bitmat
function GetErrorString(hr: HRESULT): string; |
The GetErrorString function retrieves the error message for a given return code, using the current language setting.
function GetEventCodeDef(code: longint): string; |
Return a string explaining a filter graph event.
function GetFOURCC(Fourcc: Cardinal): string; |
Find the four-character codes wich identifi a codec.
function GetMediaTypeDescription(MediaType: TAMMediaType): string; |
This function examine a media type and return a short description like GraphEdit.
function GetSourceRectFromMediaType(const MediaType: TAMMediaType): TRect; |
Retrieve original source rectangle from a TAM_Media_type record.
function HaveFilterPropertyPage(Filter: IBaseFilter; PropertyPage: TPropertyPage = ppDefault): boolean; |
Return true if the specified property page is provided by the Filter.
function IntToTimeCode(x : longint): TDVDTimeCode; |
deprecated, convert a Time code event to TDVD_TimeCode record.
function MAKEFOURCC(ch0, ch1, ch2, ch3: char): Cardinal; |
Create the four-character codes from a Cardinal value.
function MiliSecToRefTime(Milisec: int64): Int64; |
Convert milisecondes to 100 nano sec unit
function ProfileFromGUID(const GUID: TGUID): TWMPofiles8; |
function RefTimeToMiliSec(RefTime: Int64): Cardinal; |
Convert 100 nano sec unit to milisecondes.
function RemoveGraphFromRot(ID: integer): HRESULT; |
Disable Graphedit to connect with your filter graph.
ID: identifier provided by the AddGraphToRot
method.
function ShowFilterPropertyPage(parent: THandle; Filter: IBaseFilter; PropertyPage: TPropertyPage = ppDefault): HRESULT; |
Show the property page associated with the Filter. A property page is one way for a filter to support properties that the user can set. Many of the filters provided with DirectShow support property pages, they are intended for debugging purposes, and are not recommended for application use. In most cases the equivalent functionality is provided through a custom interface on the filter. An application should control these filters programatically, rather than expose their property pages to users.
function ShowPinPropertyPage(parent: THandle; Pin: IPin): HRESULT; |
Show the property page associated with the Pin.
See also: ShowFilterPropertyPage
.
function StretchRect(R, IR: TRect): TRect; |
TODO -oMichael Andersen: make documentation
Name | Description |
---|---|
TPropertyPage | Property pages. See also: ShowFilterPropertyPage , HaveFilterPropertyPage . |
TVORBISFORMAT | Ogg Vorbis |
TWMPofiles8 | WMF9 Utils |
Henri Gourvest: hgourvest@progdigy.com
Mar 14, 2002
Feb 21, 2002