📄 dvdif.idl
字号:
// GetAllSPRMs
// Returns the current contents of all System Parameter Registers.
// See DVD-Video spec for use of individual registers.
HRESULT GetAllSPRMs
( [out] SPRMARRAY * pRegisterArray
);
// GetAllGPRMs
// Returns the current contents of all General Parameter Registers.
// Use of GPRMs is title specific.
HRESULT GetAllGPRMs
( [out] GPRMARRAY * pRegisterArray
);
// GetAudioLanguageString
// Returns the language of the specified stream within the current
// title. Does not return languages for menus. Sets *pLanguage=0 if
// if the stream does not include language.
// Use GetLocaleInfo(*pLanguage, LOCALE_SENGLANGUAGE, pszString, cbSize)
// to create a human readable string name from the result LCID.
HRESULT GetAudioLanguage
( [in] ULONG nStream,
[out] LCID * pLanguage
);
// GetSubpictureLanguageString
// Returns the language of the specified stream within the current
// title. Does not return languages for menus. Sets *pLanguage=0 if
// if the stream does not include language.
// Use GetLocaleInfo(*pLanguage, LOCALE_SENGLANGUAGE, pszString, cbSize)
// to create a human readable string name from the result LCID.
HRESULT GetSubpictureLanguage
( [in] ULONG nStream,
[out] LCID * pLanguage
);
// GetTitleAttributes
// Returns attributes of all video, audio, and subpicture
// streams for the specified title including menus.
// If nTitle == 0xffffffff, attributes for the current title are returned.
HRESULT GetTitleAttributes
( [in] ULONG nTitle, // requested title number
[out] DVD_ATR * pATR
);
// GetVMGAttributes
// Returns attributes of all video, audio, and subpicture
// streams for Video Manager Menus. Some menus, such as the DVD_MENU_Title
// are in a separate group of streams called the VMG (Video Manager) and
// are not associated with any particular title number.
HRESULT GetVMGAttributes
( [out] DVD_ATR * pATR
);
// GetCurrentVideoAttributes
// Returns the video attributes for the current title or menu.
HRESULT GetCurrentVideoAttributes
( [out] DVD_VideoATR *pATR
);
// GetCurrentAudioAttributes
// Returns the video attributes for the stream in the current
// title or menu.
HRESULT GetCurrentAudioAttributes
( [out] DVD_AudioATR *pATR
);
// GetCurrentSubpictureAttributes
// Returns the video attributes for the stream in the current
// title or menu.
HRESULT GetCurrentSubpictureAttributes
( [out] DVD_SubpictureATR *pATR
);
// GetCurrentVolumeInfo
// Returns current DVD volume info.
HRESULT GetCurrentVolumeInfo
( [out] ULONG *pNumOfVol, // number of volumes (disc sides?) in a volume set
[out] ULONG *pThisVolNum, // volume number for this root directory
[out] DVD_DISC_SIDE *pSide, // current disc side
[out] ULONG *pNumOfTitles // number of titles available in this volume
);
// GetDVDTextInfo
// Returns the TXTDT_MG structure, which can contain text descriptions for title
// name, volume name, producer name, vocalist name, etc. in various languages.
// refer to Section 4.1.6 and Annex A of the DVD-Video spec.
// If the buffer size passed in is insufficient (for example if cbBufSize==0),
// then E_OUTOFMEMORY is returned, and *pcbActualSize is set to the required size.
HRESULT GetDVDTextInfo
( [out, size_is(cbBufSize)] BYTE *pTextManager,
[in] ULONG cbBufSize, // buffer size passed in
[out] ULONG *pcbActualSize // amount of actual data return
);
// GetPlayerParentalLevel
// Returns the current parental level and the current country code
// that has been set in the system registers in player.
// See Table 3.3.4-1 of the DVD-Video spec for the defined parental levels.
// Valid Parental Levels = 1..8 if parental management is enabled
// 0xffffffff if parental management is disabled
// See ISO3166 : Alpha-2 Code for the country codes.
HRESULT GetPlayerParentalLevel
( [out] ULONG *pParentalLevel, // current parental level
[out] ULONG *pCountryCode // current country code
);
// GetNumberOfChapters
// Returns the number of chapters that are defined for a
// given title.
HRESULT GetNumberOfChapters
( [in] ULONG ulTitle, // Title for which number of chapters is requested
[out] ULONG *pNumberOfChapters // Number of chapters for the specified title
);
// GetTitleParentalLevels
// Returns the parental levels that are defined for a
// particular title. pParentalLevels will be combination
// of DVD_PARENTAL_LEVEL_8, DVD_PARENTAL_LEVEL_6, or
// DVD_PARENTAL_LEVEL_1 "OR"ed together
HRESULT GetTitleParentalLevels
( [in] ULONG ulTitle, // Title for which parental levels are requested
[out] ULONG *pParentalLevels // Parental levels defined for the title "OR"ed together
);
// GetRoot
// Returns the root directory that is set in the player. If a valid root
// has been found, it returns the root string. Otherwise, it returns 0 for
// pcbActualSize indicating that a valid root directory has not been found
// or initialized.
HRESULT GetRoot
( [out, size_is(cbBufSize)] LPTSTR pRoot, // pointer to buffer to get root string
[in] ULONG cbBufSize, // size of buffer passed in
[out] ULONG *pcbActualSize // size of actual data returned
);
}
//==========================================================================
//==========================================================================
//
// typedefs used by IDvdGraphBuilder interface.
//
//==========================================================================
//==========================================================================
typedef enum _AM_DVD_GRAPH_FLAGS {
AM_DVD_HWDEC_PREFER = 0x01, // default
AM_DVD_HWDEC_ONLY = 0x02,
AM_DVD_SWDEC_PREFER = 0x04,
AM_DVD_SWDEC_ONLY = 0x08,
AM_DVD_NOVPE = 0x100
} AM_DVD_GRAPH_FLAGS ;
typedef enum _AM_DVD_STREAM_FLAGS {
AM_DVD_STREAM_VIDEO = 0x01,
AM_DVD_STREAM_AUDIO = 0x02,
AM_DVD_STREAM_SUBPIC = 0x04
} AM_DVD_STREAM_FLAGS ;
typedef struct {
HRESULT hrVPEStatus ; // VPE mixing error code (0 => success)
BOOL bDvdVolInvalid ; // Is specified DVD volume invalid?
BOOL bDvdVolUnknown ; // Is DVD volume to be played not specified/not found?
BOOL bNoLine21In ; // video decoder doesn't produce line21 (CC) data
BOOL bNoLine21Out ; // can't show decoded line21 data as CC on video
int iNumStreams ; // number of DVD streams to render
int iNumStreamsFailed ; // number of streams failed to render
DWORD dwFailedStreamsFlag ; // combination of flags to indicate failed streams
} AM_DVD_RENDERSTATUS ;
//
// IDvdGraphBuilder interface to build a filter graph for DVD-Video playback.
//
[
object,
local,
uuid(FCC152B6-F372-11d0-8E00-00C04FD7C08B),
pointer_default(unique)
]
interface IDvdGraphBuilder : IUnknown {
// Returns the IGraphBuilder interface for the filtergraph used by the
// CDvdGraphBuilder object.
// Remember to *ppGB->Release() when you're done with it
HRESULT GetFiltergraph
( [out] IGraphBuilder **ppGB
) ;
// Gets specific interface pointers in the DVD-Video playback graph to
// make DVD-Video playback development easier.
// It helps get the following interfaces to control playback/show CC/
// position window/control volume etc:
// - IDvdControl, IDvdInfo
// - IAMLine21Decoder
// - IVideoWindow, IBasicVideo
// - IBasicAudio
// This method will return
// a) E_INVALIDARG if ppvIF is invalid
// b) E_NOINTERFACE if riid is an IID we don't know about
// c) VFW_E_DVD_GRAPHNOTREADY if the graph has not been built through
// RenderDvdVideoVolume() yet.
// Remember to *ppvIF->Release() when you're done with it
HRESULT GetDvdInterface
( [in] REFIID riid, // IID of the interface required
[out] void **ppvIF // returns pointer to the required interface
) ;
// Builds a filter graph according to user specs for playing back a
// DVD-Video volume.
// This method returns S_FALSE if
// 1. the graph has been either built, but either
// a) VPE mixing doesn't work (app didn't use AM_DVD_NOVPE flag)
// b) video decoder doesn't produce line21 data
// c) line21 data couldn't be rendered (decoding/mixing problem)
// d) the call specified an invalid volume path or DVD Nav couldn't
// locate any DVD-Video volume to be played.
// 2. some streams didn't render (completely), but the others have
// been rendered so that the volume can be partially played back.
// The status is indicated through the fields of the pStatus (out)
// parameter.
// About 1(a), the app will have enough info to tell the user that the
// video won't be visible unless a TV is connected to the NTSC out
// port of the DVD decoder (presumably HW in this case).
// For case 1(b) & (c), the app "can" put up a warning/informative message
// that closed captioning is not available because of the decoder.
// 1(d) helps an app to ask the user to insert a DVD-Video disc if none
// is specified/available in the drive when playback is started.
// This method builds the graph even if
// - an invalid DVD-Video volume is specified
// - the caller uses lpwszPathName = NULL to make the DVD Nav to locate
// the default volume to be played back, but DVD Nav doesn't find a
// default DVD-Video volume to be played back.
// An app can later specify the volume using IDvdControl::SetRoot()
// method.
// #2 will help the app indicate to the user that some of the streams
// can't be played.
//
// The graph is built using filters based on the dwFlags value (to use
// HW decoders or SW decoders or a mix of them).
// The dwFlags value is one of the values in AM_DVD_GRAPH_FLAGS enum
// type. The default value is AM_DVD_HWDEC_PREFER. None of the
// AM_DVD_HWDEC_xxx or AM_DVD_SWDEC_xxx flags can be mixed. However
// AM_DVD_NOVPE can be OR-ed with any of the AM_DVD_HWDEC_xxx flags.
//
// The method returns S_OK if the playback graph is built successfully
// with all the streams completely rendered and a valid DVD-Video volume
// is specified or a default one has been located.
//
// If the dwFlags specify conflicting options, E_INVALIDARG is returned.
// If the graph building fails, the method returns one of the following
// error codes:
// VFW_E_DVD_RENDERFAIL, VFW_E_DVD_DECNOTENOUGH
//
HRESULT RenderDvdVideoVolume
( [in] LPCWSTR lpcwszPathName, // Can be NULL too
[in] DWORD dwFlags, // 0 is the default (use max HW)
[out] AM_DVD_RENDERSTATUS *pStatus // returns indications of ANY failure
) ;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -