Add patches for gstreamer1.0-plugins-bad 1.6
cover Add patches for gstreamer1.0-plugins-bad 1.6
--Modifiy the videoparse rank to avoid link them in. --Fix gl plugin not being built in wayland backend. --Add directviv to glimagesink to improve playback performance. --Support video crop for glimagesink.
--Support fb backend for gl plugins.
--Change wayland default res to 1024x768.
--Add fps print in glimagesink.
--Fix gleffects fisheye shader compile error. --Roll-back h264parse rank.
Yuqing Zhu (9):
gstreamer1.0-plugins-bad: Modify the videoparsers rank down to avoid
link them in
gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland
backend
gstreamer1.0-plugins-bad: Add directviv to glimagesink to improve
playback performance
gstreamer1.0-plugins-bad: Support video crop for glimagesink gstreamer1.0-plugins-bad: Support fb backend for gl plugins gstreamer1.0-plugins-bad: Change wayland default res to 1024x768 gstreamer1.0-plugins-bad: Add fps print in glimagesink gstreamer1.0-plugins-bad: Fix gleffects fisheye shader compile error gstreamer1.0-plugins-bad: Roll-back h264parse rank
.../0002-modifiy-the-videoparse-rank.patch | 62 ++ ...or-gl-plugin-not-built-in-wayland-backend.patch | 31 + ...imagesink-to-improve-playback-performance.patch | 454 ++++++++++++ ...plugin-support-video-crop-for-glimagesink.patch | 155 +++++ ...lplugin-Support-fb-backend-for-gl-plugins.patch | 758 +++++++++++++++++++++ ...in-Change-wayland-default-res-to-1024x768.patch | 41 ++ ...008-glplugin-Add-fps-print-in-glimagesink.patch | 83 +++ ...-glplugin-fix-gleffects-fisheye-shader-co.patch | 31 + .../0010-vidoeparse-Roll-back-h264parse-rank.patch | 35 + .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 18 +- 10 files changed, 1665 insertions(+), 3 deletions(-) create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-modifiy-the-videoparse-rank.patch create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-Fix-for-gl-plugin-not-built-in-wayland-backend.patch create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glplugin-Add-directviv-to-glimagesink-to-improve-playback-performance.patch create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glplugin-support-video-crop-for-glimagesink.patch create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glplugin-Support-fb-backend-for-gl-plugins.patch create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-Change-wayland-default-res-to-1024x768.patch create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin-Add-fps-print-in-glimagesink.patch create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplugin-fix-gleffects-fisheye-shader-co.patch create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0010-vidoeparse-Roll-back-h264parse-rank.patch
Signature · 1 line
1.9.1
PATCH 1/9 gstreamer1.0-plugins-bad: Modify the videoparsers rank down to avoid link them in
. h263parse rank down to 63
. h264parse rank down to 63
. mpegvideoparse rank down to 63
. mpeg4videpparse rank down to 63
. pngparse, rank down to 63
. h265parse rank down to 63
--- .../0002-modifiy-the-videoparse-rank.patch | 62 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 10 ++-- 2 files changed, 69 insertions(+), 3 deletions(-) create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-modifiy-the-videoparse-rank.patch
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-modifiy-the-videoparse-rank.patch new file +62 -0
@@ -0,0 +1,62 @@ +From 85b1ac94e34fcd3ebf2e4cedb48313c1189dc61d Mon Sep 17 00:00:00 2001 +From: Lyon Wang <[email protected]> +Date: Fri, 29 May 2015 09:54:56 +0800 +Subject: [PATCH 05/10] modifiy the videoparse rank + +- Modify the videparsers rank down to avoid link them in +. h263parse rank down to 63 +. h264parse rank down to 63 +. mpegvideoparse rank down to 63 +. mpeg4videpparse rank down to 63 +. pngparse, rank down to 63 +. h265parse rank down to 63 + +Upstream-Status: [i.MX specific] internal use only + +Signed-off-by: Lyon Wang <[email protected]> +--- + gst/videoparsers/plugin.c | 21 +++++++++++++++++++-- + 1 file changed, 19 insertions(+), 2 deletions(-) + +diff --git a/gst/videoparsers/plugin.c b/gst/videoparsers/plugin.c +index 79d1df6..c070b93 100644 +--- a/gst/videoparsers/plugin.c ++++ b/gst/videoparsers/plugin.c +@@ -35,7 +35,7 @@ static gboolean + plugin_init (GstPlugin * plugin) + { + gboolean ret = FALSE; +- ++#if 0 + ret |= gst_element_register (plugin, "h263parse", + GST_RANK_PRIMARY + 1, GST_TYPE_H263_PARSE); + ret |= gst_element_register (plugin, "h264parse", +@@ -52,7 +52,24 @@ plugin_init (GstPlugin * plugin) + GST_RANK_SECONDARY, GST_TYPE_H265_PARSE); + ret |= gst_element_register (plugin, "vc1parse", + GST_RANK_NONE, GST_TYPE_VC1_PARSE); +- ++#else ++ ret |= gst_element_register (plugin, "h263parse", ++ GST_RANK_MARGINAL - 1, GST_TYPE_H263_PARSE); ++ ret |= gst_element_register (plugin, "h264parse", ++ GST_RANK_MARGINAL - 1, GST_TYPE_H264_PARSE); ++ ret |= gst_element_register (plugin, "diracparse", ++ GST_RANK_NONE, GST_TYPE_DIRAC_PARSE); ++ ret |= gst_element_register (plugin, "mpegvideoparse", ++ GST_RANK_MARGINAL - 1, GST_TYPE_MPEGVIDEO_PARSE); ++ ret |= gst_element_register (plugin, "mpeg4videoparse", ++ GST_RANK_MARGINAL -1, GST_TYPE_MPEG4VIDEO_PARSE); ++ ret |= gst_element_register (plugin, "pngparse", ++ GST_RANK_MARGINAL-1, GST_TYPE_PNG_PARSE); ++ ret |= gst_element_register (plugin, "h265parse", ++ GST_RANK_MARGINAL-1, GST_TYPE_H265_PARSE); ++ ret |= gst_element_register (plugin, "vc1parse", ++ GST_RANK_NONE, GST_TYPE_VC1_PARSE); ++#endif + return ret; + } + +-- +1.9.1 +
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +7 -3
@@ -10,9 +10,13 @@ PACKAGECONFIG_GL_mx6sl = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', \ base_contains('DISTRO_FEATURES', 'x11', \ 'opengl', '', d), '', d)}" -SRC_URI_append_mx6 = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h.patch" -SRC_URI_append_mx6ul = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h.patch" -SRC_URI_append_mx7 = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h.patch" +IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h.patch \ + file://0002-modifiy-the-videoparse-rank.patch \ +" + +SRC_URI_append_mx6 = "${IMX_PATCHES}" +SRC_URI_append_mx6ul = "${IMX_PATCHES}" +SRC_URI_append_mx7 = "${IMX_PATCHES}" PACKAGE_ARCH_mx6 = "${MACHINE_SOCARCH}"
Signature · 1 line
1.9.1
PATCH 2/9 gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland backend
In reply to Yuqing Zhu--- ...or-gl-plugin-not-built-in-wayland-backend.patch | 31 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 32 insertions(+) create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-Fix-for-gl-plugin-not-built-in-wayland-backend.patch
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-Fix-for-gl-plugin-not-built-in-wayland-backend.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 0f293874a1744b50b6f125589e564185bcb04596 Mon Sep 17 00:00:00 2001 +From: Jian <[email protected]> +Date: Fri, 24 Apr 2015 17:12:02 +0800 +Subject: [PATCH 10/10] Fix for gl plugin not built in wayland backend +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Jian <[email protected]> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index aba2ec0..d5467f7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -742,7 +742,7 @@ case $host in + LIBS=$old_LIBS + CFLAGS=$old_CFLAGS + +- PKG_CHECK_MODULES(WAYLAND_EGL, wayland-client >= 1.0 wayland-cursor >= 1.0 wayland-egl >= 9.0, HAVE_WAYLAND_EGL=yes, HAVE_WAYLAND_EGL=no) ++ PKG_CHECK_MODULES(WAYLAND_EGL, wayland-client >= 1.0 wayland-cursor >= 1.0 wayland-egl >= 1.0, HAVE_WAYLAND_EGL=yes, HAVE_WAYLAND_EGL=no) + ;; + esac + +-- +1.9.1 +
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +1 -0
@@ -12,6 +12,7 @@ PACKAGECONFIG_GL_mx6sl = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', \ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h.patch \ file://0002-modifiy-the-videoparse-rank.patch \ + file://0003-Fix-for-gl-plugin-not-built-in-wayland-backend.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"
Signature · 1 line
1.9.1
PATCH 3/9 gstreamer1.0-plugins-bad: Add directviv to glimagesink to improve playback performance
In reply to Yuqing Zhu1. Add a physical buffer uploader in glupload plugin and using viv direct texture to bind physical continious buffer with texture to avoid memory copy from videobuffer to texture to gain good performance.
2. Reduce glimagesink load latency by override glimagesink ALLOCATION query to avoid memory copy.
--- ...imagesink-to-improve-playback-performance.patch | 454 +++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 455 insertions(+) create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glplugin-Add-directviv-to-glimagesink-to-improve-playback-performance.patch
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glplugin-Add-directviv-to-glimagesink-to-improve-playback-performance.patch new file +454 -0
@@ -0,0 +1,454 @@ +From 587db892fdaac18780c8024e5a976ea182f36ff4 Mon Sep 17 00:00:00 2001 +From: Haihua Hu <[email protected]> +Date: Tue, 13 Oct 2015 09:33:54 +0800 +Subject: [PATCH 1/2] [glplugin] Add directviv to glimagesink to improve + playback performance +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +1.Add a physical buffer uploader in glupload plugin and using viv direct + texture to bind physical continious buffer with texture to avoid memory + copy from videobuffer to texture to gain good performance. +2.Reduce glimagesink load latency by override glimagesink ALLOCATION query to + avoid memory copy. + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Haihua Hu <[email protected]> +--- + ext/gl/gstglimagesink.c | 5 ++ + ext/gl/gstgluploadelement.c | 14 +++ + gst-libs/gst/gl/Makefile.am | 2 + + gst-libs/gst/gl/gstglupload.c | 118 ++++++++++++++++++++++++- + gst-libs/gst/gl/gstglvivdirecttexture.c | 143 +++++++++++++++++++++++++++++++ + gst-libs/gst/gl/gstglvivdirecttexture.h | 35 ++++++++ + 6 files changed, 314 insertions(+), 3 deletions(-) + create mode 100644 gst-libs/gst/gl/gstglvivdirecttexture.c + create mode 100644 gst-libs/gst/gl/gstglvivdirecttexture.h + +diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c +index f629df7..1e5dc05 100644 +--- a/ext/gl/gstglimagesink.c ++++ b/ext/gl/gstglimagesink.c +@@ -896,6 +896,11 @@ gst_glimage_sink_query (GstBaseSink * bsink, GstQuery * query) + res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query); + break; + } ++ case GST_QUERY_ALLOCATION: ++ { ++ res = gst_glimage_sink_propose_allocation(bsink, query); ++ break; ++ } + default: + res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query); + break; +diff --git a/ext/gl/gstgluploadelement.c b/ext/gl/gstgluploadelement.c +index 83ff24c..e74da3a 100644 +--- a/ext/gl/gstgluploadelement.c ++++ b/ext/gl/gstgluploadelement.c +@@ -208,6 +208,8 @@ gst_gl_upload_element_prepare_output_buffer (GstBaseTransform * bt, + GstGLUploadElement *upload = GST_GL_UPLOAD_ELEMENT (bt); + GstGLUploadReturn ret; + GstBaseTransformClass *bclass; ++ GstVideoInfo info; ++ GstCaps *caps; + + bclass = GST_BASE_TRANSFORM_GET_CLASS (bt); + +@@ -231,6 +233,18 @@ gst_gl_upload_element_prepare_output_buffer (GstBaseTransform * bt, + return GST_FLOW_ERROR; + } + ++ /* check if the output buffer's meta format equals to the caps format */ ++ GstVideoMeta *vmeta = gst_buffer_get_video_meta(*outbuf); ++ gst_video_info_from_caps (&info, upload->out_caps); ++ if(vmeta->format != GST_VIDEO_INFO_FORMAT (&info)) ++ { ++ caps = gst_caps_copy(upload->out_caps); ++ gst_caps_set_simple (caps, "format", G_TYPE_STRING, ++ gst_video_format_to_string (vmeta->format), NULL); ++ gst_caps_replace (&upload->out_caps, caps); ++ gst_base_transform_update_src_caps (upload, caps); ++ } ++ + /* basetransform doesn't unref if they're the same */ + if (buffer == *outbuf) + gst_buffer_unref (*outbuf); +diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am +index 36f3bf7..402e37a 100644 +--- a/gst-libs/gst/gl/Makefile.am ++++ b/gst-libs/gst/gl/Makefile.am +@@ -30,6 +30,7 @@ libgstgl_@GST_API_VERSION@_la_SOURCES = \ + gstglsyncmeta.c \ + gstglviewconvert.c \ + gstgloverlaycompositor.c \ ++ gstglvivdirecttexture.c \ + utils/opengl_versions.h + + libgstgl_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl +@@ -56,6 +57,7 @@ libgstgl_@GST_API_VERSION@include_HEADERS = \ + gstglviewconvert.h \ + gstgloverlaycompositor.h \ + gstgl_fwd.h \ ++ gstglvivdirecttexture.h \ + gl.h + + libgstgl_@GST_API_VERSION@_la_LIBADD = \ +diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c +index 0addca1..acaa329 100644 +--- a/gst-libs/gst/gl/gstglupload.c ++++ b/gst-libs/gst/gl/gstglupload.c +@@ -23,6 +23,7 @@ + #endif + + #include <stdio.h> ++#include <gst/gl/gstglvivdirecttexture.h> + + #include "gl.h" + #include "gstglupload.h" +@@ -47,7 +48,7 @@ + #define USING_GLES2(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 2, 0)) + #define USING_GLES3(context) (gst_gl_context_check_gl_version (context, GST_GL_API_GLES2, 3, 0)) + +-GST_DEBUG_CATEGORY_STATIC (gst_gl_upload_debug); ++GST_DEBUG_CATEGORY (gst_gl_upload_debug); + #define GST_CAT_DEFAULT gst_gl_upload_debug + + #define DEBUG_INIT \ +@@ -698,6 +699,114 @@ static const UploadMethod _upload_meta_upload = { + &_upload_meta_upload_free + }; + ++struct PhyBufferUpload ++{ ++ GstGLUpload *upload; ++}; ++ ++static gpointer ++_physical_buffer_upload_new(GstGLUpload *upload) ++{ ++ struct PhyBufferUpload *phybuffer = g_new0 (struct PhyBufferUpload, 1); ++ ++ phybuffer->upload = upload; ++ ++ return phybuffer; ++} ++ ++static GstCaps * ++_physical_buffer_upload_transform_caps(GstGLContext *context, ++ GstPadDirection direction, GstCaps *caps) ++{ ++ GstCaps *ret; ++ ++ if (direction == GST_PAD_SINK) { ++ ret = _set_caps_features (caps, GST_CAPS_FEATURE_MEMORY_GL_MEMORY); ++ gst_caps_set_simple (ret, "format", G_TYPE_STRING, "RGBA", NULL); ++ } else { ++ ret = gst_caps_from_string (GST_VIDEO_CAPS_MAKE_WITH_FEATURES ++ (GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY,GST_GL_DIRECTVIV_FORMAT)); ++ } ++ ++ return ret; ++} ++ ++static gboolean ++_physical_buffer_upload_accept(gpointer impl, GstBuffer *buffer, ++ GstCaps *in_caps, GstCaps *out_caps) ++{ ++ GstCapsFeatures *features; ++ ++ features = gst_caps_get_features (out_caps, 0); ++ if (!gst_caps_features_contains (features, GST_CAPS_FEATURE_MEMORY_GL_MEMORY)) ++ return FALSE; ++ ++ return gst_is_physical_buffer(buffer); ++} ++ ++static void ++_physical_buffer_upload_propose_allocation(gpointer impl, GstQuery *decide_query, ++ GstQuery *query) ++{ ++ gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, 0); ++} ++ ++static GstGLUploadReturn ++_physical_buffer_upload_perform(gpointer impl, GstBuffer *buffer, GstBuffer **outbuf) ++{ ++ struct PhyBufferUpload *phyBuffer = impl; ++ GstVideoInfo *info; ++ gint n_mem; ++ ++ info = &phyBuffer->upload->priv->out_info; ++ n_mem = GST_VIDEO_INFO_N_PLANES (info); ++ GST_LOG_OBJECT (phyBuffer->upload, "Attempting viv direct upload"); ++ *outbuf = gst_buffer_new (); ++ gst_gl_memory_setup_buffer (phyBuffer->upload->context, ++ NULL, info, NULL, *outbuf); ++ ++ GstGLMemory *out_gl_mem = ++ (GstGLMemory *) gst_buffer_peek_memory (*outbuf, 0); ++ ++ gst_gl_viv_direct_bind_gstbuffer(phyBuffer->upload->context, out_gl_mem->tex_id, ++ &phyBuffer->upload->priv->in_info, buffer); ++ ++ gst_buffer_add_video_meta_full (*outbuf, 0, ++ GST_VIDEO_INFO_FORMAT (info), GST_VIDEO_INFO_WIDTH (info), ++ GST_VIDEO_INFO_HEIGHT (info), n_mem, info->offset, info->stride); ++ ++ return GST_GL_UPLOAD_DONE; ++} ++ ++static void ++_physical_buffer_upload_release(gpointer impl, GstBuffer *buffer) ++{ ++} ++ ++static void ++_physical_buffer_upload_free(gpointer impl) ++{ ++ struct PhyBufferUpload *phyBuffer = impl; ++ ++ g_free(phyBuffer); ++} ++ ++static GstStaticCaps _physical_buffer_upload_caps = ++GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (GST_GL_DIRECTVIV_FORMAT)); ++ ++static const UploadMethod _physical_buffer_upload = { ++ "Physical buffer", ++ 0, ++ &_physical_buffer_upload_caps, ++ &_physical_buffer_upload_new, ++ &_physical_buffer_upload_transform_caps, ++ &_physical_buffer_upload_accept, ++ &_physical_buffer_upload_propose_allocation, ++ &_physical_buffer_upload_perform, ++ &_physical_buffer_upload_release, ++ &_physical_buffer_upload_free ++}; ++ + struct RawUploadFrame + { + gint ref_count; +@@ -813,6 +922,7 @@ _raw_data_upload_perform (gpointer impl, GstBuffer * buffer, + struct RawUpload *raw = impl; + int i; + GstVideoInfo *in_info = &raw->upload->priv->in_info; ++ + guint max_planes = GST_VIDEO_INFO_N_PLANES (in_info); + + /* Support stereo views for separated multiview mode */ +@@ -870,7 +980,9 @@ static const UploadMethod *upload_methods[] = { &_gl_memory_upload, + #if GST_GL_HAVE_PLATFORM_EGL + &_egl_image_upload, + #endif +- &_upload_meta_upload, &_raw_data_upload ++ &_upload_meta_upload, ++ &_physical_buffer_upload, ++ &_raw_data_upload + }; + + static GMutex upload_global_lock; +@@ -998,7 +1110,7 @@ gst_gl_upload_transform_caps (GstGLContext * context, GstPadDirection direction, + + + if (filter) { +- result = gst_caps_intersect_full (filter, tmp, GST_CAPS_INTERSECT_FIRST); ++ result = gst_caps_intersect_full (tmp, filter, GST_CAPS_INTERSECT_FIRST); + gst_caps_unref (tmp); + } else { + result = tmp; +diff --git a/gst-libs/gst/gl/gstglvivdirecttexture.c b/gst-libs/gst/gl/gstglvivdirecttexture.c +new file mode 100644 +index 0000000..c19b617 +--- /dev/null ++++ b/gst-libs/gst/gl/gstglvivdirecttexture.c +@@ -0,0 +1,143 @@ ++/* ++ * GStreamer ++ * Copyright (c) 2015, Freescale Semiconductor, Inc. ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, ++ * Boston, MA 02110-1301, USA. ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ ++#include "gl.h" ++ ++GST_DEBUG_CATEGORY_EXTERN (gst_gl_upload_debug); ++#define GST_CAT_DEFAULT gst_gl_upload_debug ++ ++typedef struct { ++ guint tex_id; ++ guint w; ++ guint h; ++ guint fmt; ++ void *vaddr; ++ guint paddr; ++ gboolean ret; ++} GstVivDirectTexture; ++ ++gboolean ++gst_is_physical_buffer (GstBuffer *buffer) ++{ ++ ++ GstMemory *mem; ++ ++ mem = gst_buffer_peek_memory (buffer, 0); ++ if (!mem->allocator) ++ return FALSE; ++ ++ return g_type_check_instance_is_a (mem->allocator, g_type_from_name("GstAllocatorPhyMem")); ++} ++ ++static void ++_do_viv_direct_tex_bind_mem (GstGLContext * context, GstVivDirectTexture * viv_tex) ++{ ++ GST_DEBUG ("viv direct upload, tex_id %d, fmt: %d, res: (%dx%d)", viv_tex->tex_id, viv_tex->fmt, viv_tex->w, viv_tex->h); ++ GST_DEBUG ("Physical memory buffer, vaddr: %p, paddr: %p", viv_tex->vaddr, viv_tex->paddr); ++ ++ glBindTexture (GL_TEXTURE_2D, viv_tex->tex_id); ++ glTexDirectVIVMap (GL_TEXTURE_2D, viv_tex->w, viv_tex->h, viv_tex->fmt, &viv_tex->vaddr, &viv_tex->paddr); ++ glTexDirectInvalidateVIV (GL_TEXTURE_2D); ++ viv_tex->ret = TRUE; ++ ++ return; ++} ++ ++gboolean ++gst_gl_viv_direct_bind_gstbuffer (GstGLContext * context, guint tex_id, GstVideoInfo * info, GstBuffer * buffer) ++{ ++ typedef struct { ++ guint8 *vaddr; ++ guint8 *paddr; ++ guint8 *caddr; ++ gsize size; ++ gpointer *user_data; ++ } PhyMemBlock; ++ //Note: structure PhyMemBlock is copied from gst1.0-fsl-plugin/libs/allocator/gstallocatorphymem.h ++ ++ typedef struct { ++ GstMemory mem; ++ guint8 *vaddr; ++ guint8 *paddr; ++ PhyMemBlock block; ++ } GstMemoryPhy; ++ //Note: structure GstMemoryPhy is copied from gst1.0-fsl-plugin/libs/allocator/gstallocatorphymem.c ++ ++ GstMemory *mem = gst_buffer_peek_memory (buffer, 0); ++ GstMemoryPhy *memphy = (GstMemoryPhy*) mem; ++ PhyMemBlock *memblk = &memphy->block; ++ ++ GstVideoFormat fmt = GST_VIDEO_INFO_FORMAT (info); ++ gint width, height; ++ GstVideoMeta *vmeta = gst_buffer_get_video_meta (buffer); ++ if (vmeta && (fmt == GST_VIDEO_FORMAT_I420 || fmt == GST_VIDEO_FORMAT_NV12)) { ++ width = vmeta->stride[0]; ++ height = vmeta->offset[1] / width; ++ } ++ else { ++ width = GST_VIDEO_INFO_WIDTH (info); ++ height = GST_VIDEO_INFO_HEIGHT (info); ++ } ++ ++ guint viv_fmt; ++ switch (fmt) { ++ case GST_VIDEO_FORMAT_I420: ++ viv_fmt = GL_VIV_I420; ++ break; ++ case GST_VIDEO_FORMAT_YV12: ++ viv_fmt = GL_VIV_YV12; ++ break; ++ case GST_VIDEO_FORMAT_NV12: ++ viv_fmt = GL_VIV_NV12; ++ break; ++ case GST_VIDEO_FORMAT_NV21: ++ viv_fmt = GL_VIV_NV21; ++ break; ++ case GST_VIDEO_FORMAT_YUY2: ++ viv_fmt = GL_VIV_YUY2; ++ break; ++ case GST_VIDEO_FORMAT_UYVY: ++ viv_fmt = GL_VIV_UYVY; ++ break; ++ case GST_VIDEO_FORMAT_RGBA: ++ viv_fmt = GL_RGBA; ++ break; ++ case GST_VIDEO_FORMAT_BGRA: ++ viv_fmt = GL_BGRA_EXT; ++ break; ++ case GST_VIDEO_FORMAT_RGB16: ++ viv_fmt = GL_RGB565_OES; ++ break; ++ default: ++ GST_ERROR ("Not supported format %d for viv direct texture upload.", fmt); ++ viv_fmt = GL_NONE; ++ return FALSE; ++ } ++ ++ GstVivDirectTexture viv_tex = {tex_id, width, height, viv_fmt, memblk->vaddr, memblk->paddr, FALSE}; ++ gst_gl_context_thread_add (context, (GstGLContextThreadFunc) _do_viv_direct_tex_bind_mem, &viv_tex); ++ ++ return viv_tex.ret; ++} ++ +diff --git a/gst-libs/gst/gl/gstglvivdirecttexture.h b/gst-libs/gst/gl/gstglvivdirecttexture.h +new file mode 100644 +index 0000000..fa88e1a +--- /dev/null ++++ b/gst-libs/gst/gl/gstglvivdirecttexture.h +@@ -0,0 +1,35 @@ ++/* ++ * GStreamer ++ * Copyright (c) 2015, Freescale Semiconductor, Inc. ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, ++ * Boston, MA 02110-1301, USA. ++ */ ++ ++#ifndef __GST_GL_VIVDIRECT_H__ ++#define __GST_GL_VIVDIRECT_H__ ++ ++#include <gst/video/video.h> ++#include <gst/gl/gstgl_fwd.h> ++ ++#define GST_GL_DIRECTVIV_FORMAT "{RGBA, I420, YV12, NV12, NV21, YUY2, UYVY, BGRA, RGB16}" ++G_BEGIN_DECLS ++ ++gboolean gst_is_physical_buffer (GstBuffer *buffer); ++gboolean gst_gl_viv_direct_bind_gstbuffer (GstGLContext * context, guint tex_id, GstVideoInfo * info, GstBuffer * buffer); ++ ++G_END_DECLS ++ ++#endif /* __GST_GL_VIVDIRECT_H__ */ +-- +1.7.9.5 +
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +1 -0
@@ -13,6 +13,7 @@ PACKAGECONFIG_GL_mx6sl = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', \ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h.patch \ file://0002-modifiy-the-videoparse-rank.patch \ file://0003-Fix-for-gl-plugin-not-built-in-wayland-backend.patch \ + file://0004-glplugin-Add-directviv-to-glimagesink-to-improve-playback-performance.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"
Signature · 1 line
1.9.1
PATCH 4/9 gstreamer1.0-plugins-bad: Support video crop for glimagesink
In reply to Yuqing Zhu1.Add video crop meta copy in glupload.
2.Calculate the new texture coordinate in vertices array and bind to buffer object. 3.Make glimagesink only updating vertices array when video crop meta changed.
--- ...plugin-support-video-crop-for-glimagesink.patch | 155 +++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 156 insertions(+) create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glplugin-support-video-crop-for-glimagesink.patch
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glplugin-support-video-crop-for-glimagesink.patch new file +155 -0
@@ -0,0 +1,155 @@ +From 1a917447c3749f0a6d3ff98b8dcbc7439b48293d Mon Sep 17 00:00:00 2001 +From: Haihua Hu <[email protected]> +Date: Fri, 13 Nov 2015 10:51:25 +0800 +Subject: [PATCH] [glplugin] support video crop for glimagesink + +1.Add video crop meta copy in glupload +2.Calculate the new texture coordinate in vertices array and bind to buffer object +3.Make glimagesink only updating vertices array when video crop meta changed + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Haihua Hu <[email protected]> +--- + ext/gl/gstglimagesink.c | 53 ++++++++++++++++++++++++++++++++++++++++- + ext/gl/gstglimagesink.h | 3 +++ + gst-libs/gst/gl/gstglupload.c | 10 ++++++++ + 3 files changed, 65 insertions(+), 1 deletion(-) + +diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c +index 1e5dc05..6fc0f9e 100644 +--- a/ext/gl/gstglimagesink.c ++++ b/ext/gl/gstglimagesink.c +@@ -585,6 +585,8 @@ gst_glimage_sink_init (GstGLImageSink * glimage_sink) + glimage_sink->handle_events = TRUE; + glimage_sink->ignore_alpha = TRUE; + glimage_sink->overlay_compositor = NULL; ++ glimage_sink->cropmeta = NULL; ++ glimage_sink->prev_cropmeta = NULL; + + glimage_sink->mview_output_mode = DEFAULT_MULTIVIEW_MODE; + glimage_sink->mview_output_flags = DEFAULT_MULTIVIEW_FLAGS; +@@ -1039,6 +1041,12 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition) + gst_object_unref (glimage_sink->display); + glimage_sink->display = NULL; + } ++ ++ glimage_sink->cropmeta = NULL; ++ if (glimage_sink->prev_cropmeta) ++ g_slice_free(GstVideoCropMeta, glimage_sink->prev_cropmeta); ++ glimage_sink->prev_cropmeta = NULL; ++ + break; + default: + break; +@@ -1452,6 +1460,8 @@ gst_glimage_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf) + GST_VIDEO_SINK_WIDTH (glimage_sink), + GST_VIDEO_SINK_HEIGHT (glimage_sink)); + ++ glimage_sink->cropmeta = gst_buffer_get_video_crop_meta (buf); ++ + /* Ask the underlying window to redraw its content */ + if (!gst_glimage_sink_redisplay (glimage_sink)) + goto redisplay_failed; +@@ -1638,7 +1648,7 @@ config_failed: + } + + /* *INDENT-OFF* */ +-static const GLfloat vertices[] = { ++static GLfloat vertices[] = { + 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, + -1.0f, 1.0f, 0.0f, 0.0f, 0.0f, + -1.0f, -1.0f, 0.0f, 0.0f, 1.0f, +@@ -1898,6 +1908,47 @@ gst_glimage_sink_on_draw (GstGLImageSink * gl_sink) + + gst_gl_shader_use (gl_sink->redisplay_shader); + ++ if (gl_sink->cropmeta) { ++ gint width = GST_VIDEO_SINK_WIDTH (gl_sink); ++ gint height = GST_VIDEO_SINK_HEIGHT (gl_sink); ++ ++ if (!gl_sink->prev_cropmeta){ ++ /* Initialize the previous crop meta and set all memroy to zero */ ++ gl_sink->prev_cropmeta = (GstVideoCropMeta *) g_slice_new0(GstVideoCropMeta); ++ } ++ ++ /* If crop meta not equal to the previous, recalculate the vertices */ ++ if (gl_sink->prev_cropmeta->x != gl_sink->cropmeta->x ++ || gl_sink->prev_cropmeta->y != gl_sink->cropmeta->y ++ || gl_sink->prev_cropmeta->width != gl_sink->cropmeta->width ++ || gl_sink->prev_cropmeta->height != gl_sink->cropmeta->height){ ++ ++ vertices[8] = (float)(gl_sink->cropmeta->x) / width; ++ vertices[9] = (float)(gl_sink->cropmeta->y) / height; ++ ++ vertices[3] = (float)(gl_sink->cropmeta->width + gl_sink->cropmeta->x) / width; ++ vertices[4] = vertices[9]; ++ ++ vertices[13] = vertices[8]; ++ vertices[14] = (float)(gl_sink->cropmeta->height + gl_sink->cropmeta->y) / height; ++ ++ vertices[18] = vertices[3]; ++ vertices[19] = vertices[14]; ++ ++ gl->BindBuffer (GL_ARRAY_BUFFER, gl_sink->vertex_buffer); ++ gl->BufferData (GL_ARRAY_BUFFER, 4 * 5 * sizeof (GLfloat), vertices, ++ GL_STATIC_DRAW); ++ ++ gl->BindBuffer (GL_ARRAY_BUFFER, 0); ++ ++ /* Store the previous crop meta */ ++ gl_sink->prev_cropmeta->x = gl_sink->cropmeta->x; ++ gl_sink->prev_cropmeta->y = gl_sink->cropmeta->y; ++ gl_sink->prev_cropmeta->width = gl_sink->cropmeta->width; ++ gl_sink->prev_cropmeta->height = gl_sink->cropmeta->height; ++ } ++ } ++ + if (gl->GenVertexArrays) + gl->BindVertexArray (gl_sink->vao); + else +diff --git a/ext/gl/gstglimagesink.h b/ext/gl/gstglimagesink.h +index f7b3bfb..a26ca4b 100644 +--- a/ext/gl/gstglimagesink.h ++++ b/ext/gl/gstglimagesink.h +@@ -102,6 +102,9 @@ struct _GstGLImageSink + guint window_width; + guint window_height; + ++ GstVideoCropMeta *cropmeta; ++ GstVideoCropMeta *prev_cropmeta; ++ + GstVideoRectangle display_rect; + + GstGLShader *redisplay_shader; +diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c +index acaa329..0d36248 100644 +--- a/gst-libs/gst/gl/gstglupload.c ++++ b/gst-libs/gst/gl/gstglupload.c +@@ -756,6 +756,7 @@ _physical_buffer_upload_perform(gpointer impl, GstBuffer *buffer, GstBuffer **ou + { + struct PhyBufferUpload *phyBuffer = impl; + GstVideoInfo *info; ++ GstVideoCropMeta *incropmeta, *outcropmeta; + gint n_mem; + + info = &phyBuffer->upload->priv->out_info; +@@ -774,6 +775,15 @@ _physical_buffer_upload_perform(gpointer impl, GstBuffer *buffer, GstBuffer **ou + gst_buffer_add_video_meta_full (*outbuf, 0, + GST_VIDEO_INFO_FORMAT (info), GST_VIDEO_INFO_WIDTH (info), + GST_VIDEO_INFO_HEIGHT (info), n_mem, info->offset, info->stride); ++ /* add video crop meta to out buffer if need */ ++ incropmeta = gst_buffer_get_video_crop_meta(buffer); ++ if(incropmeta){ ++ outcropmeta = gst_buffer_add_video_crop_meta(*outbuf); ++ outcropmeta->x = incropmeta->x; ++ outcropmeta->y = incropmeta->y; ++ outcropmeta->width = incropmeta->width; ++ outcropmeta->height = incropmeta->height; ++ } + + return GST_GL_UPLOAD_DONE; + } +-- +1.7.9.5 +
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +1 -0
@@ -14,6 +14,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0002-modifiy-the-videoparse-rank.patch \ file://0003-Fix-for-gl-plugin-not-built-in-wayland-backend.patch \ file://0004-glplugin-Add-directviv-to-glimagesink-to-improve-playback-performance.patch \ + file://0005-glplugin-support-video-crop-for-glimagesink.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"
Signature · 1 line
1.9.1
PATCH 6/9 gstreamer1.0-plugins-bad: Change wayland default res to 1024x768
In reply to Yuqing ZhuChange wayland backend default window resolution
from 320x240 to 1024x768.
--- ...in-Change-wayland-default-res-to-1024x768.patch | 41 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 42 insertions(+) create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-Change-wayland-default-res-to-1024x768.patch
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-Change-wayland-default-res-to-1024x768.patch new file +41 -0
@@ -0,0 +1,41 @@ +From decc71a707d3b3596888d30a4c7ca25b57a686b2 Mon Sep 17 00:00:00 2001 +From: Jian <[email protected]> +Date: Tue, 17 Nov 2015 14:39:07 +0800 +Subject: [PATCH 2/3] [glplugin] Change wayland default res to 1024x768 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change wayland backend default window resolution +from 320x240 to 1024x768 + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Jian <[email protected]> +--- + gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c +index b34ad42..b557daa 100644 +--- a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c ++++ b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c +@@ -305,13 +305,13 @@ create_surfaces (GstGLWindowWaylandEGL * window_egl) + if (window_egl->window.window_width > 0) + width = window_egl->window.window_width; + else +- width = 320; ++ width = 1024; + window_egl->window.window_width = width; + + if (window_egl->window.window_height > 0) + height = window_egl->window.window_height; + else +- height = 240; ++ height = 768; + window_egl->window.window_height = height; + + if (!window_egl->window.native) { +-- +1.7.9.5 +
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +1 -0
@@ -16,6 +16,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0004-glplugin-Add-directviv-to-glimagesink-to-improve-playback-performance.patch \ file://0005-glplugin-support-video-crop-for-glimagesink.patch \ file://0006-glplugin-Support-fb-backend-for-gl-plugins.patch \ + file://0007-glplugin-Change-wayland-default-res-to-1024x768.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"
Signature · 1 line
1.9.1
PATCH 8/9 gstreamer1.0-plugins-bad: Fix gleffects fisheye shader compile error
In reply to Yuqing Zhushader function "sqrt" is not support, use float number 1.414
--- ...-glplugin-fix-gleffects-fisheye-shader-co.patch | 31 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 32 insertions(+) create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplugin-fix-gleffects-fisheye-shader-co.patch
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplugin-fix-gleffects-fisheye-shader-co.patch new file +31 -0
@@ -0,0 +1,31 @@ +From de919fc1cf4250db240757a94f302d81620b451c Mon Sep 17 00:00:00 2001 +From: Haihua Hu <[email protected]> +Date: Tue, 8 Dec 2015 14:09:58 +0800 +Subject: [PATCH 5/5] [MMFMWK-6966] [glplugin] fix gleffects fisheye shader + compile error + +shader function "sqrt" is not support, use float number 1.414 + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Haihua Hu <[email protected]> +--- + ext/gl/effects/gstgleffectssources.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ext/gl/effects/gstgleffectssources.c b/ext/gl/effects/gstgleffectssources.c +index 3da856c..076e21b 100644 +--- a/ext/gl/effects/gstgleffectssources.c ++++ b/ext/gl/effects/gstgleffectssources.c +@@ -152,7 +152,7 @@ const gchar *fisheye_fragment_source_gles2 = + " vec2 normcoord;" + " normcoord = texturecoord - 0.5;" + " float r = length (normcoord);" +- " normcoord *= r * sqrt(2);" ++ " normcoord *= r * 1.414;" + " texturecoord = normcoord + 0.5;" + " gl_FragColor = texture2D (tex, texturecoord);" + "}"; +-- +1.7.9.5 +
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +1 -0
@@ -18,6 +18,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0006-glplugin-Support-fb-backend-for-gl-plugins.patch \ file://0007-glplugin-Change-wayland-default-res-to-1024x768.patch \ file://0008-glplugin-Add-fps-print-in-glimagesink.patch \ + file://0009-glplugin-fix-gleffects-fisheye-shader-co.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"
Signature · 1 line
1.9.1
PATCH 5/9 gstreamer1.0-plugins-bad: Support fb backend for gl plugins
In reply to Yuqing Zhu1. Add fb support in glimagesink
2. Override set_render_rectangle() to support resize
--- ...lplugin-Support-fb-backend-for-gl-plugins.patch | 758 +++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 759 insertions(+) create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glplugin-Support-fb-backend-for-gl-plugins.patch
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glplugin-Support-fb-backend-for-gl-plugins.patch new file +758 -0
@@ -0,0 +1,758 @@ +From ac8e5de36847dc0c367fe5527f2eb851f95af408 Mon Sep 17 00:00:00 2001 +From: Haihua Hu <[email protected]> +Date: Mon, 16 Nov 2015 17:41:57 +0800 +Subject: [PATCH 1/3] [glplugin] Support fb backend for gl plugins +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +1.Add fb support in glimagesink +2.override set_render_rectangle() to support resize + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Haihua Hu <[email protected]> +--- + configure.ac | 23 ++- + gst-libs/gst/gl/Makefile.am | 5 + + gst-libs/gst/gl/fb/Makefile.am | 25 +++ + gst-libs/gst/gl/fb/gstgldisplay_fb.c | 109 +++++++++++++ + gst-libs/gst/gl/fb/gstgldisplay_fb.h | 67 ++++++++ + gst-libs/gst/gl/fb/gstglwindow_fb_egl.c | 267 +++++++++++++++++++++++++++++++ + gst-libs/gst/gl/fb/gstglwindow_fb_egl.h | 65 ++++++++ + gst-libs/gst/gl/gstgldisplay.c | 8 + + gst-libs/gst/gl/gstgldisplay.h | 1 + + gst-libs/gst/gl/gstglwindow.c | 5 + + 10 files changed, 574 insertions(+), 1 deletion(-) + create mode 100644 gst-libs/gst/gl/fb/Makefile.am + create mode 100644 gst-libs/gst/gl/fb/gstgldisplay_fb.c + create mode 100644 gst-libs/gst/gl/fb/gstgldisplay_fb.h + create mode 100644 gst-libs/gst/gl/fb/gstglwindow_fb_egl.c + create mode 100644 gst-libs/gst/gl/fb/gstglwindow_fb_egl.h + +diff --git a/configure.ac b/configure.ac +index d5467f7..f71a39c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -654,6 +654,7 @@ save_LIBS="$LIBS" + HAVE_GL=no + HAVE_GLES2=no + HAVE_WAYLAND_EGL=no ++HAV_FB_EGL=no + + HAVE_EGL_RPI=no + +@@ -743,6 +744,7 @@ case $host in + CFLAGS=$old_CFLAGS + + PKG_CHECK_MODULES(WAYLAND_EGL, wayland-client >= 1.0 wayland-cursor >= 1.0 wayland-egl >= 1.0, HAVE_WAYLAND_EGL=yes, HAVE_WAYLAND_EGL=no) ++ AC_CHECK_LIB(EGL, fbGetDisplay, HAVE_FB_EGL=yes, HAVE_FB_EGL=no) + ;; + esac + +@@ -945,6 +947,16 @@ case $host in + fi + fi + ++ if test "x$HAVE_FB_EGL" = "xyes"; then ++ if test "x$NEED_EGL" = "xno" -o "x$HAVE_EGL" = "xno"; then ++ AC_MSG_WARN([EGL is required by the fb backend for OpenGL support]) ++ else ++ HAVE_WINDOW_FB=yes ++ GL_LIBS="$GL_LIBS" ++ GL_CFLAGS="$GL_CFLAGS" ++ fi ++ fi ++ + if test "x$HAVE_EGL_RPI" = "xyes"; then + if test "x$NEED_DISPMANX" != "xno"; then + HAVE_WINDOW_DISPMANX=yes +@@ -959,7 +971,7 @@ case $host in + fi + else + if test "x$NEED_EGL" != "xno"; then +- if test "x$HAVE_WINDOW_WAYLAND" = "xyes" -o "x$HAVE_WINDOW_X11" = "xyes" -o "x$HAVE_WINDOW_DISPMANX" = "xyes"; then ++ if test "x$HAVE_WINDOW_WAYLAND" = "xyes" -o "x$HAVE_WINDOW_X11" = "xyes" -o "x$HAVE_WINDOW_DISPMANX" = "xyes" -o "x$HAVE_WINDOW_FB" = "xyes"; then + GL_LIBS="$GL_LIBS -lEGL $EGL_LIBS" + GL_CFLAGS="$GL_CFLAGS $EGL_CFLAGS" + USE_EGL=yes +@@ -1108,6 +1120,7 @@ GST_GL_HAVE_WINDOW_WAYLAND=0 + GST_GL_HAVE_WINDOW_ANDROID=0 + GST_GL_HAVE_WINDOW_DISPMANX=0 + GST_GL_HAVE_WINDOW_EAGL=0 ++GST_GL_HAVE_WINDOW_FB=0 + + if test "x$HAVE_WINDOW_X11" = "xyes"; then + GL_WINDOWS="x11 $GL_WINDOWS" +@@ -1137,6 +1150,10 @@ if test "x$HAVE_WINDOW_EAGL" = "xyes"; then + GL_WINDOWS="eagl $GL_WINDOWS" + GST_GL_HAVE_WINDOW_EAGL=1 + fi ++if test "x$HAVE_WINDOW_FB" = "xyes"; then ++ GL_WINDOWS="fb $GL_WINDOWS" ++ GST_GL_HAVE_WINDOW_FB=1 ++fi + + GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES + #define GST_GL_HAVE_WINDOW_X11 $GST_GL_HAVE_WINDOW_X11 +@@ -1146,6 +1163,7 @@ GL_CONFIG_DEFINES="$GL_CONFIG_DEFINES + #define GST_GL_HAVE_WINDOW_ANDROID $GST_GL_HAVE_WINDOW_ANDROID + #define GST_GL_HAVE_WINDOW_DISPMANX $GST_GL_HAVE_WINDOW_DISPMANX + #define GST_GL_HAVE_WINDOW_EAGL $GST_GL_HAVE_WINDOW_EAGL ++#define GST_GL_HAVE_WINDOW_FB $GST_GL_HAVE_WINDOW_FB + " + + dnl PLATFORM's +@@ -1217,6 +1235,7 @@ if test "x$GL_APIS" = "x" -o "x$GL_PLATFORMS" = "x" -o "x$GL_WINDOWS" = "x"; the + HAVE_WINDOW_ANDROID=no + HAVE_WINDOW_COCOA=no + HAVE_WINDOW_EAGL=no ++ HAVE_WINDOW_FB=no + fi + + AC_SUBST(GL_LIBS) +@@ -1232,6 +1251,7 @@ AM_CONDITIONAL(HAVE_WINDOW_DISPMANX, test "x$HAVE_WINDOW_DISPMANX" = "xyes") + AM_CONDITIONAL(HAVE_WINDOW_WAYLAND, test "x$HAVE_WINDOW_WAYLAND" = "xyes") + AM_CONDITIONAL(HAVE_WINDOW_ANDROID, test "x$HAVE_WINDOW_ANDROID" = "xyes") + AM_CONDITIONAL(HAVE_WINDOW_EAGL, test "x$HAVE_WINDOW_EAGL" = "xyes") ++AM_CONDITIONAL(HAVE_WINDOW_FB, test "x$HAVE_WINDOW_FB" = "xyes") + + AM_CONDITIONAL(USE_OPENGL, test "x$USE_OPENGL" = "xyes") + AM_CONDITIONAL(USE_GLES2, test "x$USE_GLES2" = "xyes") +@@ -3319,6 +3339,7 @@ gst-libs/gst/gl/egl/Makefile + gst-libs/gst/gl/wayland/Makefile + gst-libs/gst/gl/win32/Makefile + gst-libs/gst/gl/x11/Makefile ++gst-libs/gst/gl/fb/Makefile + gst-libs/gst/insertbin/Makefile + gst-libs/gst/interfaces/Makefile + gst-libs/gst/codecparsers/Makefile +diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am +index 6744d6e..71a4e69 100644 +--- a/gst-libs/gst/gl/Makefile.am ++++ b/gst-libs/gst/gl/Makefile.am +@@ -107,6 +107,11 @@ SUBDIRS += eagl + libgstgl_@GST_API_VERSION@_la_LIBADD += eagl/libgstgl-eagl.la + endif + ++if HAVE_WINDOW_FB ++SUBDIRS += fb ++libgstgl_@GST_API_VERSION@_la_LIBADD += fb/libgstgl-fb.la ++endif ++ + if USE_EGL + SUBDIRS += egl + libgstgl_@GST_API_VERSION@_la_LIBADD += egl/libgstgl-egl.la +diff --git a/gst-libs/gst/gl/fb/Makefile.am b/gst-libs/gst/gl/fb/Makefile.am +new file mode 100644 +index 0000000..8e4656c +--- /dev/null ++++ b/gst-libs/gst/gl/fb/Makefile.am +@@ -0,0 +1,25 @@ ++## Process this file with automake to produce Makefile.in ++ ++noinst_LTLIBRARIES = libgstgl-fb.la ++ ++libgstgl_fb_la_SOURCES = \ ++ gstgldisplay_fb.c \ ++ gstglwindow_fb_egl.c ++ ++noinst_HEADERS = \ ++ gstgldisplay_fb.h \ ++ gstglwindow_fb_egl.h ++ ++libgstgl_fbincludedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/gl/fb ++ ++libgstgl_fb_la_CFLAGS = \ ++ -I$(top_srcdir)/gst-libs \ ++ -I$(top_builddir)/gst-libs \ ++ $(GL_CFLAGS) \ ++ $(GST_PLUGINS_BASE_CFLAGS) \ ++ $(GST_BASE_CFLAGS) \ ++ $(GST_CFLAGS) ++ ++libgstgl_fb_la_LDFLAGS = \ ++ $(GST_LIB_LDFLAGS) \ ++ $(GST_ALL_LDFLAGS) +diff --git a/gst-libs/gst/gl/fb/gstgldisplay_fb.c b/gst-libs/gst/gl/fb/gstgldisplay_fb.c +new file mode 100644 +index 0000000..3be9756 +--- /dev/null ++++ b/gst-libs/gst/gl/fb/gstgldisplay_fb.c +@@ -0,0 +1,109 @@ ++/* ++ * GStreamer ++ * Copyright (C) 2014 Matthew Waters <[email protected]> ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, ++ * Boston, MA 02110-1301, USA. ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ ++#include <gst/gl/fb/gstgldisplay_fb.h> ++ ++GST_DEBUG_CATEGORY_STATIC (gst_gl_display_debug); ++#define GST_CAT_DEFAULT gst_gl_display_debug ++ ++G_DEFINE_TYPE (GstGLDisplayFB, gst_gl_display_fb, GST_TYPE_GL_DISPLAY); ++ ++static void gst_gl_display_fb_finalize (GObject * object); ++static guintptr gst_gl_display_fb_get_handle (GstGLDisplay * display); ++ ++static void ++gst_gl_display_fb_class_init (GstGLDisplayFBClass * klass) ++{ ++ GST_GL_DISPLAY_CLASS (klass)->get_handle = ++ GST_DEBUG_FUNCPTR (gst_gl_display_fb_get_handle); ++ ++ G_OBJECT_CLASS (klass)->finalize = gst_gl_display_fb_finalize; ++} ++ ++static void ++gst_gl_display_fb_init (GstGLDisplayFB * display_fb) ++{ ++ GstGLDisplay *display = (GstGLDisplay *) display_fb; ++ ++ display->type = GST_GL_DISPLAY_TYPE_FB; ++ display_fb->name = NULL; ++ display_fb->disp_idx = 0; ++ display_fb->display = NULL; ++} ++ ++static void ++gst_gl_display_fb_finalize (GObject * object) ++{ ++ GstGLDisplayFB *display_fb = GST_GL_DISPLAY_FB (object); ++ ++ if (display_fb->name) ++ g_free (display_fb->name); ++ ++ if (display_fb->display) ++ fbDestroyDisplay (display_fb->display); ++ ++ G_OBJECT_CLASS (gst_gl_display_fb_parent_class)->finalize (object); ++} ++ ++/** ++ * gst_gl_display_fb_new: ++ * @name: (allow-none): a display name ++ * ++ * Create a new #GstGLDisplayFB from the x11 display name. See XOpenDisplay() ++ * for details on what is a valid name. ++ * ++ * Returns: (transfer full): a new #GstGLDisplayFB or %NULL ++ */ ++GstGLDisplayFB * ++gst_gl_display_fb_new (gchar *name) ++{ ++ GstGLDisplayFB *display; ++ const gchar *fb_name = NULL; ++ ++ GST_DEBUG_CATEGORY_GET (gst_gl_display_debug, "gldisplay"); ++ GST_DEBUG ("creating Fb EGL display"); ++ ++ fb_name = name; ++ if (!fb_name) fb_name = "fb0"; ++ ++ display = g_object_new (GST_TYPE_GL_DISPLAY_FB, NULL); ++ display->name = g_strdup (fb_name); ++ sscanf (display->name, "fb%d", &display->disp_idx); ++ display->display = fbGetDisplayByIndex (display->disp_idx); ++ if (!display->display) { ++ GST_ERROR ("Failed to open FB display, \'%s\'", fb_name); ++ return NULL; ++ } ++ ++ GST_DEBUG ("Created fb EGL display %d", display->display); ++ ++ return display; ++} ++ ++static guintptr ++gst_gl_display_fb_get_handle (GstGLDisplay * display) ++{ ++ GST_DEBUG ("Get fb EGL display %d", GST_GL_DISPLAY_FB (display)->display); ++ return (guintptr) GST_GL_DISPLAY_FB (display)->display; ++} +diff --git a/gst-libs/gst/gl/fb/gstgldisplay_fb.h b/gst-libs/gst/gl/fb/gstgldisplay_fb.h +new file mode 100644 +index 0000000..62987c1 +--- /dev/null ++++ b/gst-libs/gst/gl/fb/gstgldisplay_fb.h +@@ -0,0 +1,67 @@ ++/* ++ * GStreamer ++ * Copyright (C) 2014 Matthew Waters <[email protected]> ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, ++ * Boston, MA 02110-1301, USA. ++ */ ++ ++#ifndef __GST_GL_DISPLAY_FB_H__ ++#define __GST_GL_DISPLAY_FB_H__ ++ ++#include <EGL/egl.h> ++#include <gst/gst.h> ++#include <gst/gl/gstgldisplay.h> ++ ++G_BEGIN_DECLS ++ ++GType gst_gl_display_fb_get_type (void); ++ ++#define GST_TYPE_GL_DISPLAY_FB (gst_gl_display_fb_get_type()) ++#define GST_GL_DISPLAY_FB(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_GL_DISPLAY_FB,GstGLDisplayFB)) ++#define GST_GL_DISPLAY_FB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_GL_DISPLAY_FB,GstGLDisplayFBClass)) ++#define GST_IS_GL_DISPLAY_FB(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_GL_DISPLAY_FB)) ++#define GST_IS_GL_DISPLAY_FB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_GL_DISPLAY_FB)) ++#define GST_GL_DISPLAY_FB_CAST(obj) ((GstGLDisplayFB*)(obj)) ++ ++typedef struct _GstGLDisplayFB GstGLDisplayFB; ++typedef struct _GstGLDisplayFBClass GstGLDisplayFBClass; ++ ++/** ++ * GstGLDisplayFB: ++ * ++ * the contents of a #GstGLDisplayFB are private and should only be accessed ++ * through the provided API ++ */ ++struct _GstGLDisplayFB ++{ ++ GstGLDisplay parent; ++ ++ /* <private> */ ++ gchar *name; ++ gint disp_idx; ++ EGLNativeDisplayType display; ++}; ++ ++struct _GstGLDisplayFBClass ++{ ++ GstGLDisplayClass object_class; ++}; ++ ++GstGLDisplayFB *gst_gl_display_fb_new (gchar *name); ++ ++G_END_DECLS ++ ++#endif /* __GST_GL_DISPLAY_FB_H__ */ +diff --git a/gst-libs/gst/gl/fb/gstglwindow_fb_egl.c b/gst-libs/gst/gl/fb/gstglwindow_fb_egl.c +new file mode 100644 +index 0000000..1e4c762 +--- /dev/null ++++ b/gst-libs/gst/gl/fb/gstglwindow_fb_egl.c +@@ -0,0 +1,267 @@ ++/* ++ * GStreamer ++ * Copyright (C) 2008 Julien Isorce <[email protected]> ++ * Copyright (C) 2012 Matthew Waters <[email protected]> ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, ++ * Boston, MA 02110-1301, USA. ++ */ ++ ++#include "../gstgl_fwd.h" ++#include <gst/gl/gstglcontext.h> ++ ++#include "gstglwindow_fb_egl.h" ++ ++#define GST_CAT_DEFAULT gst_gl_window_debug ++ ++#define gst_gl_window_fb_egl_parent_class parent_class ++G_DEFINE_TYPE (GstGLWindowFbEGL, gst_gl_window_fb_egl, ++ GST_GL_TYPE_WINDOW); ++ ++static guintptr gst_gl_window_fb_egl_get_window_handle (GstGLWindow * ++ window); ++static void gst_gl_window_fb_egl_set_window_handle (GstGLWindow * window, ++ guintptr handle); ++static void gst_gl_window_fb_egl_draw (GstGLWindow * window); ++static void gst_gl_window_fb_egl_close (GstGLWindow * window); ++static gboolean gst_gl_window_fb_egl_open (GstGLWindow * window, ++ GError ** error); ++static gboolean ++gst_gl_window_fb_egl_set_render_rectangle(GstGLWindow * window, ++ guint x, guint y, guint width, guint height); ++ ++static void ++gst_gl_window_fb_egl_class_init (GstGLWindowFbEGLClass * klass) ++{ ++ GstGLWindowClass *window_class = (GstGLWindowClass *) klass; ++ ++ window_class->get_window_handle = ++ GST_DEBUG_FUNCPTR (gst_gl_window_fb_egl_get_window_handle); ++ window_class->set_window_handle = ++ GST_DEBUG_FUNCPTR (gst_gl_window_fb_egl_set_window_handle); ++ window_class->draw_unlocked = ++ GST_DEBUG_FUNCPTR (gst_gl_window_fb_egl_draw); ++ window_class->draw = GST_DEBUG_FUNCPTR (gst_gl_window_fb_egl_draw); ++ window_class->close = GST_DEBUG_FUNCPTR (gst_gl_window_fb_egl_close); ++ window_class->open = GST_DEBUG_FUNCPTR (gst_gl_window_fb_egl_open); ++ window_class->set_render_rectangle = ++ GST_DEBUG_FUNCPTR (gst_gl_window_fb_egl_set_render_rectangle); ++} ++ ++static void ++gst_gl_window_fb_egl_init (GstGLWindowFbEGL * window) ++{ ++ GstGLWindowFbEGL *window_egl; ++ ++ window_egl = GST_GL_WINDOW_FB_EGL (window); ++ ++ window_egl->width = 0; ++ window_egl->height = 0; ++ window_egl->default_fullscreen = TRUE; ++ window_egl->display = 0; ++} ++ ++/* Must be called in the gl thread */ ++GstGLWindowFbEGL * ++gst_gl_window_fb_egl_new (GstGLDisplay * display) ++{ ++ GstGLWindowFbEGL *window; ++ const gchar *fb_name = NULL; ++ ++ if (!display) ++ return NULL; ++ ++ window = g_object_new (GST_GL_TYPE_WINDOW_FB_EGL, NULL); ++ window->display = gst_gl_display_get_handle (display); ++ if (!window->display) { ++ GST_ERROR ("failed to get display for egl window"); ++ return NULL; ++ } ++ ++ return window; ++} ++ ++static void ++gst_gl_window_fb_egl_close (GstGLWindow * window) ++{ ++ GstGLWindowFbEGL *window_egl; ++ ++ window_egl = GST_GL_WINDOW_FB_EGL (window); ++ ++ if (window_egl->win_id) { ++ fbDestroyWindow (window_egl->win_id); ++ } ++ ++ GST_GL_WINDOW_CLASS (parent_class)->close (window); ++} ++ ++static gboolean ++gst_gl_window_fb_egl_open (GstGLWindow * window, GError ** error) ++{ ++ GstGLWindowFbEGL *window_egl; ++ ++ window_egl = GST_GL_WINDOW_FB_EGL (window); ++ ++ if (!window_egl->display) { ++ GST_ERROR ("No display for window_egl."); ++ return FALSE; ++ } ++ ++ window_egl->win_id = fbCreateWindow (window_egl->display, -1, -1, 0, 0); ++ if (!window_egl->win_id) { ++ GST_ERROR ("Failed to create window_egl"); ++ return FALSE; ++ } ++ ++ fbGetDisplayGeometry (window_egl->display, &window_egl->width, &window_egl->height); ++ window_egl->req_width = window_egl->width; ++ window_egl->req_height = window_egl->height; ++ GST_DEBUG ("Open FB display succesfully, resolution is (%dx%d),display %d, window %d.", ++ window_egl->width, window_egl->height, window_egl->display, window_egl->win_id); ++ ++ if (!GST_GL_WINDOW_CLASS (parent_class)->open (window, error)) ++ return FALSE; ++ ++ return TRUE; ++} ++static guintptr ++gst_gl_window_fb_egl_get_window_handle (GstGLWindow * window) ++{ ++ GST_DEBUG ("fb egl get window: %d", GST_GL_WINDOW_FB_EGL (window)->win_id); ++ return (guintptr) GST_GL_WINDOW_FB_EGL (window)->win_id; ++} ++ ++static void ++gst_gl_window_fb_egl_set_window_handle (GstGLWindow * window, ++ guintptr handle) ++{ ++} ++ ++static void ++draw_cb (gpointer data) ++{ ++ GstGLWindowFbEGL *window_egl = (GstGLWindowFbEGL *)data; ++ GstGLWindow *window = GST_GL_WINDOW (window_egl); ++ GstGLContext *context = gst_gl_window_get_context (window); ++ GstGLContextClass *context_class = GST_GL_CONTEXT_GET_CLASS (context); ++ ++ /* default full screen */ ++ if (window_egl->default_fullscreen && window->resize) { ++ window->resize (window->resize_data, window_egl->width, window_egl->height); ++ window_egl->default_fullscreen = FALSE; ++ } ++ ++ if (window->draw) ++ window->draw (window->draw_data); ++ ++ GST_DEBUG ("####### draw data"); ++ context_class->swap_buffers (context); ++ ++ gst_object_unref (context); ++} ++ ++static void ++gst_gl_window_fb_egl_draw (GstGLWindow * window) ++{ ++ gst_gl_window_send_message (window, (GstGLWindowCB) draw_cb, window); ++} ++ ++static gboolean ++_calculate_viewport_coordinates(GstVideoRectangle *req, GstVideoRectangle *result, ++ guint display_width, guint display_height) ++{ ++ if(!req || !result || req->w < 1 || req->h < 1) ++ return FALSE; ++ ++ result->x = req->x; ++ result->y = display_height - (req->y + req->h); ++ result->w = req->w; ++ result->h = req->h; ++ ++ return TRUE; ++} ++ ++struct SetRenderRectangle ++{ ++ GstGLWindowFbEGL *window_egl; ++ GstVideoRectangle rect; ++}; ++ ++static void ++_free_set_render_rectangle (struct SetRenderRectangle *render) ++{ ++ if (render) { ++ if (render->window_egl) ++ gst_object_unref (render->window_egl); ++ g_free (render); ++ } ++} ++ ++static void ++_set_render_rectangle (gpointer data) ++{ ++ const GstGLFuncs *gl; ++ GstGLContext *context; ++ GstVideoRectangle result, video_rect, tmp_res; ++ struct SetRenderRectangle *render = data; ++ GstGLWindow *window = GST_GL_WINDOW (render->window_egl); ++ ++ context = gst_gl_window_get_context(window); ++ gl = context->gl_vtable; ++ ++ GST_LOG_OBJECT (render->window_egl, "setting render rectangle %i,%i+%ix%i", ++ render->rect.x, render->rect.y, render->rect.w, render->rect.h); ++ ++ video_rect.x = render->rect.x; ++ video_rect.y = render->rect.y; ++ video_rect.w = GST_VIDEO_SINK_WIDTH(window->resize_data); ++ video_rect.h = GST_VIDEO_SINK_HEIGHT(window->resize_data); ++ ++ gst_video_sink_center_rect(video_rect, render->rect, &tmp_res, TRUE); ++ ++ GST_LOG_OBJECT (render->window_egl, "set center render rectangle %i,%i+%ix%i", ++ tmp_res.x, tmp_res.y, tmp_res.w, tmp_res.h); ++ ++ /* need to transform screen coordinate to viewport coordinate */ ++ if( _calculate_viewport_coordinates(&tmp_res, &result, ++ render->window_egl->width, render->window_egl->height)){ ++ GST_LOG_OBJECT (render->window_egl, "viewport render rectangle %i,%i+%ix%i", ++ result.x, result.y, result.w, result.h); ++ gl->Viewport(result.x, result.y, result.w, result.h); ++ } ++ ++ if(context) ++ gst_object_unref(context); ++} ++ ++static gboolean ++gst_gl_window_fb_egl_set_render_rectangle(GstGLWindow * window, ++ guint x, guint y, guint width, guint height) ++{ ++ GstGLWindowFbEGL *window_egl = GST_GL_WINDOW_FB_EGL (window); ++ struct SetRenderRectangle *render; ++ ++ render = g_new0 (struct SetRenderRectangle, 1); ++ render->window_egl = gst_object_ref (window_egl); ++ render->rect.x = x; ++ render->rect.y = y; ++ render->rect.w = width; ++ render->rect.h = height; ++ ++ gst_gl_window_send_message_async (window, ++ (GstGLWindowCB) _set_render_rectangle, render, ++ (GDestroyNotify) _free_set_render_rectangle); ++ return TRUE; ++} +diff --git a/gst-libs/gst/gl/fb/gstglwindow_fb_egl.h b/gst-libs/gst/gl/fb/gstglwindow_fb_egl.h +new file mode 100644 +index 0000000..153ef5a +--- /dev/null ++++ b/gst-libs/gst/gl/fb/gstglwindow_fb_egl.h +@@ -0,0 +1,65 @@ ++/* ++ * GStreamer ++ * Copyright (C) 2012 Matthew Waters <[email protected]> ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, ++ * Boston, MA 02110-1301, USA. ++ */ ++ ++#ifndef __GST_GL_WINDOW_FB_EGL_H__ ++#define __GST_GL_WINDOW_FB_EGL_H__ ++ ++#include <gst/gl/gl.h> ++#include "EGL/eglvivante.h" ++ ++G_BEGIN_DECLS ++ ++#define GST_GL_TYPE_WINDOW_FB_EGL (gst_gl_window_fb_egl_get_type()) ++#define GST_GL_WINDOW_FB_EGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_WINDOW_FB_EGL, GstGLWindowFbEGL)) ++#define GST_GL_WINDOW_FB_EGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_WINDOW_FB_EGL, GstGLWindowFbEGLClass)) ++#define GST_GL_IS_WINDOW_FB_EGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_WINDOW_FB_EGL)) ++#define GST_GL_IS_WINDOW_FB_EGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_WINDOW_FB_EGL)) ++#define GST_GL_WINDOW_FB_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_WINDOW_FB_EGL, GstGLWindowFbEGL_Class)) ++ ++typedef struct _GstGLWindowFbEGL GstGLWindowFbEGL; ++typedef struct _GstGLWindowFbEGLClass GstGLWindowFbEGLClass; ++ ++struct _GstGLWindowFbEGL { ++ /*< private >*/ ++ GstGLWindow parent; ++ ++ /* <private> */ ++ gint width, req_width; ++ gint height, req_height; ++ gboolean default_fullscreen; ++ EGLNativeDisplayType display; ++ EGLNativeWindowType win_id; ++}; ++ ++struct _GstGLWindowFbEGLClass { ++ /*< private >*/ ++ GstGLWindowClass parent_class; ++ ++ /*< private >*/ ++ gpointer _reserved[GST_PADDING]; ++}; ++ ++GType gst_gl_window_fb_egl_get_type (void); ++ ++GstGLWindowFbEGL * gst_gl_window_fb_egl_new (GstGLDisplay * display); ++ ++G_END_DECLS ++ ++#endif /* __GST_GL_WINDOW_FB_EGL_H__ */ +diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c +index 51c1df5..e71f36d 100644 +--- a/gst-libs/gst/gl/gstgldisplay.c ++++ b/gst-libs/gst/gl/gstgldisplay.c +@@ -205,6 +205,14 @@ gst_gl_display_new (void) + if (!display && (!user_choice || g_strstr_len (user_choice, 7, "wayland"))) + display = GST_GL_DISPLAY (gst_gl_display_wayland_new (NULL)); + #endif ++#if GST_GL_HAVE_WINDOW_FB ++ if (!display && (!user_choice || g_strstr_len (user_choice, 2, "fb"))) { ++ const gchar *fb_name = NULL; ++ fb_name = g_getenv ("GST_GL_FB"); ++ if (!fb_name) fb_name = "fb0"; ++ display = GST_GL_DISPLAY (gst_gl_display_fb_new (fb_name)); ++ } ++#endif + #if GST_GL_HAVE_PLATFORM_EGL + if (!display && (!platform_choice + || g_strstr_len (platform_choice, 3, "egl"))) +diff --git a/gst-libs/gst/gl/gstgldisplay.h b/gst-libs/gst/gl/gstgldisplay.h +index 9341884..1b8f415 100644 +--- a/gst-libs/gst/gl/gstgldisplay.h ++++ b/gst-libs/gst/gl/gstgldisplay.h +@@ -49,6 +49,7 @@ typedef enum + GST_GL_DISPLAY_TYPE_WIN32 = (1 << 3), + GST_GL_DISPLAY_TYPE_DISPMANX = (1 << 4), + GST_GL_DISPLAY_TYPE_EGL = (1 << 5), ++ GST_GL_DISPLAY_TYPE_FB = (1 << 6), + + GST_GL_DISPLAY_TYPE_ANY = G_MAXUINT32 + } GstGLDisplayType; +diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c +index 4f27cd0..44b74ca 100644 +--- a/gst-libs/gst/gl/gstglwindow.c ++++ b/gst-libs/gst/gl/gstglwindow.c +@@ -301,6 +301,11 @@ gst_gl_window_new (GstGLDisplay * display) + if (!window && (!user_choice || g_strstr_len (user_choice, 4, "eagl"))) + window = GST_GL_WINDOW (gst_gl_window_eagl_new (display)); + #endif ++#if GST_GL_HAVE_WINDOW_FB ++ if (!window && (!user_choice || g_strstr_len (user_choice, 2, "fb"))) ++ window = GST_GL_WINDOW (gst_gl_window_fb_egl_new (display)); ++#endif ++ + if (!window) { + /* subclass returned a NULL window */ + GST_WARNING ("Could not create window. user specified %s, creating dummy" +-- +1.7.9.5 +
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +1 -0
@@ -15,6 +15,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0003-Fix-for-gl-plugin-not-built-in-wayland-backend.patch \ file://0004-glplugin-Add-directviv-to-glimagesink-to-improve-playback-performance.patch \ file://0005-glplugin-support-video-crop-for-glimagesink.patch \ + file://0006-glplugin-Support-fb-backend-for-gl-plugins.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"
Signature · 1 line
1.9.1
PATCH 9/9 gstreamer1.0-plugins-bad: Roll-back h264parse rank
In reply to Yuqing ZhuRoll back the h264parse rank.
For SW video decoder, it only support aligment au, But in GST1.6, rtph264depay output aligment nal format video. Need link h264parse to convert it to au alginment, make the sw decodear work.
--- .../0010-vidoeparse-Roll-back-h264parse-rank.patch | 35 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 36 insertions(+) create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0010-vidoeparse-Roll-back-h264parse-rank.patch
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0010-vidoeparse-Roll-back-h264parse-rank.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 12909bcae0504687ba1bb7c8fc385e858fdd3f30 Mon Sep 17 00:00:00 2001 +From: Lyon Wang <[email protected]> +Date: Mon, 4 Jan 2016 14:58:02 +0800 +Subject: [PATCH] [vidoeparse] Roll-back h264parse rank + +Roll back the h264parse rank. +MMFMWK-7012 +For SW video decoder, it only support aligment au, +But in GST1.6, rtph264depay output aligment nal format video. +Need link h264parse to convert it to au alginment, +make the sw decodear work + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Lyon Wang <[email protected]> +--- + gst/videoparsers/plugin.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gst/videoparsers/plugin.c b/gst/videoparsers/plugin.c +index c070b93..6fb0161 100644 +--- a/gst/videoparsers/plugin.c ++++ b/gst/videoparsers/plugin.c +@@ -56,7 +56,7 @@ plugin_init (GstPlugin * plugin) + ret |= gst_element_register (plugin, "h263parse", + GST_RANK_MARGINAL - 1, GST_TYPE_H263_PARSE); + ret |= gst_element_register (plugin, "h264parse", +- GST_RANK_MARGINAL - 1, GST_TYPE_H264_PARSE); ++ GST_RANK_PRIMARY + 1, GST_TYPE_H264_PARSE); + ret |= gst_element_register (plugin, "diracparse", + GST_RANK_NONE, GST_TYPE_DIRAC_PARSE); + ret |= gst_element_register (plugin, "mpegvideoparse", +-- +1.9.1 +
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +1 -0
@@ -19,6 +19,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0007-glplugin-Change-wayland-default-res-to-1024x768.patch \ file://0008-glplugin-Add-fps-print-in-glimagesink.patch \ file://0009-glplugin-fix-gleffects-fisheye-shader-co.patch \ + file://0010-vidoeparse-Roll-back-h264parse-rank.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"
Signature · 1 line
1.9.1
PATCH 7/9 gstreamer1.0-plugins-bad: Add fps print in glimagesink
In reply to Yuqing ZhuIn GST-1.6, Pipeline will set start time to 0 when state change form PAUSE to READY, so get start time in state change PLAYING_PAUSE.
--- ...008-glplugin-Add-fps-print-in-glimagesink.patch | 83 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 84 insertions(+) create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin-Add-fps-print-in-glimagesink.patch
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin-Add-fps-print-in-glimagesink.patch new file +83 -0
@@ -0,0 +1,83 @@ +From 8b6786fa049e9a5acfd6e7776fe0790c57c9c569 Mon Sep 17 00:00:00 2001 +From: Haihua Hu <[email protected]> +Date: Wed, 18 Nov 2015 15:10:22 +0800 +Subject: [PATCH 1/5] [glplugin] Add fps print in glimagesink + +In GST-1.6, Pipeline will set start time to 0 when state +change form PAUSE to READY, so get start time in state change +PLAYING_PAUSE. + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Haihua Hu <[email protected]> +--- + ext/gl/gstglimagesink.c | 15 +++++++++++++++ + ext/gl/gstglimagesink.h | 4 ++++ + 2 files changed, 19 insertions(+) + +diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c +index 6fc0f9e..60355ec 100644 +--- a/ext/gl/gstglimagesink.c ++++ b/ext/gl/gstglimagesink.c +@@ -587,6 +587,8 @@ gst_glimage_sink_init (GstGLImageSink * glimage_sink) + glimage_sink->overlay_compositor = NULL; + glimage_sink->cropmeta = NULL; + glimage_sink->prev_cropmeta = NULL; ++ glimage_sink->frame_showed = 0; ++ glimage_sink->run_time = 0; + + glimage_sink->mview_output_mode = DEFAULT_MULTIVIEW_MODE; + glimage_sink->mview_output_flags = DEFAULT_MULTIVIEW_FLAGS; +@@ -964,7 +966,10 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition) + + switch (transition) { + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: ++ { ++ glimage_sink->run_time = gst_element_get_start_time (GST_ELEMENT (glimage_sink)); + break; ++ } + case GST_STATE_CHANGE_PAUSED_TO_READY: + { + GstBuffer *buf[2]; +@@ -1047,6 +1052,14 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition) + g_slice_free(GstVideoCropMeta, glimage_sink->prev_cropmeta); + glimage_sink->prev_cropmeta = NULL; + ++ if (glimage_sink->run_time > 0) { ++ g_print ("Total showed frames (%lld), playing for (%"GST_TIME_FORMAT"), fps (%.3f).\n", ++ glimage_sink->frame_showed, GST_TIME_ARGS (glimage_sink->run_time), ++ (gfloat)GST_SECOND * glimage_sink->frame_showed / glimage_sink->run_time); ++ } ++ ++ glimage_sink->frame_showed = 0; ++ glimage_sink->run_time = 0; + break; + default: + break; +@@ -1474,6 +1487,8 @@ gst_glimage_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf) + return GST_FLOW_ERROR; + } + ++ glimage_sink->frame_showed++; ++ + return GST_FLOW_OK; + + /* ERRORS */ +diff --git a/ext/gl/gstglimagesink.h b/ext/gl/gstglimagesink.h +index a26ca4b..fa69999 100644 +--- a/ext/gl/gstglimagesink.h ++++ b/ext/gl/gstglimagesink.h +@@ -120,6 +120,10 @@ struct _GstGLImageSink + GstGLStereoDownmix mview_downmix_mode; + + GstGLOverlayCompositor *overlay_compositor; ++ ++ /* fps print support */ ++ guint64 frame_showed; ++ GstClockTime run_time; + }; + + struct _GstGLImageSinkClass +-- +1.7.9.5 +
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +1 -0
@@ -17,6 +17,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0005-glplugin-support-video-crop-for-glimagesink.patch \ file://0006-glplugin-Support-fb-backend-for-gl-plugins.patch \ file://0007-glplugin-Change-wayland-default-res-to-1024x768.patch \ + file://0008-glplugin-Add-fps-print-in-glimagesink.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"
Signature · 1 line
1.9.1
Re: [meta-fsl-arm][PATCH 1/9] gstreamer1.0-plugins-bad: Modify the videoparsers rank down to avoid link them in
In reply to Yuqing ZhuThis is not acceptable. It breaks every autoplugged pipeline which relies on these elements. If your goal is to let GStreamer prefer the FSL parsers from gst1.0-fsl-plugins, then increase their ranks instead.
Quoted 103 lines · Yuqing Zhu
. h263parse rank down to 63
. h264parse rank down to 63
. mpegvideoparse rank down to 63
. mpeg4videpparse rank down to 63
. pngparse, rank down to 63
. h265parse rank down to 63Signed-off-by Yuqing Zhu <[email protected]>--- .../0002-modifiy-the-videoparse-rank.patch | 62 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 10 ++-- 2 files changed, 69 insertions(+), 3 deletions(-)create mode 100755
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-modifiy-the-videoparse-rank.patchrecipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-modifiy-the-videoparse-rank.patch new file +62
-0@@ -0,0 +1,62 @@ +From 85b1ac94e34fcd3ebf2e4cedb48313c1189dc61d Mon Sep 17 00:00:00 2001 +From: Lyon Wang <[email protected]> +Date: Fri, 29 May 2015 09:54:56 +0800 +Subject: [PATCH 05/10] modifiy the videoparse rank + +- Modify the videparsers rank down to avoid link them in +. h263parse rank down to 63 +. h264parse rank down to 63 +. mpegvideoparse rank down to 63 +. mpeg4videpparse rank down to 63 +. pngparse, rank down to 63 +. h265parse rank down to 63 + +Upstream-Status: [i.MX specific] internal use only + +Signed-off-by: Lyon Wang <[email protected]> +--- + gst/videoparsers/plugin.c | 21 +++++++++++++++++++-- + 1 file changed, 19 insertions(+), 2 deletions(-) + +diff --git a/gst/videoparsers/plugin.c b/gst/videoparsers/plugin.c +index 79d1df6..c070b93 100644 +--- a/gst/videoparsers/plugin.c ++++ b/gst/videoparsers/plugin.c +@@ -35,7 +35,7 @@ static gboolean + plugin_init (GstPlugin * plugin) + { + gboolean ret = FALSE; +- ++#if 0 + ret |= gst_element_register (plugin, "h263parse", + GST_RANK_PRIMARY + 1, GST_TYPE_H263_PARSE); + ret |= gst_element_register (plugin, "h264parse", +@@ -52,7 +52,24 @@ plugin_init (GstPlugin * plugin) + GST_RANK_SECONDARY, GST_TYPE_H265_PARSE); + ret |= gst_element_register (plugin, "vc1parse", + GST_RANK_NONE, GST_TYPE_VC1_PARSE); +- ++#else ++ ret |= gst_element_register (plugin, "h263parse", ++ GST_RANK_MARGINAL - 1, GST_TYPE_H263_PARSE); ++ ret |= gst_element_register (plugin, "h264parse", ++ GST_RANK_MARGINAL - 1, GST_TYPE_H264_PARSE); ++ ret |= gst_element_register (plugin, "diracparse", ++ GST_RANK_NONE, GST_TYPE_DIRAC_PARSE); ++ ret |= gst_element_register (plugin, "mpegvideoparse", ++ GST_RANK_MARGINAL - 1, GST_TYPE_MPEGVIDEO_PARSE); ++ ret |= gst_element_register (plugin, "mpeg4videoparse", ++ GST_RANK_MARGINAL -1, GST_TYPE_MPEG4VIDEO_PARSE); ++ ret |= gst_element_register (plugin, "pngparse", ++ GST_RANK_MARGINAL-1, GST_TYPE_PNG_PARSE); ++ ret |= gst_element_register (plugin, "h265parse", ++ GST_RANK_MARGINAL-1, GST_TYPE_H265_PARSE); ++ ret |= gst_element_register (plugin, "vc1parse", ++ GST_RANK_NONE, GST_TYPE_VC1_PARSE); ++#endif + return ret; + } + +-- +1.9.1 +recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +7
-3@@ -10,9 +10,13 @@ PACKAGECONFIG_GL_mx6sl = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', \ base_contains('DISTRO_FEATURES', 'x11', \ 'opengl', '', d), '', d)}" -SRC_URI_append_mx6 = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h.patch" -SRC_URI_append_mx6ul = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h.patch" -SRC_URI_append_mx7 = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h.patch" +IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h.patch \ + file://0002-modifiy-the-videoparse-rank.patch \ +" + +SRC_URI_append_mx6 = "${IMX_PATCHES}" +SRC_URI_append_mx6ul = "${IMX_PATCHES}" +SRC_URI_append_mx7 = "${IMX_PATCHES}" PACKAGE_ARCH_mx6 = "${MACHINE_SOCARCH}"
Re: [meta-fsl-arm][PATCH 2/9] gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland backend
In reply to Yuqing ZhuThis is missing an explanation in the commit message for why you do this. I guess this is done because the Vivante EGL implementation has these version numbers, right?
Quoted 56 lines · Yuqing Zhu
Signed-off-by Yuqing Zhu <[email protected]>--- ...or-gl-plugin-not-built-in-wayland-backend.patch | 31 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 32 insertions(+)create mode 100755
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-Fix-for-gl-plugin-not-built-in-wayland-backend.patchrecipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-Fix-for-gl-plugin-not-built-in-wayland-backend.patch new file +31
-0@@ -0,0 +1,31 @@ +From 0f293874a1744b50b6f125589e564185bcb04596 Mon Sep 17 00:00:00 2001 +From: Jian <[email protected]> +Date: Fri, 24 Apr 2015 17:12:02 +0800 +Subject: [PATCH 10/10] Fix for gl plugin not built in wayland backend +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Jian <[email protected]> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index aba2ec0..d5467f7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -742,7 +742,7 @@ case $host in + LIBS=$old_LIBS + CFLAGS=$old_CFLAGS + +- PKG_CHECK_MODULES(WAYLAND_EGL, wayland-client >= 1.0 wayland-cursor >= 1.0 wayland-egl >= 9.0, HAVE_WAYLAND_EGL=yes, HAVE_WAYLAND_EGL=no) ++ PKG_CHECK_MODULES(WAYLAND_EGL, wayland-client >= 1.0 wayland-cursor >= 1.0 wayland-egl >= 1.0, HAVE_WAYLAND_EGL=yes, HAVE_WAYLAND_EGL=no) + ;; + esac + +-- +1.9.1 +recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +1
-0@@ -12,6 +12,7 @@ PACKAGECONFIG_GL_mx6sl = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', \ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h.patch \ file://0002-modifiy-the-videoparse-rank.patch \ + file://0003-Fix-for-gl-plugin-not-built-in-wayland-backend.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"
Re: [meta-fsl-arm][PATCH 2/9] gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland backend
Quoted 3 lines · Carlos Rafael Giani
This is missing an explanation in the commit message for why you do this. I guess this is done because the Vivante EGL implementation has these version numbers, right?
So the fix ought to be done in the Vivante pkg-config file instead.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Re: [meta-fsl-arm][PATCH 8/9] gstreamer1.0-plugins-bad: Fix gleffects fisheye shader compile error
In reply to Yuqing ZhuThis commit is acceptable. I can also live with the "i.MX specific" part, since this is a Vivante GPU problem.
I think this could be upstreamed, though, because having "sqrt(2)" in the shader does not actually gain anybody anything. It would be perfectly acceptable to replace it with 1.414213562 instead. I recommend posting this to GStreamer bugzilla.
Quoted 58 lines · Yuqing Zhu
shader function "sqrt" is not support, use float number 1.414
Signed-off-by Yuqing Zhu <[email protected]>--- ...-glplugin-fix-gleffects-fisheye-shader-co.patch | 31 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 32 insertions(+)create mode 100755
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplugin-fix-gleffects-fisheye-shader-co.patchrecipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplugin-fix-gleffects-fisheye-shader-co.patch new file +31
-0@@ -0,0 +1,31 @@ +From de919fc1cf4250db240757a94f302d81620b451c Mon Sep 17 00:00:00 2001 +From: Haihua Hu <[email protected]> +Date: Tue, 8 Dec 2015 14:09:58 +0800 +Subject: [PATCH 5/5] [MMFMWK-6966] [glplugin] fix gleffects fisheye shader + compile error + +shader function "sqrt" is not support, use float number 1.414 + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Haihua Hu <[email protected]> +--- + ext/gl/effects/gstgleffectssources.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ext/gl/effects/gstgleffectssources.c b/ext/gl/effects/gstgleffectssources.c +index 3da856c..076e21b 100644 +--- a/ext/gl/effects/gstgleffectssources.c ++++ b/ext/gl/effects/gstgleffectssources.c +@@ -152,7 +152,7 @@ const gchar *fisheye_fragment_source_gles2 = + " vec2 normcoord;" + " normcoord = texturecoord - 0.5;" + " float r = length (normcoord);" +- " normcoord *= r * sqrt(2);" ++ " normcoord *= r * 1.414;" + " texturecoord = normcoord + 0.5;" + " gl_FragColor = texture2D (tex, texturecoord);" + "}"; +-- +1.7.9.5 +recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +1
-0@@ -18,6 +18,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0006-glplugin-Support-fb-backend-for-gl-plugins.patch \ file://0007-glplugin-Change-wayland-default-res-to-1024x768.patch \ file://0008-glplugin-Add-fps-print-in-glimagesink.patch \ + file://0009-glplugin-fix-gleffects-fisheye-shader-co.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"
Re: [meta-fsl-arm][PATCH 7/9] gstreamer1.0-plugins-bad: Add fps print in glimagesink
In reply to Yuqing ZhuThis seems like a patch for debug output (the number of frames shown so far). This is OK, except that it should not be always enabled, and it should not directly call g_print. Have a look at fpsdisplaysink. It uses the last-message property, a "silent" property, and g_object_notify_by_pspec() to send out messages just like fakesink does.
Example:
gst-launch-1.0 videotestsrc ! fpsdisplaysink text-overlay=false silent=false -v
This is how your output should work.
Quoted 112 lines · Yuqing Zhu
In GST-1.6, Pipeline will set start time to 0 when state change form PAUSE to READY, so get start time in state change
PLAYING_PAUSE.Signed-off-by Yuqing Zhu <[email protected]>--- ...008-glplugin-Add-fps-print-in-glimagesink.patch | 83 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 84 insertions(+)create mode 100755
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin-Add-fps-print-in-glimagesink.patchrecipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin-Add-fps-print-in-glimagesink.patch new file +83
-0@@ -0,0 +1,83 @@ +From 8b6786fa049e9a5acfd6e7776fe0790c57c9c569 Mon Sep 17 00:00:00 2001 +From: Haihua Hu <[email protected]> +Date: Wed, 18 Nov 2015 15:10:22 +0800 +Subject: [PATCH 1/5] [glplugin] Add fps print in glimagesink + +In GST-1.6, Pipeline will set start time to 0 when state +change form PAUSE to READY, so get start time in state change +PLAYING_PAUSE. + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Haihua Hu <[email protected]> +--- + ext/gl/gstglimagesink.c | 15 +++++++++++++++ + ext/gl/gstglimagesink.h | 4 ++++ + 2 files changed, 19 insertions(+) + +diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c +index 6fc0f9e..60355ec 100644 +--- a/ext/gl/gstglimagesink.c ++++ b/ext/gl/gstglimagesink.c +@@ -587,6 +587,8 @@ gst_glimage_sink_init (GstGLImageSink * glimage_sink) + glimage_sink->overlay_compositor = NULL; + glimage_sink->cropmeta = NULL; + glimage_sink->prev_cropmeta = NULL; ++ glimage_sink->frame_showed = 0; ++ glimage_sink->run_time = 0; + + glimage_sink->mview_output_mode = DEFAULT_MULTIVIEW_MODE; + glimage_sink->mview_output_flags = DEFAULT_MULTIVIEW_FLAGS; +@@ -964,7 +966,10 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition) + + switch (transition) { + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: ++ { ++ glimage_sink->run_time = gst_element_get_start_time (GST_ELEMENT (glimage_sink)); + break; ++ } + case GST_STATE_CHANGE_PAUSED_TO_READY: + { + GstBuffer *buf[2]; +@@ -1047,6 +1052,14 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition) + g_slice_free(GstVideoCropMeta, glimage_sink->prev_cropmeta); + glimage_sink->prev_cropmeta = NULL; + ++ if (glimage_sink->run_time > 0) { ++ g_print ("Total showed frames (%lld), playing for (%"GST_TIME_FORMAT"), fps (%.3f).\n", ++ glimage_sink->frame_showed, GST_TIME_ARGS (glimage_sink->run_time), ++ (gfloat)GST_SECOND * glimage_sink->frame_showed / glimage_sink->run_time); ++ } ++ ++ glimage_sink->frame_showed = 0; ++ glimage_sink->run_time = 0; + break; + default: + break; +@@ -1474,6 +1487,8 @@ gst_glimage_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf) + return GST_FLOW_ERROR; + } + ++ glimage_sink->frame_showed++; ++ + return GST_FLOW_OK; + + /* ERRORS */ +diff --git a/ext/gl/gstglimagesink.h b/ext/gl/gstglimagesink.h +index a26ca4b..fa69999 100644 +--- a/ext/gl/gstglimagesink.h ++++ b/ext/gl/gstglimagesink.h +@@ -120,6 +120,10 @@ struct _GstGLImageSink + GstGLStereoDownmix mview_downmix_mode; + + GstGLOverlayCompositor *overlay_compositor; ++ ++ /* fps print support */ ++ guint64 frame_showed; ++ GstClockTime run_time; + }; + + struct _GstGLImageSinkClass +-- +1.7.9.5 +recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +1
-0@@ -17,6 +17,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0005-glplugin-support-video-crop-for-glimagesink.patch \ file://0006-glplugin-Support-fb-backend-for-gl-plugins.patch \ file://0007-glplugin-Change-wayland-default-res-to-1024x768.patch \ + file://0008-glplugin-Add-fps-print-in-glimagesink.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"
Re: [meta-fsl-arm][PATCH 6/9] gstreamer1.0-plugins-bad: Change wayland default res to 1024x768
In reply to Yuqing ZhuCould you add an explanation to the commit message why you increase the default resolution?
Quoted 69 lines · Yuqing Zhu
Change wayland backend default window resolution
from 320x240 to 1024x768.Signed-off-by Yuqing Zhu <[email protected]>--- ...in-Change-wayland-default-res-to-1024x768.patch | 41 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 42 insertions(+)create mode 100755
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-Change-wayland-default-res-to-1024x768.patchrecipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-Change-wayland-default-res-to-1024x768.patch new file +41
-0@@ -0,0 +1,41 @@ +From decc71a707d3b3596888d30a4c7ca25b57a686b2 Mon Sep 17 00:00:00 2001 +From: Jian <[email protected]> +Date: Tue, 17 Nov 2015 14:39:07 +0800 +Subject: [PATCH 2/3] [glplugin] Change wayland default res to 1024x768 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change wayland backend default window resolution +from 320x240 to 1024x768 + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Jian <[email protected]> +--- + gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c +index b34ad42..b557daa 100644 +--- a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c ++++ b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c +@@ -305,13 +305,13 @@ create_surfaces (GstGLWindowWaylandEGL * window_egl) + if (window_egl->window.window_width > 0) + width = window_egl->window.window_width; + else +- width = 320; ++ width = 1024; + window_egl->window.window_width = width; + + if (window_egl->window.window_height > 0) + height = window_egl->window.window_height; + else +- height = 240; ++ height = 768; + window_egl->window.window_height = height; + + if (!window_egl->window.native) { +-- +1.7.9.5 +recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +1
-0@@ -16,6 +16,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0004-glplugin-Add-directviv-to-glimagesink-to-improve-playback-performance.patch \ file://0005-glplugin-support-video-crop-for-glimagesink.patch \ file://0006-glplugin-Support-fb-backend-for-gl-plugins.patch \ + file://0007-glplugin-Change-wayland-default-res-to-1024x768.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"
Re: [meta-fsl-arm][PATCH 2/9] gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland backend
In reply to Carlos Rafael GianiHi Carlos,
We change it to 1.0 as the wayland-egl in our build is 1.0.
Below is the info from usr/lib/pkgconfig/wayland-egl.pc
Name: wayland-egl
Description: Bind the driver EGL to the Wayland API
Version: 1.0.0
Libs: -L${libdir} -lEGL
Cflags: -I${includedir}
B.R.
Yuqing Zhu
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Carlos Rafael Giani
Sent: Wednesday, January 27, 2016 7:22 PM
To: [email protected]
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH 2/9] gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland backend
This is missing an explanation in the commit message for why you do this. I guess this is done because the Vivante EGL implementation has these version numbers, right?
Quoted 61 lines · Yuqing Zhu
Signed-off-by Yuqing Zhu <[email protected]>--- ...or-gl-plugin-not-built-in-wayland-backend.patch | 31 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 32 insertions(+)create mode 100755
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-Fix-for-gl- plugin-not-built-in-wayland-backend.patch(quoted diff) +0
-0a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-Fix-for-g l-plugin-not-built-in-wayland-backend.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-Fix-for-g l-plugin-not-built-in-wayland-backend.patch
new file mode 100755
index 0000000..4960b2drecipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-Fix-f new file +35
-0+++ or-gl-plugin-not-built-in-wayland-backend.patch@@ -0,0 +1,31 @@ +From 0f293874a1744b50b6f125589e564185bcb04596 Mon Sep 17 00:00:00 +2001 +From: Jian <[email protected]> +Date: Fri, 24 Apr 2015 17:12:02 +0800 +Subject: [PATCH 10/10] Fix for gl plugin not built in wayland backend +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Jian <[email protected]> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac index aba2ec0..d5467f7 +100644 +--- a/configure.ac ++++ b/configure.ac +@@ -742,7 +742,7 @@ case $host in + LIBS=$old_LIBS + CFLAGS=$old_CFLAGS + +- PKG_CHECK_MODULES(WAYLAND_EGL, wayland-client >= 1.0 wayland-cursor >= 1.0 wayland-egl >= 9.0, HAVE_WAYLAND_EGL=yes, HAVE_WAYLAND_EGL=no) ++ PKG_CHECK_MODULES(WAYLAND_EGL, wayland-client >= 1.0 ++ wayland-cursor >= 1.0 wayland-egl >= 1.0, HAVE_WAYLAND_EGL=yes, ++ HAVE_WAYLAND_EGL=no) + ;; + esac + +-- +1.9.1 +(quoted diff) +0
-0a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend index 3df7ffa..493548b 100644
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend PACKAGECONFIG_GL_mx6sl = · line 18
Quoted 9 lines
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +2
-0@@ -12,6 +12,7 @@ PACKAGECONFIG_GL_mx6sl = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', \ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h.patch \ file://0002-modifiy-the-videoparse-rank.patch \ + + file://0003-Fix-for-gl-plugin-not-built-in-wayland-backend.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"
--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale
Re: [meta-fsl-arm][PATCH 7/9] gstreamer1.0-plugins-bad: Add fps print in glimagesink
In reply to Carlos Rafael GianiHi Carlos,
Your method seems more formal.
But this log is necessary and important for us to read GPU performance, so just using g_print directly. If you insist on this, we will refine it later.
B.R.
Yuqing Zhu
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Carlos Rafael Giani
Sent: Wednesday, January 27, 2016 8:23 PM
To: [email protected]
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH 7/9] gstreamer1.0-plugins-bad: Add fps print in glimagesink
This seems like a patch for debug output (the number of frames shown so far). This is OK, except that it should not be always enabled, and it should not directly call g_print. Have a look at fpsdisplaysink. It uses the last-message property, a "silent" property, and g_object_notify_by_pspec() to send out messages just like fakesink does.
Example:
gst-launch-1.0 videotestsrc ! fpsdisplaysink text-overlay=false silent=false -v
This is how your output should work.
Quoted 115 lines · Yuqing Zhu
In GST-1.6, Pipeline will set start time to 0 when state change form PAUSE to READY, so get start time in state change
PLAYING_PAUSE.Signed-off-by Yuqing Zhu <[email protected]>--- ...008-glplugin-Add-fps-print-in-glimagesink.patch | 83 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 84 insertions(+)create mode 100755
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin-Ad d-fps-print-in-glimagesink.patch(quoted diff) +0
-0a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin- Add-fps-print-in-glimagesink.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin- Add-fps-print-in-glimagesink.patch
new file mode 100755
index 0000000..32f78b2recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplu new file +86
-0+++ gin-Add-fps-print-in-glimagesink.patch@@ -0,0 +1,83 @@ +From 8b6786fa049e9a5acfd6e7776fe0790c57c9c569 Mon Sep 17 00:00:00 +2001 +From: Haihua Hu <[email protected]> +Date: Wed, 18 Nov 2015 15:10:22 +0800 +Subject: [PATCH 1/5] [glplugin] Add fps print in glimagesink + +In GST-1.6, Pipeline will set start time to 0 when state change form +PAUSE to READY, so get start time in state change PLAYING_PAUSE. + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Haihua Hu <[email protected]> +--- + ext/gl/gstglimagesink.c | 15 +++++++++++++++ + ext/gl/gstglimagesink.h | 4 ++++ + 2 files changed, 19 insertions(+) + +diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c index +6fc0f9e..60355ec 100644 +--- a/ext/gl/gstglimagesink.c ++++ b/ext/gl/gstglimagesink.c +@@ -587,6 +587,8 @@ gst_glimage_sink_init (GstGLImageSink * glimage_sink) + glimage_sink->overlay_compositor = NULL; + glimage_sink->cropmeta = NULL; + glimage_sink->prev_cropmeta = NULL; ++ glimage_sink->frame_showed = 0; ++ glimage_sink->run_time = 0; + + glimage_sink->mview_output_mode = DEFAULT_MULTIVIEW_MODE; + glimage_sink->mview_output_flags = DEFAULT_MULTIVIEW_FLAGS; @@ +-964,7 +966,10 @@ gst_glimage_sink_change_state (GstElement * +element, GstStateChange transition) + + switch (transition) { + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: ++ { ++ glimage_sink->run_time = gst_element_get_start_time ++ (GST_ELEMENT (glimage_sink)); + break; ++ } + case GST_STATE_CHANGE_PAUSED_TO_READY: + { + GstBuffer *buf[2]; +@@ -1047,6 +1052,14 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition) + g_slice_free(GstVideoCropMeta, glimage_sink->prev_cropmeta); + glimage_sink->prev_cropmeta = NULL; + ++ if (glimage_sink->run_time > 0) { ++ g_print ("Total showed frames (%lld), playing for (%"GST_TIME_FORMAT"), fps (%.3f).\n", ++ glimage_sink->frame_showed, GST_TIME_ARGS (glimage_sink->run_time), ++ (gfloat)GST_SECOND * glimage_sink->frame_showed / glimage_sink->run_time); ++ } ++ ++ glimage_sink->frame_showed = 0; ++ glimage_sink->run_time = 0; + break; + default: + break; +@@ -1474,6 +1487,8 @@ gst_glimage_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf) + return GST_FLOW_ERROR; + } + ++ glimage_sink->frame_showed++; ++ + return GST_FLOW_OK; + + /* ERRORS */ +diff --git a/ext/gl/gstglimagesink.h b/ext/gl/gstglimagesink.h index +a26ca4b..fa69999 100644 +--- a/ext/gl/gstglimagesink.h ++++ b/ext/gl/gstglimagesink.h +@@ -120,6 +120,10 @@ struct _GstGLImageSink + GstGLStereoDownmix mview_downmix_mode; + + GstGLOverlayCompositor *overlay_compositor; ++ ++ /* fps print support */ ++ guint64 frame_showed; ++ GstClockTime run_time; + }; + + struct _GstGLImageSinkClass +-- +1.7.9.5 +(quoted diff) +0
-0a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend index 40be87a..d3b8c2d 100644
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h · line 23
Quoted 9 lines
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +2
-0@@ -17,6 +17,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0005-glplugin-support-video-crop-for-glimagesink.patch \ file://0006-glplugin-Support-fb-backend-for-gl-plugins.patch \ file://0007-glplugin-Change-wayland-default-res-to-1024x768.patch \ + + file://0008-glplugin-Add-fps-print-in-glimagesink.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"
--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale
Re: [meta-fsl-arm][PATCH 8/9] gstreamer1.0-plugins-bad: Fix gleffects fisheye shader compile error
In reply to Carlos Rafael GianiHi Carlos,
The float number will diminishes readability, but we will create a ticket to GStreamer bugzilla.
If they accept it, I will push the patch to poky.
B.R.
Yuqing Zhu
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Carlos Rafael Giani
Sent: Wednesday, January 27, 2016 8:11 PM
To: [email protected]
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH 8/9] gstreamer1.0-plugins-bad: Fix gleffects fisheye shader compile error
This commit is acceptable. I can also live with the "i.MX specific" part, since this is a Vivante GPU problem.
I think this could be upstreamed, though, because having "sqrt(2)" in the shader does not actually gain anybody anything. It would be perfectly acceptable to replace it with 1.414213562 instead. I recommend posting this to GStreamer bugzilla.
Quoted 62 lines · Yuqing Zhu
shader function "sqrt" is not support, use float number 1.414
Signed-off-by Yuqing Zhu <[email protected]>--- ...-glplugin-fix-gleffects-fisheye-shader-co.patch | 31 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 32 insertions(+)create mode 100755
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplugin-fi x-gleffects-fisheye-shader-co.patch(quoted diff) +0
-0a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplugin- fix-gleffects-fisheye-shader-co.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplugin- fix-gleffects-fisheye-shader-co.patch
new file mode 100755
index 0000000..d017a1frecipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplu new file +34
-0+++ gin-fix-gleffects-fisheye-shader-co.patch@@ -0,0 +1,31 @@ +From de919fc1cf4250db240757a94f302d81620b451c Mon Sep 17 00:00:00 +2001 +From: Haihua Hu <[email protected]> +Date: Tue, 8 Dec 2015 14:09:58 +0800 +Subject: [PATCH 5/5] [MMFMWK-6966] [glplugin] fix gleffects fisheye +shader compile error + +shader function "sqrt" is not support, use float number 1.414 + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Haihua Hu <[email protected]> +--- + ext/gl/effects/gstgleffectssources.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ext/gl/effects/gstgleffectssources.c +b/ext/gl/effects/gstgleffectssources.c +index 3da856c..076e21b 100644 +--- a/ext/gl/effects/gstgleffectssources.c ++++ b/ext/gl/effects/gstgleffectssources.c +@@ -152,7 +152,7 @@ const gchar *fisheye_fragment_source_gles2 = + " vec2 normcoord;" + " normcoord = texturecoord - 0.5;" + " float r = length (normcoord);" +- " normcoord *= r * sqrt(2);" ++ " normcoord *= r * 1.414;" + " texturecoord = normcoord + 0.5;" + " gl_FragColor = texture2D (tex, texturecoord);" + "}"; +-- +1.7.9.5 +(quoted diff) +0
-0a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend index d3b8c2d..ce8a158 100644
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h · line 24
Quoted 9 lines
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +2
-0@@ -18,6 +18,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0006-glplugin-Support-fb-backend-for-gl-plugins.patch \ file://0007-glplugin-Change-wayland-default-res-to-1024x768.patch \ file://0008-glplugin-Add-fps-print-in-glimagesink.patch \ + + file://0009-glplugin-fix-gleffects-fisheye-shader-co.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"
--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale
Re: [meta-fsl-arm][PATCH 2/9] gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland backend
In reply to Yuqing ZhuQuoted 11 lines · Yuqing Zhu
Hi Carlos,
We change it to 1.0 as the wayland-egl in our build is 1.0.
Below is the info from
usr/lib/pkgconfig/wayland-egl.pc
Name: wayland-egl
Description: Bind the driver EGL to the Wayland API
Version: 1.0.0
Libs: -L${libdir} -lEGL
Cflags: -I${includedir}
This should be fixed or other projects will end changing to be changed to allow this version.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Re: [meta-fsl-arm][PATCH 7/9] gstreamer1.0-plugins-bad: Add fps print in glimagesink
In reply to Yuqing ZhuYuqing,
Quoted 6 lines · Yuqing Zhu
Hi Carlos,
Your method seems more formal.
But this log is necessary and important for us to read GPU performance, so just usingg_printdirectly. If you insist on this, we will refine it later.
I am with Carlos. You shouldn't blindly print here with a 'g_print'. You should instead take Carlos' suggestion or add a debug print (to use with --gst-debug=glimagesink:4 or something) so the user doesn't get spammed by non-error messages when using this sink. And yes this is a 'formal' method, but if anyone wanted to use this plugin for production use, that's how you would have to code it anyways.
- Pushpal
Quoted 155 lines
B.R.
Yuqing Zhu-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Carlos Rafael Giani
Sent: Wednesday, January 27, 2016 8:23 PM
To: [email protected]
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH 7/9] gstreamer1.0-plugins-bad: Add fps print in glimagesinkThis seems like a patch for debug output (the number of frames shown so far). This is OK, except that it should not be always enabled, and it should not directly call
g_print. Have a look at fpsdisplaysink. It uses the last-message property, a "silent" property, andg_object_notify_by_pspec()to send out messages just like fakesink does.Example:
gst-launch-1.0 videotestsrc ! fpsdisplaysink text-overlay=false silent=false -v
This is how your output should work.
Quoted 115 lines · Yuqing Zhu
In GST-1.6, Pipeline will set start time to 0 when state change form PAUSE to READY, so get start time in state change
PLAYING_PAUSE.Signed-off-by Yuqing Zhu <[email protected]>--- ...008-glplugin-Add-fps-print-in-glimagesink.patch | 83 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 84 insertions(+)create mode 100755
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin-Ad d-fps-print-in-glimagesink.patchdiff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin- Add-fps-print-in-glimagesink.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin- Add-fps-print-in-glimagesink.patch
new file mode 100755
index 0000000..32f78b2recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplu new file +86
-0+++ gin-Add-fps-print-in-glimagesink.patch@@ -0,0 +1,83 @@ +From 8b6786fa049e9a5acfd6e7776fe0790c57c9c569 Mon Sep 17 00:00:00 +2001 +From: Haihua Hu <[email protected]> +Date: Wed, 18 Nov 2015 15:10:22 +0800 +Subject: [PATCH 1/5] [glplugin] Add fps print in glimagesink + +In GST-1.6, Pipeline will set start time to 0 when state change form +PAUSE to READY, so get start time in state change PLAYING_PAUSE. + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Haihua Hu <[email protected]> +--- + ext/gl/gstglimagesink.c | 15 +++++++++++++++ + ext/gl/gstglimagesink.h | 4 ++++ + 2 files changed, 19 insertions(+) + +diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c index +6fc0f9e..60355ec 100644 +--- a/ext/gl/gstglimagesink.c ++++ b/ext/gl/gstglimagesink.c +@@ -587,6 +587,8 @@ gst_glimage_sink_init (GstGLImageSink * glimage_sink) + glimage_sink->overlay_compositor = NULL; + glimage_sink->cropmeta = NULL; + glimage_sink->prev_cropmeta = NULL; ++ glimage_sink->frame_showed = 0; ++ glimage_sink->run_time = 0; + + glimage_sink->mview_output_mode = DEFAULT_MULTIVIEW_MODE; + glimage_sink->mview_output_flags = DEFAULT_MULTIVIEW_FLAGS; @@ +-964,7 +966,10 @@ gst_glimage_sink_change_state (GstElement * +element, GstStateChange transition) + + switch (transition) { + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: ++ { ++ glimage_sink->run_time = gst_element_get_start_time ++ (GST_ELEMENT (glimage_sink)); + break; ++ } + case GST_STATE_CHANGE_PAUSED_TO_READY: + { + GstBuffer *buf[2]; +@@ -1047,6 +1052,14 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition) + g_slice_free(GstVideoCropMeta, glimage_sink->prev_cropmeta); + glimage_sink->prev_cropmeta = NULL; + ++ if (glimage_sink->run_time > 0) { ++ g_print ("Total showed frames (%lld), playing for (%"GST_TIME_FORMAT"), fps (%.3f).\n", ++ glimage_sink->frame_showed, GST_TIME_ARGS (glimage_sink->run_time), ++ (gfloat)GST_SECOND * glimage_sink->frame_showed / glimage_sink->run_time); ++ } ++ ++ glimage_sink->frame_showed = 0; ++ glimage_sink->run_time = 0; + break; + default: + break; +@@ -1474,6 +1487,8 @@ gst_glimage_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf) + return GST_FLOW_ERROR; + } + ++ glimage_sink->frame_showed++; ++ + return GST_FLOW_OK; + + /* ERRORS */ +diff --git a/ext/gl/gstglimagesink.h b/ext/gl/gstglimagesink.h index +a26ca4b..fa69999 100644 +--- a/ext/gl/gstglimagesink.h ++++ b/ext/gl/gstglimagesink.h +@@ -120,6 +120,10 @@ struct _GstGLImageSink + GstGLStereoDownmix mview_downmix_mode; + + GstGLOverlayCompositor *overlay_compositor; ++ ++ /* fps print support */ ++ guint64 frame_showed; ++ GstClockTime run_time; + }; + + struct _GstGLImageSinkClass +-- +1.7.9.5 +diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend index 40be87a..d3b8c2d 100644
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h · line 23
Quoted 9 lines
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +2
-0@@ -17,6 +17,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0005-glplugin-support-video-crop-for-glimagesink.patch \ file://0006-glplugin-Support-fb-backend-for-gl-plugins.patch \ file://0007-glplugin-Change-wayland-default-res-to-1024x768.patch \ + + file://0008-glplugin-Add-fps-print-in-glimagesink.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale
--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale
Re: [meta-fsl-arm][PATCH 7/9] gstreamer1.0-plugins-bad: Add fps print in glimagesink
Hi Pushpal,
Thanks for your good suggestion. We will refine it later.
B.R.
Yuqing Zhu
-----Original Message-----
From: Pushpal Sidhu [mailto:[email protected]]
Sent: Friday, January 29, 2016 1:10 AM
To: Yuqing Zhu <[email protected]>
Cc: Carlos Rafael Giani <[email protected]>; [email protected]
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH 7/9] gstreamer1.0-plugins-bad: Add fps print in glimagesink
Yuqing,
Quoted 6 lines · Yuqing Zhu
Hi Carlos,
Your method seems more formal.
But this log is necessary and important for us to read GPU performance, so just usingg_printdirectly. If you insist on this, we will refine it later.
I am with Carlos. You shouldn't blindly print here with a 'g_print'.
You should instead take Carlos' suggestion or add a debug print (to use with --gst-debug=glimagesink:4 or something) so the user doesn't get spammed by non-error messages when using this sink. And yes this is a 'formal' method, but if anyone wanted to use this plugin for production use, that's how you would have to code it anyways.
- Pushpal
Quoted 168 lines
B.R.
Yuqing Zhu-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Carlos Rafael Giani
Sent: Wednesday, January 27, 2016 8:23 PM
To: [email protected]
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH 7/9] gstreamer1.0-plugins-bad: Add fps print in glimagesinkThis seems like a patch for debug output (the number of frames shown so far). This is OK, except that it should not be always enabled, and it should not directly call
g_print. Have a look at fpsdisplaysink. It uses the last-message property, a "silent" property, andg_object_notify_by_pspec()to send out messages just like fakesink does.Example:
gst-launch-1.0 videotestsrc ! fpsdisplaysink text-overlay=false silent=false -v
This is how your output should work.
Quoted 120 lines · Yuqing Zhu
In GST-1.6, Pipeline will set start time to 0 when state change form PAUSE to READY, so get start time in state change
PLAYING_PAUSE.Signed-off-by Yuqing Zhu <[email protected]>--- ...008-glplugin-Add-fps-print-in-glimagesink.patch | 83 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 84 insertions(+)create mode 100755
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin-A d
d-fps-print-in-glimagesink.patchdiff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin -
Add-fps-print-in-glimagesink.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin -
Add-fps-print-in-glimagesink.patch
new file mode 100755
index 0000000..32f78b2recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glpl new file +86
-0+++ u gin-Add-fps-print-in-glimagesink.patch@@ -0,0 +1,83 @@ +From 8b6786fa049e9a5acfd6e7776fe0790c57c9c569 Mon Sep 17 00:00:00 +2001 +From: Haihua Hu <[email protected]> +Date: Wed, 18 Nov 2015 15:10:22 +0800 +Subject: [PATCH 1/5] [glplugin] Add fps print in glimagesink + +In GST-1.6, Pipeline will set start time to 0 when state change form +PAUSE to READY, so get start time in state change PLAYING_PAUSE. + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Haihua Hu <[email protected]> +--- + ext/gl/gstglimagesink.c | 15 +++++++++++++++ + ext/gl/gstglimagesink.h | 4 ++++ + 2 files changed, 19 insertions(+) + +diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c index +6fc0f9e..60355ec 100644 +--- a/ext/gl/gstglimagesink.c ++++ b/ext/gl/gstglimagesink.c +@@ -587,6 +587,8 @@ gst_glimage_sink_init (GstGLImageSink * glimage_sink) + glimage_sink->overlay_compositor = NULL; + glimage_sink->cropmeta = NULL; + glimage_sink->prev_cropmeta = NULL; ++ glimage_sink->frame_showed = 0; ++ glimage_sink->run_time = 0; + + glimage_sink->mview_output_mode = DEFAULT_MULTIVIEW_MODE; + glimage_sink->mview_output_flags = DEFAULT_MULTIVIEW_FLAGS; @@ +-964,7 +966,10 @@ gst_glimage_sink_change_state (GstElement * +element, GstStateChange transition) + + switch (transition) { + case GST_STATE_CHANGE_PLAYING_TO_PAUSED: ++ { ++ glimage_sink->run_time = gst_element_get_start_time ++ (GST_ELEMENT (glimage_sink)); + break; ++ } + case GST_STATE_CHANGE_PAUSED_TO_READY: + { + GstBuffer *buf[2]; +@@ -1047,6 +1052,14 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition) + g_slice_free(GstVideoCropMeta, glimage_sink->prev_cropmeta); + glimage_sink->prev_cropmeta = NULL; + ++ if (glimage_sink->run_time > 0) { ++ g_print ("Total showed frames (%lld), playing for (%"GST_TIME_FORMAT"), fps (%.3f).\n", ++ glimage_sink->frame_showed, GST_TIME_ARGS (glimage_sink->run_time), ++ (gfloat)GST_SECOND * glimage_sink->frame_showed / glimage_sink->run_time); ++ } ++ ++ glimage_sink->frame_showed = 0; ++ glimage_sink->run_time = 0; + break; + default: + break; +@@ -1474,6 +1487,8 @@ gst_glimage_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf) + return GST_FLOW_ERROR; + } + ++ glimage_sink->frame_showed++; ++ + return GST_FLOW_OK; + + /* ERRORS */ +diff --git a/ext/gl/gstglimagesink.h b/ext/gl/gstglimagesink.h index +a26ca4b..fa69999 100644 +--- a/ext/gl/gstglimagesink.h ++++ b/ext/gl/gstglimagesink.h +@@ -120,6 +120,10 @@ struct _GstGLImageSink + GstGLStereoDownmix mview_downmix_mode; + + GstGLOverlayCompositor *overlay_compositor; ++ ++ /* fps print support */ ++ guint64 frame_showed; ++ GstClockTime run_time; + }; + + struct _GstGLImageSinkClass +-- +1.7.9.5 +diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend index 40be87a..d3b8c2d 100644
---
a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappen +++ drecipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glpl IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h
Quoted 10 lines
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glpl new file +2
-0@@ -17,6 +17,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0005-glplugin-support-video-crop-for-glimagesink.patch \ file://0006-glplugin-Support-fb-backend-for-gl-plugins.patch \ file://0007-glplugin-Change-wayland-default-res-to-1024x768.patch \ + + file://0008-glplugin-Add-fps-print-in-glimagesink.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale
--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale
Re: [meta-fsl-arm][PATCH 6/9] gstreamer1.0-plugins-bad: Change wayland default res to 1024x768
In reply to Carlos Rafael GianiHi Carlos,
As in our release, the default display is full screen in LVDS, and 1024x768 resolution will be better in testing for our released platform.
B.R.
Yuqing Zhu
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Carlos Rafael Giani
Sent: Wednesday, January 27, 2016 8:24 PM
To: [email protected]
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH 6/9] gstreamer1.0-plugins-bad: Change wayland default res to 1024x768
Could you add an explanation to the commit message why you increase the default resolution?
Quoted 74 lines · Yuqing Zhu
Change wayland backend default window resolution from 320x240 to 1024x768.
Signed-off-by Yuqing Zhu <[email protected]>--- ...in-Change-wayland-default-res-to-1024x768.patch | 41 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 42 insertions(+)create mode 100755
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-Ch ange-wayland-default-res-to-1024x768.patch(quoted diff) +0
-0a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin- Change-wayland-default-res-to-1024x768.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin- Change-wayland-default-res-to-1024x768.patch
new file mode 100755
index 0000000..49a0a9drecipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplu new file +45
-0+++ gin-Change-wayland-default-res-to-1024x768.patch@@ -0,0 +1,41 @@ +From decc71a707d3b3596888d30a4c7ca25b57a686b2 Mon Sep 17 00:00:00 +2001 +From: Jian <[email protected]> +Date: Tue, 17 Nov 2015 14:39:07 +0800 +Subject: [PATCH 2/3] [glplugin] Change wayland default res to +1024x768 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change wayland backend default window resolution from 320x240 to +1024x768 + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Jian <[email protected]> +--- + gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c +b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c +index b34ad42..b557daa 100644 +--- a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c ++++ b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c +@@ -305,13 +305,13 @@ create_surfaces (GstGLWindowWaylandEGL * window_egl) + if (window_egl->window.window_width > 0) + width = window_egl->window.window_width; + else +- width = 320; ++ width = 1024; + window_egl->window.window_width = width; + + if (window_egl->window.window_height > 0) + height = window_egl->window.window_height; + else +- height = 240; ++ height = 768; + window_egl->window.window_height = height; + + if (!window_egl->window.native) { +-- +1.7.9.5 +(quoted diff) +0
-0a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend index b290423..40be87a 100644
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h · line 22
Quoted 9 lines
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +2
-0@@ -16,6 +16,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0004-glplugin-Add-directviv-to-glimagesink-to-improve-playback-performance.patch \ file://0005-glplugin-support-video-crop-for-glimagesink.patch \ file://0006-glplugin-Support-fb-backend-for-gl-plugins.patch \ + + file://0007-glplugin-Change-wayland-default-res-to-1024x768.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"
--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale
Re: [meta-fsl-arm][PATCH 2/9] gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland backend
In reply to Otavio SalvadorHi Otavio,
In Gstreamer, the default one is Mesa EGL with version 9.0. But we use Vivante EGL with this 1.0 version number. So we labeled this patch as i.MX specific.
B.R.
Yuqing Zhu
-----Original Message-----
From: Otavio Salvador [mailto:[email protected]]
Sent: Thursday, January 28, 2016 7:53 PM
To: Yuqing Zhu <[email protected]>
Cc: Carlos Rafael Giani <[email protected]>; [email protected]
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH 2/9] gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland backend
Quoted 11 lines · Yuqing Zhu
Hi Carlos,
We change it to 1.0 as the wayland-egl in our build is 1.0.
Below is the info from
usr/lib/pkgconfig/wayland-egl.pc
Name: wayland-egl
Description: Bind the driver EGL to the Wayland API
Version: 1.0.0
Libs: -L${libdir} -lEGL
Cflags: -I${includedir}
This should be fixed or other projects will end changing to be changed to allow this version.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Re: [meta-fsl-arm][PATCH 2/9] gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland backend
This is something I've observed as well. The question is: should Vivante's wayland-egl .pc be patched? Or should other applications have to adapt to it? I am inclined towards the first option.
Quoted 31 lines · Yuqing Zhu
Hi Otavio,
In Gstreamer, the default one is Mesa EGL with version 9.0. But we use Vivante EGL with this 1.0 version number. So we labeled this patch as i.MX specific.
B.R.
Yuqing Zhu
-----Original Message-----
From: Otavio Salvador [mailto:[email protected]]
Sent: Thursday, January 28, 2016 7:53 PM
To: Yuqing Zhu <[email protected]>
Cc: Carlos Rafael Giani <[email protected]>; [email protected]
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH 2/9] gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland backendQuoted 11 lines · Yuqing Zhu
Hi Carlos,
We change it to 1.0 as the wayland-egl in our build is 1.0.
Below is the info from
usr/lib/pkgconfig/wayland-egl.pc
Name: wayland-egl
Description: Bind the driver EGL to the Wayland API
Version: 1.0.0
Libs: -L${libdir} -lEGL
Cflags: -I${includedir}This should be fixed or other projects will end changing to be changed to allow this version.
Re: [meta-fsl-arm][PATCH 6/9] gstreamer1.0-plugins-bad: Change wayland default res to 1024x768
In reply to Yuqing ZhuI'd say this is OK then. It doesn't break anything and really is i.MX specific.
Quoted 107 lines · Yuqing Zhu
Hi Carlos,
As in our release, the default display is full screen in LVDS, and 1024x768 resolution will be better in testing for our released platform.
B.R.
Yuqing Zhu-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Carlos Rafael Giani
Sent: Wednesday, January 27, 2016 8:24 PM
To: [email protected]
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH 6/9] gstreamer1.0-plugins-bad: Change wayland default res to 1024x768Could you add an explanation to the commit message why you increase the default resolution?
Quoted 74 lines · Yuqing Zhu
Change wayland backend default window resolution from 320x240 to 1024x768.
Signed-off-by Yuqing Zhu <[email protected]>--- ...in-Change-wayland-default-res-to-1024x768.patch | 41 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 42 insertions(+)create mode 100755
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-Ch ange-wayland-default-res-to-1024x768.patchdiff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin- Change-wayland-default-res-to-1024x768.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin- Change-wayland-default-res-to-1024x768.patch
new file mode 100755
index 0000000..49a0a9drecipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplu new file +45
-0+++ gin-Change-wayland-default-res-to-1024x768.patch@@ -0,0 +1,41 @@ +From decc71a707d3b3596888d30a4c7ca25b57a686b2 Mon Sep 17 00:00:00 +2001 +From: Jian <[email protected]> +Date: Tue, 17 Nov 2015 14:39:07 +0800 +Subject: [PATCH 2/3] [glplugin] Change wayland default res to +1024x768 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change wayland backend default window resolution from 320x240 to +1024x768 + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Jian <[email protected]> +--- + gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c +b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c +index b34ad42..b557daa 100644 +--- a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c ++++ b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c +@@ -305,13 +305,13 @@ create_surfaces (GstGLWindowWaylandEGL * window_egl) + if (window_egl->window.window_width > 0) + width = window_egl->window.window_width; + else +- width = 320; ++ width = 1024; + window_egl->window.window_width = width; + + if (window_egl->window.window_height > 0) + height = window_egl->window.window_height; + else +- height = 240; ++ height = 768; + window_egl->window.window_height = height; + + if (!window_egl->window.native) { +-- +1.7.9.5 +diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend index b290423..40be87a 100644
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h · line 22
Quoted 9 lines
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +2
-0@@ -16,6 +16,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0004-glplugin-Add-directviv-to-glimagesink-to-improve-playback-performance.patch \ file://0005-glplugin-support-video-crop-for-glimagesink.patch \ file://0006-glplugin-Support-fb-backend-for-gl-plugins.patch \ + + file://0007-glplugin-Change-wayland-default-res-to-1024x768.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale
Re: [meta-fsl-arm][PATCH 8/9] gstreamer1.0-plugins-bad: Fix gleffects fisheye shader compile error
In reply to Yuqing ZhuTrue, it is less readable. But adding a comment should suffice.
normcoord *= r * 1.414; // not using sqrt(2), since some GPUs do not support sqrt()
Quoted 100 lines · Yuqing Zhu
Hi Carlos,
The float number will diminishes readability, but we will create a ticket to GStreamer bugzilla.
If they accept it, I will push the patch to poky.B.R.
Yuqing Zhu-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Carlos Rafael Giani
Sent: Wednesday, January 27, 2016 8:11 PM
To: [email protected]
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH 8/9] gstreamer1.0-plugins-bad: Fix gleffects fisheye shader compile errorThis commit is acceptable. I can also live with the "i.MX specific" part, since this is a Vivante GPU problem.
I think this could be upstreamed, though, because having "sqrt(2)" in the shader does not actually gain anybody anything. It would be perfectly acceptable to replace it with 1.414213562 instead. I recommend posting this to GStreamer bugzilla.
Quoted 62 lines · Yuqing Zhu
shader function "sqrt" is not support, use float number 1.414
Signed-off-by Yuqing Zhu <[email protected]>--- ...-glplugin-fix-gleffects-fisheye-shader-co.patch | 31 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 32 insertions(+)create mode 100755
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplugin-fi x-gleffects-fisheye-shader-co.patchdiff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplugin- fix-gleffects-fisheye-shader-co.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplugin- fix-gleffects-fisheye-shader-co.patch
new file mode 100755
index 0000000..d017a1frecipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplu new file +34
-0+++ gin-fix-gleffects-fisheye-shader-co.patch@@ -0,0 +1,31 @@ +From de919fc1cf4250db240757a94f302d81620b451c Mon Sep 17 00:00:00 +2001 +From: Haihua Hu <[email protected]> +Date: Tue, 8 Dec 2015 14:09:58 +0800 +Subject: [PATCH 5/5] [MMFMWK-6966] [glplugin] fix gleffects fisheye +shader compile error + +shader function "sqrt" is not support, use float number 1.414 + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Haihua Hu <[email protected]> +--- + ext/gl/effects/gstgleffectssources.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ext/gl/effects/gstgleffectssources.c +b/ext/gl/effects/gstgleffectssources.c +index 3da856c..076e21b 100644 +--- a/ext/gl/effects/gstgleffectssources.c ++++ b/ext/gl/effects/gstgleffectssources.c +@@ -152,7 +152,7 @@ const gchar *fisheye_fragment_source_gles2 = + " vec2 normcoord;" + " normcoord = texturecoord - 0.5;" + " float r = length (normcoord);" +- " normcoord *= r * sqrt(2);" ++ " normcoord *= r * 1.414;" + " texturecoord = normcoord + 0.5;" + " gl_FragColor = texture2D (tex, texturecoord);" + "}"; +-- +1.7.9.5 +diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend index d3b8c2d..ce8a158 100644
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h · line 24
Quoted 9 lines
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +2
-0@@ -18,6 +18,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0006-glplugin-Support-fb-backend-for-gl-plugins.patch \ file://0007-glplugin-Change-wayland-default-res-to-1024x768.patch \ file://0008-glplugin-Add-fps-print-in-glimagesink.patch \ + + file://0009-glplugin-fix-gleffects-fisheye-shader-co.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale
Re: [meta-fsl-arm][PATCH 8/9] gstreamer1.0-plugins-bad: Fix gleffects fisheye shader compile error
Hi Carlos,
Thanks for your good suggestion. We have created a ticket to GST Bugzilla, and it has been accepted in 1.6.4 release. So I will upstream it to poky.
Thanks!
B.R.
Yuqing Zhu
-----Original Message-----
From: Carlos Rafael Giani [mailto:[email protected]]
Sent: Monday, February 01, 2016 3:28 PM
To: Yuqing Zhu <[email protected]>; [email protected]
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH 8/9] gstreamer1.0-plugins-bad: Fix gleffects fisheye shader compile error
True, it is less readable. But adding a comment should suffice.
normcoord *= r * 1.414; // not using sqrt(2), since some GPUs do not support sqrt()
Quoted 100 lines · Yuqing Zhu
Hi Carlos,
The float number will diminishes readability, but we will create a ticket to GStreamer bugzilla.
If they accept it, I will push the patch to poky.B.R.
Yuqing Zhu-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Carlos Rafael Giani
Sent: Wednesday, January 27, 2016 8:11 PM
To: [email protected]
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH 8/9] gstreamer1.0-plugins-bad: Fix gleffects fisheye shader compile errorThis commit is acceptable. I can also live with the "i.MX specific" part, since this is a Vivante GPU problem.
I think this could be upstreamed, though, because having "sqrt(2)" in the shader does not actually gain anybody anything. It would be perfectly acceptable to replace it with 1.414213562 instead. I recommend posting this to GStreamer bugzilla.
Quoted 62 lines · Yuqing Zhu
shader function "sqrt" is not support, use float number 1.414
Signed-off-by Yuqing Zhu <[email protected]>--- ...-glplugin-fix-gleffects-fisheye-shader-co.patch | 31 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 1 + 2 files changed, 32 insertions(+)create mode 100755
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplugin-fi x-gleffects-fisheye-shader-co.patchdiff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplugin- fix-gleffects-fisheye-shader-co.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplugin- fix-gleffects-fisheye-shader-co.patch
new file mode 100755
index 0000000..d017a1frecipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0009-glplu new file +34
-0+++ gin-fix-gleffects-fisheye-shader-co.patch@@ -0,0 +1,31 @@ +From de919fc1cf4250db240757a94f302d81620b451c Mon Sep 17 00:00:00 +2001 +From: Haihua Hu <[email protected]> +Date: Tue, 8 Dec 2015 14:09:58 +0800 +Subject: [PATCH 5/5] [MMFMWK-6966] [glplugin] fix gleffects fisheye +shader compile error + +shader function "sqrt" is not support, use float number 1.414 + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Haihua Hu <[email protected]> +--- + ext/gl/effects/gstgleffectssources.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ext/gl/effects/gstgleffectssources.c +b/ext/gl/effects/gstgleffectssources.c +index 3da856c..076e21b 100644 +--- a/ext/gl/effects/gstgleffectssources.c ++++ b/ext/gl/effects/gstgleffectssources.c +@@ -152,7 +152,7 @@ const gchar *fisheye_fragment_source_gles2 = + " vec2 normcoord;" + " normcoord = texturecoord - 0.5;" + " float r = length (normcoord);" +- " normcoord *= r * sqrt(2);" ++ " normcoord *= r * 1.414;" + " texturecoord = normcoord + 0.5;" + " gl_FragColor = texture2D (tex, texturecoord);" + "}"; +-- +1.7.9.5 +diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend index d3b8c2d..ce8a158 100644
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h · line 24
Quoted 9 lines
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +2
-0@@ -18,6 +18,7 @@ IMX_PATCHES = " file://0001-PATCH-install-gstaggregator-and-gstvideoaggregator-h file://0006-glplugin-Support-fb-backend-for-gl-plugins.patch \ file://0007-glplugin-Change-wayland-default-res-to-1024x768.patch \ file://0008-glplugin-Add-fps-print-in-glimagesink.patch \ + + file://0009-glplugin-fix-gleffects-fisheye-shader-co.patch \ " SRC_URI_append_mx6 = "${IMX_PATCHES}"--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale
Re: [meta-fsl-arm][PATCH 2/9] gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland backend
In reply to Carlos Rafael GianiHi Carlos,
Only those applications which need Mesa EGL as default need to be changed to allow this Vivante EGL version. Yes, they should have to adapt to it!
It doesn't make sense if we update the Vivante EGL from 1.0 to 9.0 directly.
And different version can differentiate between Mesa EGL and Vivante EGL.
B.R.
Yuqing Zhu
-----Original Message-----
From: Carlos Rafael Giani [mailto:[email protected]]
Sent: Monday, February 01, 2016 3:25 PM
To: Yuqing Zhu <[email protected]>; Otavio Salvador <[email protected]>
Cc: [email protected]
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH 2/9] gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland backend
This is something I've observed as well. The question is: should Vivante's wayland-egl .pc be patched? Or should other applications have to adapt to it? I am inclined towards the first option.
Quoted 34 lines · Yuqing Zhu
Hi Otavio,
In Gstreamer, the default one is Mesa EGL with version 9.0. But we use Vivante EGL with this 1.0 version number. So we labeled this patch as i.MX specific.
B.R.
Yuqing Zhu
-----Original Message-----
From: Otavio Salvador [mailto:[email protected]]
Sent: Thursday, January 28, 2016 7:53 PM
To: Yuqing Zhu <[email protected]>
Cc: Carlos Rafael Giani <[email protected]>; [email protected]
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH 2/9] gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland backendQuoted 11 lines · Yuqing Zhu
Hi Carlos,
We change it to 1.0 as the wayland-egl in our build is 1.0.
Below is the info from
usr/lib/pkgconfig/wayland-egl.pc
Name: wayland-egl
Description: Bind the driver EGL to the Wayland API
Version: 1.0.0
Libs: -L${libdir} -lEGL
Cflags: -I${includedir}This should be fixed or other projects will end changing to be changed to allow this version.
Re: [meta-fsl-arm][PATCH 2/9] gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland backend
In reply to Yuqing ZhuQuoted 3 lines · Yuqing Zhu
In Gstreamer, the default one is Mesa EGL with version 9.0. But we use Vivante EGL with this 1.0 version number. So we labeled this patch as i.MX specific.
Vivante EGL libraries mimic the MESA EGL 9.0 so it should reflect in the .pc file. I don't want to carry patches to change the EGL required version for every application using it if we can fix this on Vivante .pc file. So this is the easiest, more maintainable fix. Please rework.
If you want, change Vivante .pc file to set a macro (like USING_VIVANTE_EGL) so you could make use of this inside the C code for specific code, but versioning is not adequade for it.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Re: [meta-fsl-arm][PATCH 2/9] gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland backend
Hi Otavio,
Thanks for your comments, we will discuss it internally.
For now, I will keep it in our internal layer until new patch is created. Thanks!
B.R.
Yuqing Zhu
-----Original Message-----
From: Otavio Salvador [mailto:[email protected]]
Sent: Monday, February 01, 2016 8:44 PM
To: Yuqing Zhu <[email protected]>
Cc: [email protected]
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH 2/9] gstreamer1.0-plugins-bad: Fix for gl plugin not built in wayland backend
Quoted 3 lines · Yuqing Zhu
In Gstreamer, the default one is Mesa EGL with version 9.0. But we use Vivante EGL with this 1.0 version number. So we labeled this patch as i.MX specific.
Vivante EGL libraries mimic the MESA EGL 9.0 so it should reflect in the .pc file. I don't want to carry patches to change the EGL required version for every application using it if we can fix this on Vivante .pc file. So this is the easiest, more maintainable fix. Please rework.
If you want, change Vivante .pc file to set a macro (likeUSING_VIVANTE_EGL) so you could make use of this inside the C code for specific code, but versioning is not adequade for it.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750