[Interest] One MediaPlayer on two VideoOutput elements?
Mandeep Sandhu
mandeepsandhu.chd at gmail.com
Fri May 2 11:30:01 CEST 2014
Replying to the list...
On Fri, May 2, 2014 at 2:43 PM, Neuer User <auslands-kv at gmx.de> wrote:
> Am 02.05.2014 11:04, schrieb Mandeep Sandhu:
>> On Fri, May 2, 2014 at 12:52 PM, Neuer User <auslands-kv at gmx.de> wrote:
>>> Just wanted to try out the QmlVideoTee example, but it seems I am
>>> missing something:
>>>
>>> qabstractvideosurface.h: No such file or directory
>>> #include <qabstractvideosurface.h>
>> Try this instead:
>>
>> #include <QAbstractVideoSurface>
>>
>> Qt headers that users use are w/o the ".h" suffix.
>>
>> HTH,
>> -mandeep
>>
> Thanks. I just got it working by adding:
>
> QT += qml multimedia
>
> to the .pro file.
>
> What would be the preferred solution? This way or your suggestion?
Both actually! :) The module include that you did (QT += ...) is a
MUST as that tells qmake which other 'extension' modules your app
needs (for linking and header includes). By default only the QtCore
and QtGui are part of the QT config.
As for the include header, it's standard practice in Qt application
code to include C++ style headers (i.e w/o .h suffix) and use the
camel-case notation for header name.
HTH,
-mandeep
>
>>> ^
>>>
>>> Where do I find that file?
>>>
>>> Cheers
>>>
>>> Michael
>>>
>>> Am 30.04.2014 17:22, schrieb Lopes Yoann:
>>>> On Apr 30, 2014, at 12:36 PM, Neuer User wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> I need to show an RTSP video played by a MediaPlayer element on two
>>>>> different VideoOutput elements. I can't get it to work. Only the last
>>>>> VideoOutput in the code works.
>>>>>
>>>>> Am I doing something wrong? Or is this just not expected to work? If so,
>>>>> how should I achieve this? I don't want to use shader elements as this
>>>>> certainly reduces performance a lot.
>>>> It's currently a limitation. The fact that it can be done in QML is misleading, it's more clear with the C++ API where you can only set a video output on a media source, and not the other way around.
>>>> We should support this in a future release, it doesn't involve many changes.
>>>>
>>>> In the meantime the easiest solution, as you mentioned, is to use the ShaderEffect element.
>>>>
>>>> There are other (hack-ish) solutions to do this but it requires more work. Here's an example doing just that: https://github.com/marseyeah/QmlVideoTee
>>>>
>>>
>>> _______________________________________________
>>> Interest mailing list
>>> Interest at qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/interest
>
>
More information about the Interest
mailing list