ImageEn, unit iemmf

TIEMediaFoundationSourceReader.SetMediaTypeVideo

TIEMediaFoundationSourceReader.SetMediaTypeVideo


Declaration

function SetMediaTypeVideo(streamIndex: integer; const subTypeStr: WideString; frameWidth: integer; frameHeight: integer; frameRate: double; const videoLighting: WideString): boolean;
function SetMediaTypeVideo(const subTypeStr: WideString; frameWidth: integer; frameHeight: integer; frameRate: double; const videoLighting: WideString): boolean;


Description

Creates and selects a new video media type. Media Foundation will provide a decoder to convert from native media type.
Returns False if the media type is not accepted (or a suitable conversion is not available).

Parameter Description
streamIndex Index of the stream, in the range of 0 to StreamCount - 1
streamType A string representing the stream type. Only the first stream of this type will be considered. Can be any one of the values accepted by GetStreamType
subTypeStr Specifies the video subtype
frameWidth Width of a video frame, in pixels
frameHeight Height of a video frame, in pixels
frameRate Frame rate of a video media type, in frames per second
videoLighting Specifies the optimal lighting conditions for a video media type. Allowed values are: 'Bright', 'Office', 'Dim' and 'Dark'

The Video media sub types (IESUBTYPE_DICT_KEY) are: 'RGB8', 'RGB555', 'RGB565', 'RGB24', 'RGB32', 'ARGB32', 'AI44', 'AYUV', 'YUY2', 'YVYU', 'YVU9', 'UYVY', 'NV11', 'NV12', 'YV12', 'I420', 'IYUV', 'Y210', 'Y216',
'Y410', 'Y416', 'Y41P', 'Y41T', 'Y42T', 'P210', 'P216', 'P010', 'P016', 'v210', 'v216', 'v410', 'MP43', 'MP4S', 'M4S2', 'MP4V', 'WMV1', 'WMV2', 'WMV3', 'WVC1', 'MSS1', 'MSS2',
'MPG1', 'dvsl', 'dvsd', 'dvhd', 'dv25', 'dv50', 'dvh1', 'dvc ', 'H264', 'MJPG'.


Example

ImageEnView1.IO.MediaFoundationSourceReader.SetMediaTypeVideo('RGB32', 640, 480, 30);


See Also

GetMediaType
GetMediaTypesCount
SetMediaTypeCustom
SetMediaTypeAudio
SelectMediaType
GetCurrentMediaType