📄 dvdif.idl
字号:
//------------------------------------------------------------------------------
// File: DVDIf.idl
//
// Desc: DirectShow interfaces to control playback of a DVD filter graph.
//
// Copyright (c) 1992-2002, Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
// forward declarations - these are the interfaces declared in this file
import "unknwn.idl";
import "objidl.idl";
cpp_quote("#include <ddraw.h>")
interface IDvdControl;
interface IDvdInfo;
interface IDirectDraw;
interface IDirectDrawSurface;
interface IDvdGraphBuilder ;
interface IDDrawExclModeVideo;
interface IDDrawExclModeVideoCallback;
interface IDvdCmd;
interface IDvdState;
//==========================================================================
//==========================================================================
//
// typedefs used by IDvdControl and IDvdInfo interfaces.
//
//==========================================================================
//==========================================================================
typedef enum tagDVD_DOMAIN {
// The DVD_DOMAIN is used to indicate the stat of a DVD player.
DVD_DOMAIN_FirstPlay=1, // doing default initialization of a dvd disc
DVD_DOMAIN_VideoManagerMenu, // displaying menus for whole disc
DVD_DOMAIN_VideoTitleSetMenu, // displaying menus for current title set
DVD_DOMAIN_Title, // displaying current title
DVD_DOMAIN_Stop // player is in stopped state
} DVD_DOMAIN;
typedef enum tagDVD_MENU_ID {
DVD_MENU_Title = 2, // to choose a title from any VTS in a DVD-Video volume
DVD_MENU_Root = 3, // main menu for a specific VTS
DVD_MENU_Subpicture =4, // to choose subpicture stream in a VTS
DVD_MENU_Audio = 5, // to choose audio stream in a VTS
DVD_MENU_Angle = 6, // to choose angle num in a VTS
DVD_MENU_Chapter = 7 // to choose a chapter in a VTS
// the Root menu always provides a means of getting to to Subpicture, Audio,
// Angle and Chapter menus if they exist.
} DVD_MENU_ID;
typedef enum tagDVD_DISC_SIDE {
DVD_SIDE_A = 1,
DVD_SIDE_B = 2
} DVD_DISC_SIDE;
typedef enum tagDVD_PREFERRED_DISPLAY_MODE
{
// DVD_PREFERRED_DISPLAY_MODE is used to indicate the user's
// preferred window aspect ratio and preferred method of converion of
// 16*9 content to a 4*3 window aspect ratio. Pan-scan and letterboxing are
// the two conversion methods. This enum is used to indicate only a preference of
// conversion mechinism since some content can only be converted using one
// of these methods. 4*3 content is converted to a 16*9 window always by using
// "reverse" letterboxing where black bars are added to the right and left
// sides of the display instead of the top and bottom of the display as in the 16*9
// to 4*3 conversion useing letterboxing.
DISPLAY_CONTENT_DEFAULT = 0, // default to content
DISPLAY_16x9 = 1, // 16x9 display
DISPLAY_4x3_PANSCAN_PREFERRED = 2, // 4x3 display with pan-scan preferrence
DISPLAY_4x3_LETTERBOX_PREFERRED = 3 // 4x3 display with letterbox preferrence
} DVD_PREFERRED_DISPLAY_MODE;
typedef WORD DVD_REGISTER;
typedef DVD_REGISTER GPRMARRAY[16]; // DVD-Video 1.0 has 16 16-bit General Parameter Registers
typedef DVD_REGISTER SPRMARRAY[24]; // DVD-Video 1.0 has 24 16-bit System Parameter Registers
// these are only for IDVDInfo1 compatibility and require the DVD-Video 1.0 specification
// Please use the IDVDInfo2's DVD_Title/MenuAttributes, DVD_VideoAttributes, DVD_AudioAttributes, and DVD_SubpictureAttributes
typedef struct tagDVD_ATR
{
//
// Refer to the DVD-Video 1.0 spec to parse these structures.
//
ULONG ulCAT; // VMG_CAT if this is for a volume; or VTS_CAT
// if this is for a Video Title Set (VTS)
BYTE pbATRI[768];// All stream attributes for menu and title from bytes
// 256 to 1023 of VMGI or VTSI.
} DVD_ATR;
typedef BYTE DVD_VideoATR[2]; // video stream attributes.
typedef BYTE DVD_AudioATR[8]; // audio stream attributes.
typedef BYTE DVD_SubpictureATR[6]; // subpicture stream attributes.
// DVD1.0 Timecode is BCD encoded in this format: 0xHhMmSsFf, where
// H is tens of hours
// h is hours
// M is tens of minutes
// m is minutes
// S is tens of seconds
// s is seconds
// F is tens of frames
// f is frames
// Note that you must know the frame rate to interperate the frame count as time.
typedef enum tagDVD_FRAMERATE
{
DVD_FPS_25 =1, // 25 frames per second
DVD_FPS_30NonDrop = 3 // exactly 30 frames per second
} DVD_FRAMERATE;
cpp_quote("typedef struct tagDVD_TIMECODE")
cpp_quote("{")
cpp_quote(" ULONG Hours1 :4; // Hours")
cpp_quote(" ULONG Hours10 :4; // Tens of Hours ")
cpp_quote("")
cpp_quote(" ULONG Minutes1 :4; // Minutes ")
cpp_quote(" ULONG Minutes10:4; // Tens of Minutes ")
cpp_quote("")
cpp_quote(" ULONG Seconds1 :4; // Seconds ")
cpp_quote(" ULONG Seconds10:4; // Tens of Seconds ")
cpp_quote("")
cpp_quote(" ULONG Frames1 :4; // Frames ")
cpp_quote(" ULONG Frames10 :2; // Tens of Frames ")
cpp_quote("")
cpp_quote(" ULONG FrameRateCode: 2; // use DVD_FRAMERATE to indicate frames/sec and drop/non-drop")
cpp_quote("} DVD_TIMECODE;")
//
// Newer IDVD2 methods can use the HMSF format instead
// Call SetOption( DVD_HMSF_TimeCodeEvents, TRUE) to return EC_DVD_CURRENT_HMSF_TIME
// instead of EC_DVD_CURRENT_TIME events
//
typedef enum tagDVD_TIMECODE_FLAGS
{
DVD_TC_FLAG_25fps = 0x00000001, // 25 frames per second
DVD_TC_FLAG_30fps = 0x00000002, // 30 frames per second
DVD_TC_FLAG_DropFrame = 0x00000004, // 29.97 instead of 30 fps
DVD_TC_FLAG_Interpolated = 0x00000008, // timecode may be inaccurate
// remainder of bits are reserved and should not be read
} DVD_TIMECODE_FLAGS;
// this can be cast to/from a ULONG
typedef struct tagDVD_HMSF_TIMECODE
{
BYTE bHours;
BYTE bMinutes;
BYTE bSeconds;
BYTE bFrames;
} DVD_HMSF_TIMECODE;
typedef struct tagDVD_PLAYBACK_LOCATION2
{
//
// TitleNum & ChapterNum or TitleNum & TimeCode are sufficient to save
// playback location for One_Sequential_PGC_Titles.
//
ULONG TitleNum; // title number for whole disc (TTN not VTS_TTN)
ULONG ChapterNum; // part-of-title number with title. 0xffffffff if not Once_Sequential_PGC_Title
DVD_HMSF_TIMECODE TimeCode; // use DVD_TIMECODE for current playback time.
ULONG TimeCodeFlags; // union of DVD_TIMECODE_EVENT_FLAGS
} DVD_PLAYBACK_LOCATION2;
typedef struct tagDVD_PLAYBACK_LOCATION
{
//
// TitleNum & ChapterNum or TitleNum & TimeCode are sufficient to save
// playback location for One_Sequential_PGC_Titles.
//
ULONG TitleNum; // title number for whole disc (TTN not VTS_TTN)
ULONG ChapterNum; // part-of-title number with title. 0xffffffff if not Once_Sequential_PGC_Title
ULONG TimeCode; // use DVD_TIMECODE for current playback time. 0xffffffff if not Once_Sequential_PGC_Title
} DVD_PLAYBACK_LOCATION;
typedef DWORD VALID_UOP_SOMTHING_OR_OTHER;
typedef enum {
//
// Annex J User Functions ---
//
UOP_FLAG_Play_Title_Or_AtTime = 0x00000001, // Title_Or_Time_Play
UOP_FLAG_Play_Chapter = 0x00000002, // Chapter_Search_Or_Play
UOP_FLAG_Play_Title = 0x00000004, // Title_Play
UOP_FLAG_Stop = 0x00000008, // Stop
UOP_FLAG_ReturnFromSubMenu = 0x00000010, // GoUp
UOP_FLAG_Play_Chapter_Or_AtTime = 0x00000020, // Time_Or_Chapter_Search
UOP_FLAG_PlayPrev_Or_Replay_Chapter = 0x00000040, // Prev_Or_Top_PG_Search
UOP_FLAG_PlayNext_Chapter = 0x00000080, // Next_PG_Search
UOP_FLAG_Play_Forwards = 0x00000100, // Forward_Scan
UOP_FLAG_Play_Backwards = 0x00000200, // Backward_Scan
UOP_FLAG_ShowMenu_Title = 0x00000400, // Title_Menu_Call
UOP_FLAG_ShowMenu_Root = 0x00000800, // Root_Menu_Call
UOP_FLAG_ShowMenu_SubPic = 0x00001000, // SubPic_Menu_Call
UOP_FLAG_ShowMenu_Audio = 0x00002000, // Audio_Menu_Call
UOP_FLAG_ShowMenu_Angle = 0x00004000, // Angle_Menu_Call
UOP_FLAG_ShowMenu_Chapter = 0x00008000, // Chapter_Menu_Call
UOP_FLAG_Resume = 0x00010000, // Resume
UOP_FLAG_Select_Or_Activate_Button = 0x00020000, // Button_Select_Or_Activate
UOP_FLAG_Still_Off = 0x00040000, // Still_Off
UOP_FLAG_Pause_On = 0x00080000, // Pause_On
UOP_FLAG_Select_Audio_Stream = 0x00100000, // Audio_Stream_Change
UOP_FLAG_Select_SubPic_Stream = 0x00200000, // SubPic_Stream_Change
UOP_FLAG_Select_Angle = 0x00400000, // Angle_Change
UOP_FLAG_Select_Karaoke_Audio_Presentation_Mode = 0x00800000, // Karaoke_Audio_Pres_Mode_Change
UOP_FLAG_Select_Video_Mode_Preference = 0x01000000 // Video_Pres_Mode_Change
} VALID_UOP_FLAG ;
typedef enum {
DVD_CMD_FLAG_None = 0x00000000,
DVD_CMD_FLAG_Flush = 0x00000001,
DVD_CMD_FLAG_SendEvents = 0x00000002,
DVD_CMD_FLAG_Block = 0x00000004, // block end
DVD_CMD_FLAG_StartWhenRendered = 0x00000008, // command "start" when the first frame is rendered
DVD_CMD_FLAG_EndAfterRendered = 0x00000010, // command "ends" after the last frame is rendered
} DVD_CMD_FLAGS;
// For IDVDControl2::SetOption flags
typedef enum {
DVD_ResetOnStop = 1, // default TRUE
DVD_NotifyParentalLevelChange = 2, // default FALSE
DVD_HMSF_TimeCodeEvents = 3, // default FALSE (send DVD_CURRENT_TIME events)
DVD_AudioDuringFFwdRew = 4 // default FALSE (or by reg)
} DVD_OPTION_FLAG;
typedef enum {
DVD_Relative_Upper = 1,
DVD_Relative_Lower = 2,
DVD_Relative_Left = 3,
DVD_Relative_Right = 4
} DVD_RELATIVE_BUTTON;
// Parental Level Information
typedef enum tagDVD_PARENTAL_LEVEL
{
DVD_PARENTAL_LEVEL_8 = 0x8000,
DVD_PARENTAL_LEVEL_7 = 0x4000,
DVD_PARENTAL_LEVEL_6 = 0x2000,
DVD_PARENTAL_LEVEL_5 = 0x1000,
DVD_PARENTAL_LEVEL_4 = 0x0800,
DVD_PARENTAL_LEVEL_3 = 0x0400,
DVD_PARENTAL_LEVEL_2 = 0x0200,
DVD_PARENTAL_LEVEL_1 = 0x0100
} DVD_PARENTAL_LEVEL;
typedef enum tagDVD_AUDIO_LANG_EXT
{
DVD_AUD_EXT_NotSpecified =0,
DVD_AUD_EXT_Captions =1,
DVD_AUD_EXT_VisuallyImpaired =2,
DVD_AUD_EXT_DirectorComments1 =3,
DVD_AUD_EXT_DirectorComments2 =4,
} DVD_AUDIO_LANG_EXT;
typedef enum tagDVD_SUBPICTURE_LANG_EXT
{
DVD_SP_EXT_NotSpecified =0,
DVD_SP_EXT_Caption_Normal =1,
DVD_SP_EXT_Caption_Big =2,
DVD_SP_EXT_Caption_Children =3,
DVD_SP_EXT_CC_Normal =5,
DVD_SP_EXT_CC_Big =6,
DVD_SP_EXT_CC_Children =7,
DVD_SP_EXT_Forced =9,
DVD_SP_EXT_DirectorComments_Normal =13,
DVD_SP_EXT_DirectorComments_Big =14,
DVD_SP_EXT_DirectorComments_Children =15,
} DVD_SUBPICTURE_LANG_EXT;
typedef enum tagDVD_AUDIO_APPMODE
{
DVD_AudioMode_None = 0, // no special mode
DVD_AudioMode_Karaoke = 1,
DVD_AudioMode_Surround = 2,
DVD_AudioMode_Other = 3,
} DVD_AUDIO_APPMODE;
typedef enum tagDVD_AUDIO_FORMAT
{
DVD_AudioFormat_AC3 = 0,
DVD_AudioFormat_MPEG1 = 1,
DVD_AudioFormat_MPEG1_DRC = 2, // MPEG1 with dynamic range control
DVD_AudioFormat_MPEG2 = 3,
DVD_AudioFormat_MPEG2_DRC = 4, // MPEG2 with dynamic range control
DVD_AudioFormat_LPCM = 5,
DVD_AudioFormat_DTS = 6,
DVD_AudioFormat_SDDS = 7,
DVD_AudioFormat_Other = 8
} DVD_AUDIO_FORMAT;
// flags for SelectKaraokeAudioPresentationMode
typedef enum tagDVD_KARAOKE_DOWNMIX
{
DVD_Mix_0to0 = 0x0001, // unused - reserved for future use
DVD_Mix_1to0 = 0x0002, // unused - reserved for future use
DVD_Mix_2to0 = 0x0004,
DVD_Mix_3to0 = 0x0008,
DVD_Mix_4to0 = 0x0010,
DVD_Mix_Lto0 = 0x0020, // mix auxillary L to channel 0 (left speaker)
DVD_Mix_Rto0 = 0x0040, // mix auxillary R to channel 0 (left speaker)
DVD_Mix_0to1 = 0x0100, // unused - reserved for future use
DVD_Mix_1to1 = 0x0200, // unused - reserved for future use
DVD_Mix_2to1 = 0x0400,
DVD_Mix_3to1 = 0x0800,
DVD_Mix_4to1 = 0x1000,
DVD_Mix_Lto1 = 0x2000, // mix auxillary L to channel 1 (right speaker)
DVD_Mix_Rto1 = 0x4000, // mix auxillary R to channel 1 (right speaker)
} DVD_KARAOKE_DOWNMIX;
typedef struct tagDVD_AudioAttributes
{
DVD_AUDIO_APPMODE AppMode;
BYTE AppModeData;
DVD_AUDIO_FORMAT AudioFormat; // Use GetKaraokeAttributes()
LCID Language; // 0 if no language is present
DVD_AUDIO_LANG_EXT LanguageExtension; // (captions, if for children etc)
BOOL fHasMultichannelInfo; // multichannel attributes are present (Use GetMultiChannelAudioAttributes())
DWORD dwFrequency; // in hertz (48k, 96k)
BYTE bQuantization; // resolution (16, 20, 24 bits etc), 0 is unknown
BYTE bNumberOfChannels; // 5.1 AC3 has 6 channels
DWORD dwReserved[2];
} DVD_AudioAttributes;
typedef struct tagDVD_MUA_MixingInfo
{
// surround sound mixing information applied when:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -