DirectShow uses property sets to support extended services offered by hardware manufacturers and their associated drivers and filters. Hardware and filter vendors can define new capabilities as properties, arrange them in property sets, and publish the specification for these property sets. As the application developer, you can use the methods of the IKsPropertySet interface to determine whether a driver or filter supports a particular set of properties, and to retrieve or to set those properties.
All the methods exposed by IKsPropertySet require a GUID that identifies the property set (guidPropSet parameter) and a DWORD that identifies the property within the property set (the dwPropID parameter). dwPropID is typically a member of an enumerated data type.
Individual properties can also have associated data which the developer specifies in the pPropData parameter in IKsPropertySet::Set and IKsPropertySet::Get. The IKsPropertySet interface specification intentionally leaves these parameters undefined (data type LPVOID), allowing the designer of the property set to use them in a way most beneficial to the individual property. The definition of each property provides the meaning of the property data.
DirectShow provides property sets for DVD and capture. The following table lists the GUID and a description of each property set.
Property Set GUID | Description |
AM_KSPROPSETID_DvdSubPic | DVD Subpicture properties control the color, contrast, and output of the subpicture display. |
AM_KSPROPSETID_CopyProt | DVD Copy protection property set. |
AMPROPSETID_Pin | Capture pin property set. |
The following topics provide more information about these property sets.
DVD Subpicture properties control the color, contrast, and output of the subpicture display.
The following information presents the necessary constants and data types for the developer to use for this property set in calls to IKsPropertySet methods. It provides values for the GUID (guidPropSet), property ID (dwPropID), and property data type (pPropData) parameters.
GUID: AM_KSPROPSETID_DvdSubPic
Property Set enum: AM_PROPERTY_DVDSUBPIC
DVD subpicture properties.
typedef enum { AM_PROPERTY_DVDSUBPIC_PALETTE, AM_PROPERTY_DVDSUBPIC_HLI, AM_PROPERTY_DVDSUBPIC_COMPOSIT_ON, } AM_PROPERTY_DVDSUBPIC;
The AM_PROPERTY_DVDSUBPIC_HLI property is set-only. It specifies a rectangle of subpicture or screen whose color or contrast is to be changed. This differs from the DVD specification in that the Microsoft DVD navigator parses all button and keyboard information and only passes one highlight rectangle down to the subpicture decoder at any given time. As a result, highlight information is sent to the decoder more often than it is present in the DVD stream.
The highlight information arrives asynchronously to the data stream. The decoder uses the highlight Start and End time stamps to correlate the highlight information to the relevant subpicture information, if any. If the decoder has not received any subpicture stream information for the requested time stamps, the decoder assumes that the highlight information is stand-alone and does not apply to a subpicture. In this case, the color and contrast information can be assumed to be all the same color.
The data is not entirely in DVD disc format. Microsoft provides an additional structure of type AM_PROPERTY_SPHLI that is passed as the parameter to this property. This structure describes the currently selected button from the DVD highlight information.
The DVD navigator processes all keystroke information and sends new highlight information each time a button state changes. The information describes only one mode of one button at a time. It includes a display rectangle in pixel coordinates of the screen, or a display of the subpicture, if present. The structure also contains color and contrast information but only for the present state of the currently selected button. The format is defined in the DVD specification.
Highlight information contains Start and End Timestamps. These are in the same units as other time stamps, with two exceptions: A Start Timestamp of 0xFFFFFFFF means the highlight property is effective upon receipt, and an End Timestamp of 0xFFFFFFFF means the highlight property is valid until next highlight received.
The HLISS field is as defined in the DVD specification. A value of zero indicates that all highlights are invalid and the decoder should disable all highlights.
DVD YUV subpicture data.
typedef struct _AM_DVD_YUV { UCHAR Reserved; UCHAR Y; UCHAR U; UCHAR V; } AM_DVD_YUV, *PAM_DVD_YUV;
This structure is contained within the AM_PROPERTY_SPPAL structure.
DVD subpicture palette.
typedef struct _AM_PROPERTY_SPPAL { AM_DVD_YUV sppal[16]; } AM_PROPERTY_SPPAL, *PAM_PROPERTY_SPPAL;
The AM_PROPERTY_DVDSUBPIC_PALETTE property uses this structure.
Color contrast description from DVD highlight (HLI).
typedef struct _AM_COLCON { UCHAR emph1col:4; UCHAR emph2col:4; UCHAR backcol:4; UCHAR patcol:4; UCHAR emph1con:4; UCHAR emph2con:4; UCHAR backcon:4; UCHAR patcon:4; } AM_COLCON, *PAM_COLCON;
This structure is contained within the AM_PROPERTY_SPHLI structure.
Describes the currently selected button from the DVD highlight information.
typedef struct _AM_PROPERTY_SPHLI { USHORT HLISS; USHORT Reserved; ULONG StartPTM; ULONG EndPTM; USHORT StartX; USHORT StartY; USHORT StopX; USHORT StopY; AM_COLCON ColCon; // color contrast description (4 bytes as given in HLI) } AM_PROPERTY_SPHLI, *PAM_PROPERTY_SPHLI;
The AM_PROPERTY_DVDSUBPIC_HLI property uses this structure.
GUID: AM_KSPROPSETID_CopyProt
Property Set enum: AM_PROPERTY_DVDCOPYPROT
Properties:
DVD copy protection properties.
typedef enum { AM_PROPERTY_DVDCOPY_CHLG_KEY, AM_PROPERTY_DVDCOPY_DVD_KEY1, AM_PROPERTY_DVDCOPY_DEC_KEY2, AM_PROPERTY_DVDCOPY_TITLE_KEY, AM_PROPERTY_COPY_MACROVISION, AM_PROPERTY_DVDCOPY_REGION, AM_PROPERTY_DVDCOPY_DISC_KEY } AM_PROPERTY_DVDCOPYPROT;
Microsoft worked with the Copyright Protection Technical Working Group (CPTWG), which announced in November 1996 that its DVD technology subcommittee proposed solutions for preventing unauthorized copying of filmed entertainment from prerecorded DVD-Video. The subcommittee has proposed controls using a scrambling scheme first proposed by the DVD Consortium for encrypting disc content and licensing the decryption technology.
Microsoft will provide software that facilitates the authentication process required by this scheme, thus allowing a DVD-ROM drive to authenticate and transfer keys with a DVD decrypter. Microsoft has no current plans to ship a DVD decrypter and, instead, is providing operating system code that will act as the agent to allow either hardware or software decrypters to be authenticated.
The key exchange process is initiated and controlled by the DVD navigator. The DVD minidriver only needs to implement the properties above. The rest is handled by other components.
Each DVD input stream will receive copy protection properties. This is true even if all DVD streams are controlled by the same hardware
DVD challenge key.
typedef struct _AM_DVDCOPY_CHLGKEY { BYTE ChlgKey[10]; BYTE Reserved[2]; } AM_DVDCOPY_CHLGKEY, *PAM_DVDCOPY_CHLGKEY;
AM_PROPERTY_DVDCOPY_CHLG_KEY property uses this structure.
DVD bus key.
typedef struct _AM_DVDCOPY_BUSKEY { BYTE BusKey[5]; BYTE Reserved[1]; } AM_DVDCOPY_BUSKEY, *PAM_DVDCOPY_BUSKEY;
AM_PROPERTY_DVDCOPY_DVD_KEY1 and AM_PROPERTY_DVDCOPY_DEC_KEY2 properties use this structure.
DVD disc key.
typedef struct _AM_DVDCOPY_DISCKEY { BYTE DiscKey[2048]; } AM_DVDCOPY_DISCKEY, *PAM_DVDCOPY_DISCKEY;
AM_PROPERTY_DVDCOPY_DISC_KEY property uses this structure.
DVD title key from the current content.
typedef struct AM_DVDCOPY_TITLEKEY { ULONG KeyFlags; UCHAR TitleKey[6]; UCHAR Reserved[2]; } AM_DVDCOPY_TITLEKEY, *PAM_DVDCOPY_TITLEKEY;
AM_PROPERTY_DVDCOPY_TITLE_KEY property uses this structure.
Macrovision level for the NTSC encoder.
typedef struct _AM_COPY_MACROVISION { ULONG MACROVISIONLevel; } AM_COPY_MACROVISION, *PAM_COPY_MACROVISION;
AM_PROPERTY_COPY_MACROVISION property uses this structure.
Macrovision level.
typedef enum { AM_MACROVISION_DISABLED, AM_MACROVISION_LEVEL1, AM_MACROVISION_LEVEL2, AM_MACROVISION_LEVEL3 } AM_COPY_MACROVISION_LEVEL, *PAM_COPY_MACROVISION_LEVEL;
AM_COPY_MACROVISION structure uses this data type.
GUID: AMPROPSETID_Pin
Property Set enum: AMPROPERTY_PIN
Capture pin property set.
typedef enum { AMPROPERTY_PIN_CATEGORY, } AMPROPERTY_PIN;
PIN_CATEGORY_CAPTURE | Capture pin. |
PIN_CATEGORY_PREVIEW | Preview pin. |
PIN_CATEGORY_ANALOGVIDEOIN | Input pin of the capture filter that takes analog and digitizes it. |
PIN_CATEGORY_VBI | Pin providing vertical blanking interval data. |
PIN_CATEGORY_VIDEOPORT | Pin to be connected to a VPE filter. |
PIN_CATEGORY_NABTS | Pin providing North American Videotext Standard data. |
PIN_CATEGORY_EDS | Pin providing Extended Data Services (line 21, even fields). |
PIN_CATEGORY_TELETEXT | Pin providing teletext (a closed captioning variant). |
PIN_CATEGORY_CC | Pin providing closed captioning data from line 21. |
PIN_CATEGORY_STILL | Pin providing a still image. |
PIN_CATEGORY_TIMECODE | Pin providing timecode data. |
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.