ImageEn, unit iemmf

TIEMediaFoundationSourceReader.SelectMediaType

TIEMediaFoundationSourceReader.SelectMediaType


Declaration

function SelectMediaType(streamIndex: integer; mediaTypeIndex: integer): boolean;
function SelectMediaType(const streamType: WideString; mediaTypeIndex: integer): boolean;


Description

Select one of the native media types of the specified stream.
If the media type is not natively supported by ImageEn a compatible one is automatically selected (e.g. 'MJPG->YUY2').
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
mediaTypeIndex Index of native media type to select


Example

ImageEnView1.IO.MediaFoundationSourceReader.SelectMediaType(mmf_VIDEO_STREAM, ListBox1.ItemIndex);


See Also

 GetMediaType
 GetMediaTypesCount
 SetMediaTypeAudio
 SetMediaTypeCustom
 SetMediaTypeVideo
 GetCurrentMediaType