[Interest] QtQuick and Video

Joseph Crowell joseph.w.crowell at gmail.com
Tue Nov 6 16:35:20 CET 2012


On 11/5/2012 11:51 PM, Mark wrote:
> On Mon, Nov 5, 2012 at 2:42 PM, Robert Voinea <rvoinea at gmail.com> wrote:
>> 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...
>>
>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
> Actually, that is (partly) true. The QtMultimedia CLASSES depend on
> phonon: http://qt-project.org/doc/qt-4.8/qtmultimedia.html
> But the new QtMultimedia module isn't the same as the current
> QtMultimedia module. The reason for that (afaict) is that
> QtMultimediaKit comes from QtMobility which doesn't exist in Qt5. So
> they took components of QtMobility and put them back in Qt as modules.
>
> I hope someone else can do a better job in explaining it..
At the bottom of the linked document it states "The functionality 
provided by the Phonon Module 
<http://qt-project.org/doc/qt-4.8/phonon-module.html> is on a higher 
level and in many cases more suitable for application developers.". This 
doesn't mean the old QtMultimedia classes depended on Phonon and in 
fact, they didn't as they actually predated Phonon support. Also, if you 
look through QtMultimediaKit's source, at no point does it ever 
reference Phonon. Neither do the new QtMultimedia modules in Qt5. 
QtMultimedia/Kit does not depend on Phonon.
>
> Yeah, it's confusing. I know :)
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20121107/4ce56077/attachment.html>


More information about the Interest mailing list