From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id CF527E013DE for ; Sun, 28 Jul 2013 16:44:24 -0700 (PDT) Received: by mail-pa0-f43.google.com with SMTP id hz10so4188431pad.16 for ; Sun, 28 Jul 2013 16:44:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:x-gm-message-state; bh=ebSQh1ZG4ylI5qyodz8RWtgJkC8w95ERPrpWWICgAMc=; b=FksQubM0SiYQMPoCQRGar4ZbodG/IcuxR7hGP7YJDwX2PTUvsgmKeMXD9XFPgK6zB1 nD7aY1uSB8qOFHe7cOj+kqgLBbVgzoDu3IpeKfgseUx9CNleEsRcosBVls/flj5TuG0J PVBXXepmDU0nkJvhMjbUkecPgvbeJ6dFe07wzEApLCmorx6ioU1w98Ee4dSTHLKfl41L qfT5pRCV42VQyyYYOh+BtyUgBVvBMoJgb/KzcBK4eSCsM9gogmvcRVmDJavG8e9/dx8Z OHflG5r6yp6xRX5IxFp0DNiWmP0I/gKUWI/j+m09Drd9ILCbCgpqPsvL26ILa9+DEsde U0Hg== X-Received: by 10.66.160.132 with SMTP id xk4mr46488507pab.118.1375055063740; Sun, 28 Jul 2013 16:44:23 -0700 (PDT) Received: from [29.6.1.42] ([70.96.116.236]) by mx.google.com with ESMTPSA id eq5sm73334728pbc.15.2013.07.28.16.44.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 28 Jul 2013 16:44:22 -0700 (PDT) Message-ID: <51F5ACD3.8000505@boundarydevices.com> Date: Sun, 28 Jul 2013 16:44:19 -0700 From: Eric Nelson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: "meta-freescale@yoctoproject.org" X-Gm-Message-State: ALoCoQkLfcOasmEJt75xRtULho4tjrjApeEMYzq9Cafkzhaf4gcEjc54yag4i8z4h3cLVNbXgunb Subject: RFC regarding glimagesink 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: Sun, 28 Jul 2013 23:44:24 -0000 X-Groupsio-MsgNum: 3910 Content-Type: multipart/mixed; boundary="------------050005060503000807060806" --------------050005060503000807060806 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi all, I spent some time looking at the internals of glimagesink yesterday with the thought that it should be capable of doing some things that our customers are currently doing via mfw_isink (in the non-X case). In particular, I was hoping to shoe-horn some element properties for window positioning. I had previously noted that the fbCreateWindow() routine accepts parameters for window positioning, but it was currently hard-coding things for full-screen: https://bitbucket.org/Freescale/gstreamer-gst-plugins-gl/src/1d6c0abf217a90e160fd7e4c45f02a23da974130/gst-libs/gst/gl/gstglwindow_fbES2.c?at=fsl-0.10#cl-321 That module is also trying to configure some properties, so adding "x,y,w,h" shouldn't be very hard. Unfortunately, it appears that things are not quite as they appear. The gstglwindow_fbES2 isn't properly a gstreamer element, and appears to be invoked in-directly through the glimagesink element. Does anybody know of a way to set the properties of the GstGLWindow element created by the fbES2 module? If so, can this be done through gst-launch, or only by an app? I hacked up a quick test of the idea, as shown in the attached patch that reads the window "bounds" from the environment and the results are promising. I was able to play three instances of 1080P video in three separate windows and the overall system load was quite low (~7%). I did run into a couple of issues, but these are systemic and didn't stem from this patch: - In high-motion sections of video, tearing is evident because nothing's doing frame flipping. - I had to play whack-a-mole with memory allocation failures. I was able to get 2x1080P to run in a loop overnight, but attempts to run 3 fail pretty quickly after the first iteration. I suspect that tuning the various drivers' allocations as done in Jack's patch is needed to make this stable: https://community.freescale.com/thread/304368 The first of those above highlights the need for a compositing layer, which clearly needs cooperation of the toolkit used for the rest of the U/I. By the way, the attached patch is against branch fsl-0.10 in the Bitbucket tree, which appears to match up with the Yocto build, but I notice that Jeremy has a patch applied in the Yocto-0.10. Is 'fsl-0.10' the right baseline to use for future work? I'm interested in hearing the experiences of others with this component. It seems to me that there's a lot of function in this code base, but if it's restricted to full-screen operation, it's not very useful. That said, I have yet to explore the other elements in the package. Regards, Eric --------------050005060503000807060806 Content-Type: text/x-diff; name="0001-gstglwindow_fbES2-allow-window-size-position-to-be-s.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-gstglwindow_fbES2-allow-window-size-position-to-be-s.pa"; filename*1="tch" >From 409464fc3f49eadac4bf3b7a050b76ab419303a0 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Sun, 28 Jul 2013 15:09:19 -0700 Subject: [PATCH] gstglwindow_fbES2: allow window size/position to be specified through the environment Signed-off-by: Eric Nelson --- gst-libs/gst/gl/gstglwindow_fbES2.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gst-libs/gst/gl/gstglwindow_fbES2.c b/gst-libs/gst/gl/gstglwindow_fbES2.c index 57c02e1..2fb86e2 100644 --- a/gst-libs/gst/gl/gstglwindow_fbES2.c +++ b/gst-libs/gst/gl/gstglwindow_fbES2.c @@ -297,6 +297,8 @@ gst_gl_window_new (gulong external_gl_context) EGLConfig config; int index = 0; + int x=-1,y=-1,w=0,h=0; + char const *bounds; setlocale (LC_NUMERIC, "C"); @@ -319,6 +321,11 @@ gst_gl_window_new (gulong external_gl_context) } priv->internal_win_id = fbCreateWindow (priv->device, -1, -1, 0, 0); + bounds=getenv("bounds"); + if (bounds) { + sscanf(bounds,"%ux%u+%u+%u",&w,&h,&x,&y); + } + priv->internal_win_id = fbCreateWindow (priv->device, x, y, w, h); fbGetDisplayGeometry (priv->device, &priv->device_width, &priv->device_height); -- 1.8.1.2 --------------050005060503000807060806--