ImageEn, unit iemmf

TIEMediaFoundationSourceReader.IndexOfFirstStream

TIEMediaFoundationSourceReader.IndexOfFirstStream


Declaration

function IndexOfFirstStream(const streamType: WideString): integer;


Description

Returns the index of first stream of the specified type, or -1 if the stream type is not found.

Parameter Description
streamType A string representing the stream type. Can be any one of the values accepted by GetStreamType


Example

// Search for audio stream and enables audio renderer for that stream
audioStreamIndex := ImageEnView1.IO.MediaFoundationSourceReader.IndexOfFirstStream(mmf_AUDIO_STREAM);
ImageEnView1.IO.MediaFoundationSourceReader.SetSelectedStreams(audioStreamIndex, true);
ImageEnView1.IO.MediaFoundationSourceReader.SetMediaTypeAudio(audioStreamIndex, 'PCM');
ImageEnView1.IO.MediaFoundationSourceReader.PushNotifyReceiver( TIEMediaFoundationAudioRenderer.Create(audioStreamIndex) );


See Also

 GetStreamType
 StreamCount