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
>From 409464fc3f49eadac4bf3b7a050b76ab419303a0 Mon Sep 17 00:00:00 2001
From: Eric Nelson <[email protected]>
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 <[email protected]>
---
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
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale