Return-Path: Received: from fed1rmfepo202.cox.net (fed1rmfepo202.cox.net [68.230.241.147]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 64436E01358 for ; Mon, 19 Aug 2013 07:11:27 -0700 (PDT) Received: from fed1rmimpo209 ([68.230.241.160]) by fed1rmfepo202.cox.net (InterMail vM.8.01.05.09 201-2260-151-124-20120717) with ESMTP id <20130819141127.YELH3842.fed1rmfepo202.cox.net@fed1rmimpo209> for ; Mon, 19 Aug 2013 10:11:27 -0400 Received: from localhost.localdomain ([98.167.230.131]) by fed1rmimpo209 with cox id EeBS1m00G2ql3AS01eBSGX; Mon, 19 Aug 2013 10:11:26 -0400 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020201.5212278E.0205,ss=1,re=0.000,fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=2.0 cv=bI3I1oCZ c=1 sm=1 a=np+gEjoI14f0/4viqHkTOw==:17 a=uHxJPWy0wIkA:10 a=rcTfVT_afHIA:10 a=R_N1NMmAAAAA:8 a=VkARusu5pVMA:10 a=fdoKVBnDZ5cAwPSZRwgA:9 a=QOiTB_lUNkwA:10 a=np+gEjoI14f0/4viqHkTOw==:117 X-CM-Score: 0.00 Authentication-Results: cox.net; none From: Eric Nelson To: meta-freescale@yoctoproject.org Date: Mon, 19 Aug 2013 07:11:22 -0700 Message-Id: <1376921482-9138-1-git-send-email-eric.nelson@boundarydevices.com> X-Mailer: git-send-email 1.8.1.2 Cc: B19259@freescale.com, otavio@ossystems.com.br Subject: [meta-fsl-arm][PATCH V2] qt4-embedded: Allow use of Qt Media Player in multi-headed system X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2013 14:11:28 -0000 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 --- V2 recipes-qt/qt4/qt4-embedded_4.8.5.bbappend | 5 ++- ...renderer-Allow-v4l-device-from-environmen.patch | 46 ++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 recipes-qt/qt4/qt4/0002-i.MX-video-renderer-Allow-v4l-device-from-environmen.patch 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 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/qt4:" SRC_URI_append_mx5 += "file://0001-Add-support-for-i.MX-codecs-to-phonon.patch" -SRC_URI_append_mx6 += "file://0001-Add-support-for-i.MX-codecs-to-phonon.patch" +SRC_URI_append_mx6 += " \ + file://0001-Add-support-for-i.MX-codecs-to-phonon.patch \ + file://0002-i.MX-video-renderer-Allow-v4l-device-from-environmen.patch \ +" DEPENDS_append_mx5 = " virtual/kernel virtual/libgles2" PACKAGE_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 @@ +From 023befba9aad60ef58177fd987a6aa40c357b2b2 Mon Sep 17 00:00:00 2001 +From: Eric Nelson +Date: Fri, 16 Aug 2013 11:42:23 -0700 +Subject: [PATCH] i.MX video renderer: Allow v4l device from environment + +The i.MX6 supports multiple IPUs and multiple V4L2 output +devices for each. + +Devices are numbered starting with /dev/video16 and defined +for each configured display. In general, /dev/video16 will +correspond to the RGB (background) layer for /dev/fb0. +If a display is the first on an IPU, an additional V4L2 +output will be defined that corresponds to the normally +YUV overlay (foreground) layer. + +This patch allows association of the proper device for +a particular session for use in multi-headed applications. +The default is /dev/video17: + export v4lsinkdev=/dev/video17 + +Signed-off-by: Eric Nelson +--- + src/3rdparty/phonon/gstreamer/widgetrenderer.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/3rdparty/phonon/gstreamer/widgetrenderer.cpp b/src/3rdparty/phonon/gstreamer/widgetrenderer.cpp +index aa4925a..a502ccd 100644 +--- a/src/3rdparty/phonon/gstreamer/widgetrenderer.cpp ++++ b/src/3rdparty/phonon/gstreamer/widgetrenderer.cpp +@@ -58,9 +58,12 @@ WidgetRenderer::WidgetRenderer(VideoWidget *videoWidget) + : AbstractRenderer(videoWidget) + { + if ((m_videoSink = gst_element_factory_make("mfw_v4lsink", NULL)) && m_videoSink != NULL) { +- ++ char *videodev; + gst_object_ref (GST_OBJECT (m_videoSink)); //Take ownership + gst_object_sink (GST_OBJECT (m_videoSink)); ++ videodev=getenv("v4lsinkdev"); ++ if (videodev) ++ g_object_set (G_OBJECT (m_videoSink), "device", videodev, NULL); + } + + // Clear the background with black by default +-- +1.8.1.2 + -- 1.8.1.2