Search code examples
c#videodirectxaudiovideoplayback

Display a Control over video playing via Microsoft.DirectX.AudioVideoPlayback


I have a C# Windows Form application that plays local videos. I would like to overlay a small form with controls over the video while it is playing. The video is owned by a panel and I have tried to create another panel that contains controls like a button and textbox and tried to brind the whole panel forward and send the video back, but the video stays on top.

Any ideas?


Solution

  • You typically cannot place controls on top of video without having flickers and unwanted artifacts. This comes from the fact that video playback allocates specific video hardware resources to stream video and streaming takes place separately from the rest of UI. Applications such as players "mix" overlay images (including those which mimic controls) into video or otherwise display them through specialized APIs, those are not regular controls.

    The easiest solution for you is to place controls side by side to the video, without putting one on top of the other.