📄 dvdmedia.h
字号:
#define AM_DVD_CGMS_COPY_PERMITTED 0x00000000
#define AM_DVD_CGMS_COPY_ONCE 0x00000010
#define AM_DVD_CGMS_NO_COPY 0x00000018
#define AM_DVD_COPYRIGHT_MASK 0x00000040
#define AM_DVD_NOT_COPYRIGHTED 0x00000000
#define AM_DVD_COPYRIGHTED 0x00000040
#define AM_DVD_SECTOR_PROTECT_MASK 0x00000020
#define AM_DVD_SECTOR_NOT_PROTECTED 0x00000000
#define AM_DVD_SECTOR_PROTECTED 0x00000020
// -----------------------------------------------------------------------
// video format blocks
// -----------------------------------------------------------------------
enum AM_MPEG2Level {
AM_MPEG2Level_Low = 1,
AM_MPEG2Level_Main = 2,
AM_MPEG2Level_High1440 = 3,
AM_MPEG2Level_High = 4
};
enum AM_MPEG2Profile {
AM_MPEG2Profile_Simple = 1,
AM_MPEG2Profile_Main = 2,
AM_MPEG2Profile_SNRScalable = 3,
AM_MPEG2Profile_SpatiallyScalable = 4,
AM_MPEG2Profile_High = 5
};
#define AMINTERLACE_IsInterlaced 0x00000001 // if 0, other interlace bits are irrelevent
#define AMINTERLACE_1FieldPerSample 0x00000002 // else 2 fields per media sample
#define AMINTERLACE_Field1First 0x00000004 // else Field 2 is first; top field in PAL is field 1, top field in NTSC is field 2?
#define AMINTERLACE_UNUSED 0x00000008 //
#define AMINTERLACE_FieldPatternMask 0x00000030 // use this mask with AMINTERLACE_FieldPat*
#define AMINTERLACE_FieldPatField1Only 0x00000000 // stream never contains a Field2
#define AMINTERLACE_FieldPatField2Only 0x00000010 // stream never contains a Field1
#define AMINTERLACE_FieldPatBothRegular 0x00000020 // There will be a Field2 for every Field1 (required for Weave?)
#define AMINTERLACE_FieldPatBothIrregular 0x00000030 // Random pattern of Field1s and Field2s
#define AMINTERLACE_DisplayModeMask 0x000000c0
#define AMINTERLACE_DisplayModeBobOnly 0x00000000
#define AMINTERLACE_DisplayModeWeaveOnly 0x00000040
#define AMINTERLACE_DisplayModeBobOrWeave 0x00000080
#define AMCOPYPROTECT_RestrictDuplication 0x00000001 // duplication of this stream should be restricted
#define AMMPEG2_DoPanScan 0x00000001 //if set, the MPEG-2 video decoder should crop output image
// based on pan-scan vectors in picture_display_extension
// and change the picture aspect ratio accordingly.
#define AMMPEG2_DVDLine21Field1 0x00000002 //if set, the MPEG-2 decoder must be able to produce an output
// pin for DVD style closed caption data found in GOP layer of field 1
#define AMMPEG2_DVDLine21Field2 0x00000004 //if set, the MPEG-2 decoder must be able to produce an output
// pin for DVD style closed caption data found in GOP layer of field 2
#define AMMPEG2_SourceIsLetterboxed 0x00000008 //if set, indicates that black bars have been encoded in the top
// and bottom of the video.
#define AMMPEG2_FilmCameraMode 0x00000010 //if set, indicates "film mode" used for 625/50 content. If cleared,
// indicates that "camera mode" was used.
#define AMMPEG2_LetterboxAnalogOut 0x00000020 //if set and this stream is sent to an analog output, it should
// be letterboxed. Streams sent to VGA should be letterboxed only by renderers.
#define AMMPEG2_DSS_UserData 0x00000040 //if set, the MPEG-2 decoder must process DSS style user data
#define AMMPEG2_DVB_UserData 0x00000080 //if set, the MPEG-2 decoder must process DVB style user data
#define AMMPEG2_27MhzTimebase 0x00000100 //if set, the PTS,DTS timestamps advance at 27MHz rather than 90KHz
#define AMMPEG2_WidescreenAnalogOut 0x00000200 //if set and this stream is sent to an analog output, it should
// be in widescreen format (4x3 content should be centered on a 16x9 output).
// Streams sent to VGA should be widescreened only by renderers.
// PRESENT in dwReserved1 field in VIDEOINFOHEADER2
#define AMCONTROL_USED 0x00000001 // Used to test if these flags are supported. Set and test for AcceptMediaType.
// If rejected, then you cannot use the AMCONTROL flags (send 0 for dwReserved1)
#define AMCONTROL_PAD_TO_4x3 0x00000002 // if set means display the image in a 4x3 area
#define AMCONTROL_PAD_TO_16x9 0x00000004 // if set means display the image in a 16x9 area
typedef struct tagVIDEOINFOHEADER2 {
RECT rcSource;
RECT rcTarget;
DWORD dwBitRate;
DWORD dwBitErrorRate;
REFERENCE_TIME AvgTimePerFrame;
DWORD dwInterlaceFlags; // use AMINTERLACE_* defines. Reject connection if undefined bits are not 0
DWORD dwCopyProtectFlags; // use AMCOPYPROTECT_* defines. Reject connection if undefined bits are not 0
DWORD dwPictAspectRatioX; // X dimension of picture aspect ratio, e.g. 16 for 16x9 display
DWORD dwPictAspectRatioY; // Y dimension of picture aspect ratio, e.g. 9 for 16x9 display
union {
DWORD dwControlFlags; // use AMCONTROL_* defines, use this from now on
DWORD dwReserved1; // for backward compatiblity (was "must be 0"; connection rejected otherwise)
};
DWORD dwReserved2; // must be 0; reject connection otherwise
BITMAPINFOHEADER bmiHeader;
} VIDEOINFOHEADER2;
typedef struct tagMPEG2VIDEOINFO {
VIDEOINFOHEADER2 hdr;
DWORD dwStartTimeCode; // ?? not used for DVD ??
DWORD cbSequenceHeader; // is 0 for DVD (no sequence header)
DWORD dwProfile; // use enum MPEG2Profile
DWORD dwLevel; // use enum MPEG2Level
DWORD dwFlags; // use AMMPEG2_* defines. Reject connection if undefined bits are not 0
DWORD dwSequenceHeader[1]; // DWORD instead of Byte for alignment purposes
// For MPEG-2, if a sequence_header is included, the sequence_extension
// should also be included
} MPEG2VIDEOINFO;
#define SIZE_MPEG2VIDEOINFO(pv) (FIELD_OFFSET(MPEG2VIDEOINFO, dwSequenceHeader[0]) + (pv)->cbSequenceHeader)
// do not use
#define MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)
// use this macro instead, the previous only works for MPEG1VIDEOINFO structures
#define MPEG2_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->dwSequenceHeader)
//===================================================================================
// flags for dwTypeSpecificFlags in AM_SAMPLE2_PROPERTIES which define type specific
// data in IMediaSample2
//===================================================================================
#define AM_VIDEO_FLAG_FIELD_MASK 0x0003L // use this mask to check whether the sample is field1 or field2 or frame
#define AM_VIDEO_FLAG_INTERLEAVED_FRAME 0x0000L // the sample is a frame (remember to use AM_VIDEO_FLAG_FIELD_MASK when using this)
#define AM_VIDEO_FLAG_FIELD1 0x0001L // the sample is field1 (remember to use AM_VIDEO_FLAG_FIELD_MASK when using this)
#define AM_VIDEO_FLAG_FIELD2 0x0002L // the sample is the field2 (remember to use AM_VIDEO_FLAG_FIELD_MASK when using this)
#define AM_VIDEO_FLAG_FIELD1FIRST 0x0004L // if set means display field1 first, else display field2 first.
// this bit is irrelavant for 1FieldPerSample mode
#define AM_VIDEO_FLAG_WEAVE 0x0008L // if set use bob display mode else weave
#define AM_VIDEO_FLAG_IPB_MASK 0x0030L // use this mask to check whether the sample is I, P or B
#define AM_VIDEO_FLAG_I_SAMPLE 0x0000L // I Sample (remember to use AM_VIDEO_FLAG_IPB_MASK when using this)
#define AM_VIDEO_FLAG_P_SAMPLE 0x0010L // P Sample (remember to use AM_VIDEO_FLAG_IPB_MASK when using this)
#define AM_VIDEO_FLAG_B_SAMPLE 0x0020L // B Sample (remember to use AM_VIDEO_FLAG_IPB_MASK when using this)
#define AM_VIDEO_FLAG_REPEAT_FIELD 0x0040L // if set means display the field which has been displayed first again after displaying
// both fields first. This bit is irrelavant for 1FieldPerSample mode
// -----------------------------------------------------------------------
// AM_KSPROPSETID_DvdKaraoke property set definitions
// -----------------------------------------------------------------------
typedef struct tagAM_DvdKaraokeData
{
DWORD dwDownmix; // bitwise OR of AM_DvdKaraoke_Downmix flags
DWORD dwSpeakerAssignment; // AM_DvdKaraoke_SpeakerAssignment
} AM_DvdKaraokeData;
typedef enum {
AM_PROPERTY_DVDKARAOKE_ENABLE = 0, // BOOL
AM_PROPERTY_DVDKARAOKE_DATA = 1,
} AM_PROPERTY_DVDKARAOKE;
// -----------------------------------------------------------------------
// AM_KSPROPSETID_TSRateChange property set definitions for time stamp
// rate changes.
// -----------------------------------------------------------------------
typedef enum {
AM_RATE_SimpleRateChange = 1, // rw, use AM_SimpleRateChange
AM_RATE_ExactRateChange = 2, // rw, use AM_ExactRateChange
AM_RATE_MaxFullDataRate = 3, // r, use AM_MaxFullDataRate
AM_RATE_Step = 4 // w, use AM_Step
} AM_PROPERTY_TS_RATE_CHANGE;
// -------------------------------------------------------------------
// AM_KSPROPSETID_DVD_RateChange property set definitions for new DVD
// rate change scheme.
// -------------------------------------------------------------------
typedef enum {
AM_RATE_ChangeRate = 1, // w, use AM_DVD_ChangeRate
AM_RATE_FullDataRateMax = 2, // r, use AM_MaxFullDataRate
AM_RATE_ReverseDecode = 3, // r, use LONG
AM_RATE_DecoderPosition = 4, // r, use AM_DVD_DecoderPosition
AM_RATE_DecoderVersion = 5 // r, use LONG
} AM_PROPERTY_DVD_RATE_CHANGE;
typedef struct {
// this is the simplest mechanism to set a time stamp rate change on
// a filter (simplest for the person setting the rate change, harder
// for the filter doing the rate change).
REFERENCE_TIME StartTime; //stream time at which to start this rate
LONG Rate; //new rate * 10000 (decimal)
} AM_SimpleRateChange;
typedef struct {
REFERENCE_TIME OutputZeroTime; //input TS that maps to zero output TS
LONG Rate; //new rate * 10000 (decimal)
} AM_ExactRateChange;
typedef LONG AM_MaxFullDataRate; //rate * 10000 (decimal)
typedef DWORD AM_Step; // number of frame to step
// New rate change property set, structs. enums etc.
typedef struct {
REFERENCE_TIME StartInTime; // stream time (input) at which to start decoding at this rate
REFERENCE_TIME StartOutTime; // reference time (output) at which to start showing at this rate
LONG Rate; // new rate * 10000 (decimal)
} AM_DVD_ChangeRate ;
typedef LONGLONG AM_DVD_DecoderPosition ;
typedef enum {
DVD_DIR_FORWARD = 0,
DVD_DIR_BACKWARD = 1
} DVD_PLAY_DIRECTION ;
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // __DVDMEDIA_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -