This *is* a good example of something truly i.MX specific. As a
workaround, the patch is acceptable.
I'd still submit this to GStreamer bugzilla so this can be turned into
something upstreamable. I am thinking of an additional set of element
properties, like "alignment-x" "alignment-y". This way, GStreamer 1.8
could have this feature, and would not need a patch like this. In
general, more video related elements should have options for defining
alignment, I think. It is worth discussing with the GStreamer developers.
On 01/18/2016 10:34 AM, Yuqing Zhu wrote:
IMXCameraApp:When Enabled "save time to image" item, preview,
find the time can not display completely.
As IPU need 8 pixels alignment, add one workaround in base text overlay
to generate 8 pixels alignment text video buffer. The side effect should
cause all text a little smaller.
Signed-off-by: Yuqing Zhu <[email protected]>
---
...-Linux_MX6QP_ARD-IMXCameraApp-When-Enable.patch | 58 ++++++++++++++++++++++
.../gstreamer/gstreamer1.0-plugins-base_%.bbappend | 1 +
2 files changed, 59 insertions(+)
create mode 100755
recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-MMFMWK-7030-Linux_MX6QP_ARD-IMXCameraApp-When-Enable.patch
diff --git
a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-MMFMWK-7030-Linux_MX6QP_ARD-IMXCameraApp-When-Enable.patch
b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-MMFMWK-7030-Linux_MX6QP_ARD-IMXCameraApp-When-Enable.patch
new file mode 100755
index 0000000..1f54fc1
--- /dev/null
+++
b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-MMFMWK-7030-Linux_MX6QP_ARD-IMXCameraApp-When-Enable.patch
@@ -0,0 +1,58 @@
+From f19e83a1a69a3dbbeb16dc4bcee3fb87317bb65b Mon Sep 17 00:00:00 2001
+From: Song Bing <[email protected]>
+Date: Mon, 11 Jan 2016 14:51:17 +0800
+Subject: [PATCH] MMFMWK-7030 [Linux_MX6QP_ARD]IMXCameraApp:When Enabled "save
+ time to image" item, preview, find the time can not display
+ completely. 100%
+
+As IPU need 8 pixels alignment, add one workaround in base text overlay
+to generate 8 pixels alignment text video buffer. The side effect should
+cause all text a little smaller.
+
+Upstream-Status: Inappropriate [i.MX specific]
+
+Signed-off-by: Song Bing [email protected]
+---
+ ext/pango/gstbasetextoverlay.c | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c
+index 3e98aa1..de64c92 100755
+--- a/ext/pango/gstbasetextoverlay.c
++++ b/ext/pango/gstbasetextoverlay.c
+@@ -1545,7 +1545,7 @@ gst_base_text_overlay_render_pangocairo
(GstBaseTextOverlay * overlay,
+ gint unscaled_width, unscaled_height;
+ gint width, height;
+ gboolean full_width = FALSE;
+- double scalef = 1.0;
++ double scalef = 1.0, scalefx, scalefy;
+ double a, r, g, b;
+ gdouble shadow_offset = 0.0;
+ gdouble outline_offset = 0.0;
+@@ -1673,6 +1673,14 @@ gst_base_text_overlay_render_pangocairo
(GstBaseTextOverlay * overlay,
+ height = ceil (height * overlay->render_scale);
+ scalef *= overlay->render_scale;
+
++ /* i.MX special, will cause text a little small */
++ scalefx = scalef * ((gdouble)GST_ROUND_DOWN_8 (width)) / width;
++ scalefy = scalef * ((gdouble)GST_ROUND_DOWN_8 (height)) / height;
++ width = GST_ROUND_DOWN_8 (width);
++ height = GST_ROUND_DOWN_8 (height);
++ GST_DEBUG_OBJECT (overlay, "Rendering with width %d and height %d "
++ , width, height);
++
+ if (width <= 0 || height <= 0) {
+ g_mutex_unlock (GST_BASE_TEXT_OVERLAY_GET_CLASS (overlay)->pango_lock);
+ GST_DEBUG_OBJECT (overlay,
+@@ -1689,7 +1697,7 @@ gst_base_text_overlay_render_pangocairo
(GstBaseTextOverlay * overlay,
+ /* Prepare the transformation matrix. Note that the transformation happens
+ * in reverse order. So for horizontal text, we will translate and then
+ * scale. This is important to understand which scale shall be used. */
+- cairo_matrix_init_scale (&cairo_matrix, scalef, scalef);
++ cairo_matrix_init_scale (&cairo_matrix, scalefx, scalefy);
+
+ if (overlay->use_vertical_render) {
+ gint tmp;
+--
+1.7.9.5
+
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend
b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend
index cf50918..a31a2c4 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend
@@ -3,6 +3,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
IMX_PATCHES = " file://gstplaybin-remove-flag-deinterlace.patch \
file://0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch \
file://0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch \
+
file://0003-MMFMWK-7030-Linux_MX6QP_ARD-IMXCameraApp-When-Enable.patch \
"
SRC_URI_append_mx6 = "${IMX_PATCHES}"
SRC_URI_append_mx7 = "${IMX_PATCHES}"
--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale