Page 1 of 1

libVLCSharp VideoView under transparent panel

Posted: 09 Mar 2023 00:26
by user1qaz2wsx
I need to be able to display/draw on a transparent panel that is positioned over the VideoView. Everything works fine until I start streaming, then I can no longer draw anything on the panel.

Does anyone know how to get the panel to the foreground(or canvas to the background) to display? It seems that once vlc starts, it assumes the top most position and can't be moved back. I understand if this has nothing to do with libvlc and is a Forms thing. Jut hoping someone else has needed to place text over the view.

If this is the wrong place for this type of question, I apologize.

Re: libVLCSharp VideoView under transparent panel

Posted: 09 Mar 2023 19:19
by RĂ©mi Denis-Courmont
LibVLC draws where it's told to. It doesn't know about other windows above or below it.

Re: libVLCSharp VideoView under transparent panel

Posted: 13 Mar 2023 10:56
by mfkl
Are you using WinForms or WPF? Can you share a minimal repro on github I could just clone and run? Thanks

Re: libVLCSharp VideoView under transparent panel

Posted: 21 Mar 2023 16:08
by user1qaz2wsx
Thanks for the responses. I've been out on vacation. In the process of putting together the simplest example possible, I think I've discovered that what I'm asking for is not possible.

Apparently, Windows Forms don't allow you to create a control that is both double buffered and transparent. You can only have one or the other. There are ways to fake it, but they will not work for my application. I can create a transparent panel over an image, but I can't draw on it the way I want to. If I fix the drawing, the background goes black and the drawing looks great.

Really, all I want to do is to be able to draw rectangles on the video in real-time. Meaning, click-hold-drag and draw a rectangle on top of the video.

I think the only feasible solution for me now is to attempt to draw my items on the actual video frames themselves before they are rendered. I will probably have to open a new issue as I'm sure this will be more difficult that what I was originally trying to do if it were possible.