>On 2015-07-05, Massimo Callegari <massimocallegari at yahoo.it> wrote:
>> Update #2 (sorry for spamming)
>>
>> I patched qgstreamervideowindow.cpp and qgstreamervideowidget.cpp to support 
>> the linuxfb platform.
>> It kinda works !!
>>
>> Screenshot here: http://pasteboard.co/1JlYRT9l.jpg
>>
>> Videos can be played hardware decoded with audio and video until the end.
>> It's definitely using the OMX plugin.

>Nice. Did you submit your work to gerrit ?

Nope, because all I've got are 8 lines of code that don't even work properly. 
The eglfs change segfaults when playing. The linuxfb change shows the video as 
you can see in the picture I've taken.

A complete integration and test of the different platforms is needed before 
reaching Gerrit.

Anyway, here you go. You can simply copy the lines manually and recompile.


--- qgstreamervideowindow-ORI.cpp       2015-07-05 21:37:20.843145434 +0200
+++ qgstreamervideowindow.cpp   2015-07-05 13:49:54.784794043 +0200
@@ -62,6 +62,10 @@
// We need a native X window handle to be able to use xvimagesink.
// Bail out if Qt is not using xcb (the control will then be ignored by the 
plugin)
m_videoSink = gst_element_factory_make("xvimagesink", NULL);
+    } else if (QGuiApplication::platformName().compare(QLatin1String("eglfs"), 
Qt::CaseInsensitive) == 0) {
+        m_videoSink = gst_element_factory_make("eglglessink", NULL);
+    } else if 
(QGuiApplication::platformName().compare(QLatin1String("linuxfb"), 
Qt::CaseInsensitive) == 0) {
+        m_videoSink = gst_element_factory_make("fbdevsink", NULL);
}

if (m_videoSink) {
--- qgstreamervideowidget-ORI.cpp       2015-07-05 21:37:37.391433363 +0200
+++ qgstreamervideowidget.cpp   2015-07-05 13:50:35.273375245 +0200
@@ -102,6 +102,10 @@
// Bail out if Qt is not using xcb (the control will then be ignored by the 
plugin)
if (QGuiApplication::platformName().compare(QLatin1String("xcb"), 
Qt::CaseInsensitive) == 0)
m_videoSink = gst_element_factory_make ("xvimagesink", NULL);
+    else if (QGuiApplication::platformName().compare(QLatin1String("eglfs"), 
Qt::CaseInsensitive) == 0)
+        m_videoSink = gst_element_factory_make ("eglglessink", NULL);
+    else if (QGuiApplication::platformName().compare(QLatin1String("linuxfb"), 
Qt::CaseInsensitive) == 0)
+        m_videoSink = gst_element_factory_make("fbdevsink", NULL);

if (m_videoSink) {
// Check if the xv sink is usable
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to