Open obraunsdorf opened 5 years ago
Have you tried to call libvlc C API directly? vlc-rs is very thin wrapper for libvlc. If libvlc can initialize Qt interface correctly, vlc-rs can. If there are missing functions to do it in libvlc but not in vlc-rs, I can add them.
You're right. It seems like the problem resides in the C-API of VLC - or more likely: me using it :-D I sent the related question to the vlc-devel mailing list along with a minimal working example: https://mailman.videolan.org/pipermail/vlc-devel/2019-August/126656.html
Hi, sorry for late answer.
I don't think libVLC is really suitable to start real interfaces, but if you want to achieve this, you probably need libvlc_add_intf
instead.
Why would you want to use the Qt interface through libVLC ?
No problem, thanks for the reply anyway!
Why do you think it is not suitable?
Some time passed since I was trying all that, but I think I tried using libvlc_add_intf
...with no effect of I remember correctly. Have you been able get it done like this?
So my ultimate goal was to have the qt interface of libvlc but being able to control the player through rust. I wanted to have the qt interface because it is a nice(-ish ^^) and GUI for users to do simple tasks that I do not want to implement all over again (e.g. Choosing a folder to play every video that resides in it)
This is how far I came: https://github.com/obraunsdorf/VideoAnalysisController/blob/master/README.md
Hi,
Some time passed since I was trying all that, but I think I tried using libvlc_add_intf...with no effect of I remember correctly. Have you been able get it done like this?
Maybe check what bin/vlc.c
is doing. It's a very thin wrapper around libvlc/libvlccore, but it's not really using libvlc itself yet.
Why do you think it is not suitable?
LibVLC is not meant to be used with interface plugins (that you cannot control) and VLC (with the Qt interface) is not meant to be used through LibVLC basically. LibVLC is meant to integrate a video pipeline in an application, usually controlling the UI itself.
So my ultimate goal was to have the qt interface of libvlc but being able to control the player through rust. I wanted to have the qt interface because it is a nice(-ish ^^) and GUI for users to do simple tasks that I do not want to implement all over again (e.g. Choosing a folder to play every video that resides in it)
So you basically want to add new plugins in Rust, and especially interface control plugins. I'm very interested by writing plugins in Rust and work fulltime on stuff gravitating around VLC so you can probably ask privately or (better) on irc (ping unidan
) if you're stuck. There's multiple way to achieve this and we would need to write a libvlccore-sys
crate plus a rust wrapper around it. But there is still some blur on how maintenance for this should be achieved, especially with regards to the development version of libvlccore which has a lot of API change and is made to be unstable (in opposition with LibVLC).
Which version of VLC are you targetting and what are your needs with regards to how to integrate your plugin ?
Hi,
when I instantiate vlc using
let instance = Instance::new().unwrap();
I get a plain window filled with the video stream. Now I want to have the common Qt interface with all its menus and buttons etc. I tried to instantiate vlc usingBut still, I get a plain window only with the video stream. As you can see, I tried multiple command line arguments, but I cannot get the Qt interface.
One thing to mention: If the argument
--extraintf=qt
is specified, an additional window with the desired Qt interface opens up, but I cannot control that VLC instance through vlc-rs.Same behavior on Linux and Windows.
Can you point out something that I am missing? Are you able to start a VLC instance with the Qt interface that you can control programmatically through vlc-rs?
Thank you very much! Oliver