libVLCSharp VideoView under transparent panel

This forum is about all development around libVLC.
user1qaz2wsx
New Cone
New Cone
Posts: 2
Joined: 09 Mar 2023 00:16

libVLCSharp VideoView under transparent panel

Postby user1qaz2wsx » 09 Mar 2023 00:26

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libVLCSharp VideoView under transparent panel

Postby Rémi Denis-Courmont » 09 Mar 2023 19:19

LibVLC draws where it's told to. It doesn't know about other windows above or below it.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

mfkl
Developer
Developer
Posts: 740
Joined: 13 Jun 2017 10:41

Re: libVLCSharp VideoView under transparent panel

Postby mfkl » 13 Mar 2023 10:56

Are you using WinForms or WPF? Can you share a minimal repro on github I could just clone and run? Thanks
https://mfkl.github.io

user1qaz2wsx
New Cone
New Cone
Posts: 2
Joined: 09 Mar 2023 00:16

Re: libVLCSharp VideoView under transparent panel

Postby user1qaz2wsx » 21 Mar 2023 16:08

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.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 15 guests