summaryrefslogtreecommitdiffstats
path: root/recipes-qt
diff options
context:
space:
mode:
authorEric Nelson <eric.nelson@boundarydevices.com>2013-08-19 14:13:29 +0000
committerOtavio Salvador <otavio@ossystems.com.br>2013-08-24 14:46:18 -0300
commit0c905f1581f331f3156206fa5851b3779445b970 (patch)
tree5778bdcd940660a30dec47cbcbe2f41d46b79137 /recipes-qt
parent4c291af7056e44ffb997fccd95342caef7fd7c19 (diff)
downloadmeta-fsl-arm-0c905f1581f331f3156206fa5851b3779445b970.tar.gz
qt4-embedded: Allow use of Qt Media Player in multi-headed system
Qt-embedded can be used on multiple screens by using environment variables QWS_DISPLAY, QWS_MOUSE_PROTO, et cetera. The gstreamer element mfw_v4lsink used to accelerate media playback on i.MX devices can also be pointed at different displays through the 'device' property, but the current acceleration patch doesn't have a mechanism for setting the property, and always uses the compiled-in default. This patch allows userspace startup code to override the default through the use of the 'v4lsinkdev' environment variable. Please refer to the Qt4-embedded documentation for proper usage of the QWS_x environment variables and the Freescale Multimedia documentation for descriptions of the various gstreamer elements. A sequence of this for a secondary display might be this: export QWS_DISPLAY=linuxfb:/dev/fb2:1 export v4lsinkdev=/dev/video19 my-qt-app -qws Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Diffstat (limited to 'recipes-qt')
-rw-r--r--recipes-qt/qt4/qt4-embedded_4.8.5.bbappend5
-rw-r--r--recipes-qt/qt4/qt4/0002-i.MX-video-renderer-Allow-v4l-device-from-environmen.patch46
2 files changed, 50 insertions, 1 deletions
diff --git a/recipes-qt/qt4/qt4-embedded_4.8.5.bbappend b/recipes-qt/qt4/qt4-embedded_4.8.5.bbappend
index 4c4d0c9..fc16670 100644
--- a/recipes-qt/qt4/qt4-embedded_4.8.5.bbappend
+++ b/recipes-qt/qt4/qt4-embedded_4.8.5.bbappend
@@ -2,7 +2,10 @@
2FILESEXTRAPATHS_prepend := "${THISDIR}/qt4:" 2FILESEXTRAPATHS_prepend := "${THISDIR}/qt4:"
3 3
4SRC_URI_append_mx5 += "file://0001-Add-support-for-i.MX-codecs-to-phonon.patch" 4SRC_URI_append_mx5 += "file://0001-Add-support-for-i.MX-codecs-to-phonon.patch"
5SRC_URI_append_mx6 += "file://0001-Add-support-for-i.MX-codecs-to-phonon.patch" 5SRC_URI_append_mx6 += " \
6 file://0001-Add-support-for-i.MX-codecs-to-phonon.patch \
7 file://0002-i.MX-video-renderer-Allow-v4l-device-from-environmen.patch \
8"
6 9
7DEPENDS_append_mx5 = " virtual/kernel virtual/libgles2" 10DEPENDS_append_mx5 = " virtual/kernel virtual/libgles2"
8PACKAGE_ARCH_mx5 = "${MACHINE_ARCH}" 11PACKAGE_ARCH_mx5 = "${MACHINE_ARCH}"
diff --git a/recipes-qt/qt4/qt4/0002-i.MX-video-renderer-Allow-v4l-device-from-environmen.patch b/recipes-qt/qt4/qt4/0002-i.MX-video-renderer-Allow-v4l-device-from-environmen.patch
new file mode 100644
index 0000000..0226db5
--- /dev/null
+++ b/recipes-qt/qt4/qt4/0002-i.MX-video-renderer-Allow-v4l-device-from-environmen.patch
@@ -0,0 +1,46 @@
1From 023befba9aad60ef58177fd987a6aa40c357b2b2 Mon Sep 17 00:00:00 2001
2From: Eric Nelson <eric.nelson@boundarydevices.com>
3Date: Fri, 16 Aug 2013 11:42:23 -0700
4Subject: [PATCH] i.MX video renderer: Allow v4l device from environment
5
6The i.MX6 supports multiple IPUs and multiple V4L2 output
7devices for each.
8
9Devices are numbered starting with /dev/video16 and defined
10for each configured display. In general, /dev/video16 will
11correspond to the RGB (background) layer for /dev/fb0.
12If a display is the first on an IPU, an additional V4L2
13output will be defined that corresponds to the normally
14YUV overlay (foreground) layer.
15
16This patch allows association of the proper device for
17a particular session for use in multi-headed applications.
18The default is /dev/video17:
19 export v4lsinkdev=/dev/video17
20
21Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
22---
23 src/3rdparty/phonon/gstreamer/widgetrenderer.cpp | 5 ++++-
24 1 file changed, 4 insertions(+), 1 deletion(-)
25
26diff --git a/src/3rdparty/phonon/gstreamer/widgetrenderer.cpp b/src/3rdparty/phonon/gstreamer/widgetrenderer.cpp
27index aa4925a..a502ccd 100644
28--- a/src/3rdparty/phonon/gstreamer/widgetrenderer.cpp
29+++ b/src/3rdparty/phonon/gstreamer/widgetrenderer.cpp
30@@ -58,9 +58,12 @@ WidgetRenderer::WidgetRenderer(VideoWidget *videoWidget)
31 : AbstractRenderer(videoWidget)
32 {
33 if ((m_videoSink = gst_element_factory_make("mfw_v4lsink", NULL)) && m_videoSink != NULL) {
34-
35+ char *videodev;
36 gst_object_ref (GST_OBJECT (m_videoSink)); //Take ownership
37 gst_object_sink (GST_OBJECT (m_videoSink));
38+ videodev=getenv("v4lsinkdev");
39+ if (videodev)
40+ g_object_set (G_OBJECT (m_videoSink), "device", videodev, NULL);
41 }
42
43 // Clear the background with black by default
44--
451.8.1.2
46