TIEMediaFoundationSourceReader.DelayFramePost
Declaration
property DelayFramePost: Boolean;
Description
When True (default for file/URL sources), video samples are paced to roughly match the media timeline.
When no audio stream is selected, pacing uses Sleep on the Media Foundation callback thread.
When an audio stream is selected, Sleep is skipped (it would block audio on the shared callback thread);
instead
TIEMediaFoundationAudioRenderer paces via SinkWriter.WriteSample.
Leave this True when using
TIEMediaFoundationAudioRenderer. Setting it to False free-runs video and looks choppy.
Default: False (True after
SetFileInput /
SetURLInput)
Example
// Keep DelayFramePost True when enabling audio rendering:
ImageEnView1.IO.MediaFoundationSourceReader.SetSelectedStreams(mmf_AUDIO_STREAM, True);
ImageEnView1.IO.MediaFoundationSourceReader.PushNotifyReceiver( TIEMediaFoundationAudioRenderer.Create(audioStreamIndex) );