[Interest] QML Video with Phonon

Mark markg85 at gmail.com
Sat Dec 8 16:45:12 CET 2012


On Sat, Dec 8, 2012 at 11:21 AM, Bo Thorsen <bo at fioniasoftware.dk> wrote:
> Den 07-12-2012 15:36, Mark skrev:
>> On Fri, Dec 7, 2012 at 3:09 PM, Robert Voinea<rvoinea at gmail.com>  wrote:
>>> Hi list
>>>
>>>
>>>
>>> I have tried to create a QML Item for video playback using phonon. For that
>>> I am creating a video widget and display it in a QDeclarativeItem via a
>>> QGraphicsProxyWidget.
>>>
>>>
>>>
>>> This is the tutorial I have used for inspiration
>>>
>>> http://www.meegoexperts.com/2011/09/phonon-video-player-qml/
>>>
>>>
>>>
>>> Everything works OK if the video is local or if the network path to the
>>> video source is OK (eg: reachable and not too slow).
>>>
>>>
>>>
>>> If the network path is NOT ok (eg: video source is not available or network
>>> is slow) then the GUI freezes until the video is available... or a timeout
>>> is reached. This is unacceptable for my project.
>>>
>>>
>>>
>>> I have been using for testing a local file AND a network webcam via RTSP
>>> protocol. Phonon backend vlc.
>>>
>>>
>>>
>>> In the phonon documenation it is said that:
>>>
>>> "Note also that most of the functions in this class are asynchronous. For
>>> instance, a media source may not play immediately after you call the play()
>>> function."
>>>
>>>
>>>
>>> Do you have some hints on how to make the GUI not to freeze if the media
>>> cannot be reached?... or while the media is loading?...
>>>
>>>
>>>
>>> (As a backup I could be using QX11Embed and vlc... although I could not find
>>> the wid command line parameter for vlc...)
>>>
>>>
>>>
>>> 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)
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Interest mailing list
>>> Interest at qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/interest
>>>
>> I don't know if this "advice" is recommended, but going to give it anyway :)
>>
>> You could simply put all media handling in a thread and send the
>> updated images through signals/slots. That will keep your GUI
>> responsive, but will give you some pain to get it working. Someone
>> else might know a better solution..?
>
> That is going to be horribly slow, unfortunately.
>
> Instead of creating your own solution (unless that's what you want try,
> of course), search the net for video implementations. There are quite a
> lot of them out there.
>
> Bo Thorsen.
> Fionia Software.
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

But the GUI will be fluid ;-)

Just for the record, Phonon has it's own set of QML elements to play
media through phonon. Qt5 also has QML elements, but those are based
on gstreamer. That's about all "real" possibilities in existence. I
don't know of more stuff.



More information about the Interest mailing list