[Interest] QtQuick and Video

Robert Voinea rvoinea at gmail.com
Mon Nov 5 14:42:54 CET 2012


On Monday 05 November 2012 18:38:07 Pritam wrote:
> On Monday 05 November 2012 05:24 PM, Robert Voinea wrote:
> > Hi
> > 
> > Has anyone tried the QtQuick 1.0/1.1 and Video combination?
> > 
> > I have to implement a simple interface for several video streaming sources
> > in QML (one video "window" and several buttons that change the video
> > source) and I don't seem to get it right.
> > 
> > I am using ubuntu 12.10.
> > 
> > QtMultimediaKit is installed, and phonon-backend-vlc... and
> > phonon-backend-
> > gstreamer. In system settings I have set vlc as the preffered phonon
> > backend... But it get this on the console when I try to load a simple
> > video
> > 
> > (captured with VLC from my laptop's webcam):
> > 	(test:11708): GStreamer-CRITICAL **: gst_object_ref: assertion `object 
!=
> > 
> > NULL' failed
> > 
> > 	(test:11708): GStreamer-CRITICAL **: gst_object_ref: assertion `object 
!=
> > 
> > NULL' failed
> > 
> > 	(test:11708): GStreamer-CRITICAL **: gst_element_set_state: assertion
> > 
> > `GST_IS_ELEMENT (element)' failed
> > Apparently phonon ignores the vlc backend and always uses gstreamer.
> > (any ideea how can I force phonon to use the vlc backend instead of
> > gstreamer?)
> > At this point I don't use streams... but a single file (OGG/Theora).
> > This is my test file:
> > 
> > import Qt 4.7
> > import QtMultimediaKit 1.1
> > Rectangle
> > {
> > 
> > 	id: rootWindow
> > 	width: 1024
> > 	height: 768
> > 	Video
> > 	{
> > 	
> > 		id: video
> > 		width: 640
> > 		height: 480
> > 		anchors
> > 		{
> > 		
> > 			centerIn: parent
> > 		
> > 		}
> > 		fillMode: Video.PreserveAspectFit
> > 		source: 'test.ogv'
> > 	
> > 	}
> > 
> > }
> > 
> > I have tried with both gstreamer and vlc backends. I don't care which one
> > I
> > have to use as long as I can set the source as an URL...
> > 
> > At the moment I am considering writing my own QML element that displays a
> > video stream using (probably) the native vlc API... or something like
> > this:
> > http://www.meegoexperts.com/2011/09/phonon-video-player-qml/.
> > 
> > Thank you in advance! :)
> 
> QtMultimediaKit or QtMultimedia doesnt depend on phonon. The backend for
> them on Linux is GStreamer.
> If you have gstreamer installed and still not able to play, test that
> gstreamer plugins required for your media are installed.
> To test that, you can try playing your media in Totem, it has plugin
> discovery built in. If it plays problem is with your Qt Build (if you
> built Qt yourself) or your qt code. If doesn't play it will tell you
> which  plugins to install.


Thank you for clearing that up. 
I had the impression that QtMultimediaKit depended on phonon... 





More information about the Interest mailing list