TIEMediaFoundationSourceReader.GetCurrentMediaType
Declaration
function GetCurrentMediaType(streamIndex: integer): TIEDictionary;
function GetCurrentMediaType(const streamType: WideString): TIEDictionary;
Description
Returns the actual media type for the specified stream.
Applications should call GetCurrentMediaType to check the actual selected media type after a call to SetMediaTypeXXX or SelectMediaType.
See
GetMediaType for the list of keys in the resulting dictionary.
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 |
// Get the actual video format (ie MJPEG may be converted to YUY2)
with ImageEnView1.IO.MediaFoundationSourceReader.GetCurrentMediaType(mmf_VIDEO_STREAM) do
begin
Label4.Caption := Format('Actual video format: %d x %d %.1f fps %s',
[GetInteger(IEFRAMEWIDTH_DICT_KEY), // width
GetInteger(IEFRAMEHEIGHT_DICT_KEY), // height
GetDouble(IEFRAMERATE_DICT_KEY), // frame rate
GetString(IESUBTYPE_DICT_KEY) // subtype = color space
]);
end;
See Also
◼GetMediaType◼GetMediaTypesCount◼SelectMediaType◼SetMediaTypeAudio◼SetMediaTypeCustom◼SetMediaTypeVideo