open stream in qt interface

This forum is about all development around libVLC.
kj90
Blank Cone
Blank Cone
Posts: 15
Joined: 25 Jun 2010 21:46

open stream in qt interface

Postby kj90 » 14 Jul 2010 21:55

I open and play a stream using the code below. When I run the program, a qt interface of vlc opens up but the stream opens and plays in another window. How would I get the stream to play in the qt interface instead of a separate window?

Code: Select all

const char * const vlc_args[] = { "-I", "qt", "--ignore-config", "--plugin-path=..\\vlc\\include\\vlc", }; libvlc_instance_t * inst; libvlc_media_player_t *mp; libvlc_media_t *m; inst = libvlc_new (sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args); libvlc_add_intf(inst, NULL); m = libvlc_media_new_path (inst, "rtp://239.255.0.12:1234"); mp = libvlc_media_player_new_from_media (m); libvlc_media_player_set_media(mp, m); libvlc_media_release (m); libvlc_media_player_play (mp); Sleep(10000); libvlc_media_player_stop (mp); libvlc_media_player_release (mp); libvlc_release (inst);

ivoire
Cone that earned his stripes
Cone that earned his stripes
Posts: 413
Joined: 20 Aug 2008 11:29
VLC version: trunk
Operating System: linux (debian sid)
Contact:

Re: open stream in qt interface

Postby ivoire » 20 Jul 2010 10:50

The qt interface shows up because you gave '-I qt' as a parameter to libvlc_new. If you don't want the interface to shows up, just remove theses parameters.
To have the video in the qt interface from libvlc maybe you can try to use "libvlc_add_intf(inst, "qt");"

But I'm not sure to understand what you want to do.

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

Re: open stream in qt interface

Postby Rémi Denis-Courmont » 20 Jul 2010 17:31

The interface shows up because you called libvlc_add_intf()... Why the heck do you call that function if you don't want to spawn an interface!!!
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

maitrepiet
Blank Cone
Blank Cone
Posts: 69
Joined: 27 Oct 2009 14:44

Re: open stream in qt interface

Postby maitrepiet » 09 Jul 2011 12:02

I would like that the video plays within the Qt interface window, but it doesn't.
How can I force the playback of the video in Qt?
I tried creating the libvlc instance with the -I Qt option and by adding the Qt interface afterwards.
None of them work. The video is always played back in a seperate window (Direct3D Output)

How could I do this?

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

Re: open stream in qt interface

Postby Rémi Denis-Courmont » 10 Jul 2011 10:09

That works fine. VLC itself is doing exactly that.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

maitrepiet
Blank Cone
Blank Cone
Posts: 69
Joined: 27 Oct 2009 14:44

Re: open stream in qt interface

Postby maitrepiet » 11 Jul 2011 21:38

Well, not entirely.
What happens for me is that I get 2 windows:
1 with the standard QT interface, a black screen with the traffic cone, and an other in which the video plays.
The controls of the QT interface have no effect on the video that is playing.

What I really want is only one window with the qt interface as primary control. However I still need the possibility to control the video from my c-program as well.

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

Re: open stream in qt interface

Postby Rémi Denis-Courmont » 12 Jul 2011 09:20

That is not supported and never will be.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

pramodkalva
New Cone
New Cone
Posts: 8
Joined: 17 Aug 2016 12:11
VLC version: 2.1.6
Operating System: Linux

Re: open stream in qt interface

Postby pramodkalva » 17 Aug 2016 12:41

libvlc_add_intf(inst, "qt"); has no effect just opens a Dummy QT Interface ,The controls of the QT interface have no effect on the video that is playing on the other window.

1)streaming a mp4 file using libvlc code with -verbose on in the code,
vout window xid module matching field is "any",because of this video is streaming in xcb_window with no user controls.

main video output debug: Opening vout display wrapper
[0x2ac134001248] main vout display debug: looking for vout display module matching "any": 12 candidates
[0x2ac1340040a8] main window debug: looking for vout window xid module matching "any": 4 candidates
[0x2ac1340040a8] main window debug: using vout window xid module "xcb_window"
[0x2ac1340082c8] main inhibit debug: looking for inhibit module matching "any": 2 candidates
[0x2ac1340082c8] dbus_screensaver inhibit debug: cannot find service org.freedesktop.ScreenSaver
[0x2ac1340082c8] dbus_screensaver inhibit debug: cannot find service org.freedesktop.PowerManagement.Inhibit
[0x2ac1340082c8] dbus_screensaver inhibit debug: cannot find service org.mate.SessionManager
[0x2ac1340082c8] dbus_screensaver inhibit debug: cannot find service org.gnome.SessionManager
[0x2ac1340082c8] main inhibit debug: using inhibit module "xdg_screensaver"
[0x2ac134001248] xcb_xv vout display debug: connected to X11.0 server
[0x2ac134001248] xcb_xv vout display debug: vendor : The X.Org Foundation


2)streaming a mp4 file using vlc from terminal with -verbose on,
vlc -vvv video.mp4
vout window xid module matching with qt4 interface and vout window is qt4 which has full user controls ,If vlc player is able to stream video with QT interface ,their should be a way to do the same thing from the c code ,if anyone has streamed the video with QT interface through libvlc code please let me know?

main video output debug: Opening vout display wrapper
[0x7ff234001248] main vout display debug: looking for vout display module matching "any": 12 candidates
[0x7ff2340040a8] main window debug: looking for vout window xid module matching "qt4,any": 4 candidates
[0x7ff2340040a8] qt4 window debug: requesting video window...
[0x1b316d8] qt4 interface debug: Video was requested 0, 0
[0x7ff2340040a8] main window debug: using vout window xid module "qt4"
[0x7ff2340042f8] main inhibit debug: looking for inhibit module matching "any": 2 candidates
[0x7ff2340042f8] dbus_screensaver inhibit debug: cannot find service org.freedesktop.ScreenSaver
[0x7ff2340042f8] dbus_screensaver inhibit debug: cannot find service org.freedesktop.PowerManagement.Inhibit
[0x7ff2340042f8] dbus_screensaver inhibit debug: cannot find service org.mate.SessionManager
[0x7ff2340042f8] dbus_screensaver inhibit debug: cannot find service org.gnome.SessionManager
[0x7ff2340042f8] main inhibit debug: using inhibit module "xdg_screensaver"
[0x7ff234001248] xcb_xv vout display debug: connected to X11.0 server
[0x7ff234001248] xcb_xv vout display debug: vendor : The X.Org Foundation.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 18 guests