[Interest] QtQuick and Video
Robert Voinea
rvoinea at gmail.com
Mon Nov 5 12:54:57 CET 2012
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! :)
--
Robert Voinea
Software Engineer
+4 0740 467 262
Don't take life too seriously. You'll never get out of it alive.
(Elbert Hubbard)
More information about the Interest
mailing list