[OE-core] [pyro][PATCH 2/6] gstreamer1.0-plugins-bad: Add configuration for enabling accurate seeks

2017-05-23 Thread Yuqing Zhu
Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...configuration-for-enabling-accurate-seeks.patch | 148 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |   1 +
 2 files changed, 149 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-player-Add-configuration-for-enabling-accurate-seeks.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-player-Add-configuration-for-enabling-accurate-seeks.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-player-Add-configuration-for-enabling-accurate-seeks.patch
new file mode 100755
index 000..46d602c
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-player-Add-configuration-for-enabling-accurate-seeks.patch
@@ -0,0 +1,148 @@
+From 698fbfbf955af2fb9b79f9e6e8091b8750c886c4 Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.w...@nxp.com>
+Date: Wed, 26 Oct 2016 16:28:10 +0800
+Subject: [PATCH 1/5] player: Add configuration for enabling accurate seeks
+
+Upstream-Status: Backport [1.11.1]
+https://bugzilla.gnome.org/show_bug.cgi?id=773521
+
+---
+ docs/libs/gst-plugins-bad-libs-sections.txt |  3 ++
+ gst-libs/gst/player/gstplayer.c | 60 +
+ gst-libs/gst/player/gstplayer.h |  3 ++
+ 3 files changed, 66 insertions(+)
+
+diff --git a/docs/libs/gst-plugins-bad-libs-sections.txt 
b/docs/libs/gst-plugins-bad-libs-sections.txt
+index dbab6f7..77092f9 100644
+--- a/docs/libs/gst-plugins-bad-libs-sections.txt
 b/docs/libs/gst-plugins-bad-libs-sections.txt
+@@ -1953,6 +1953,9 @@ gst_player_config_get_position_update_interval
+ gst_player_config_set_user_agent
+ gst_player_config_get_user_agent
+ 
++gst_player_config_set_seek_accurate
++gst_player_config_get_seek_accurate
++
+ 
+ GST_IS_PLAYER
+ GST_IS_PLAYER_CLASS
+diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c
+index 313bca5..d9ff524 100644
+--- a/gst-libs/gst/player/gstplayer.c
 b/gst-libs/gst/player/gstplayer.c
+@@ -85,6 +85,7 @@ typedef enum
+ {
+   CONFIG_QUARK_USER_AGENT = 0,
+   CONFIG_QUARK_POSITION_INTERVAL_UPDATE,
++  CONFIG_QUARK_ACCURATE_SEEK,
+ 
+   CONFIG_QUARK_MAX
+ } ConfigQuarkId;
+@@ -92,6 +93,7 @@ typedef enum
+ static const gchar *_config_quark_strings[] = {
+   "user-agent",
+   "position-interval-update",
++  "accurate-seek",
+ };
+ 
+ GQuark _config_quark_table[CONFIG_QUARK_MAX];
+@@ -266,6 +268,7 @@ gst_player_init (GstPlayer * self)
+   /* *INDENT-OFF* */
+   self->config = gst_structure_new_id (QUARK_CONFIG,
+   CONFIG_QUARK (POSITION_INTERVAL_UPDATE), G_TYPE_UINT, 
DEFAULT_POSITION_UPDATE_INTERVAL_MS,
++  CONFIG_QUARK (ACCURATE_SEEK), G_TYPE_BOOLEAN, FALSE,
+   NULL);
+   /* *INDENT-ON* */
+ 
+@@ -2967,6 +2970,7 @@ gst_player_seek_internal_locked (GstPlayer * self)
+   GstStateChangeReturn state_ret;
+   GstEvent *s_event;
+   GstSeekFlags flags = 0;
++  gboolean accurate = FALSE;
+ 
+   if (self->seek_source) {
+ g_source_destroy (self->seek_source);
+@@ -3002,6 +3006,14 @@ gst_player_seek_internal_locked (GstPlayer * self)
+ 
+   flags |= GST_SEEK_FLAG_FLUSH;
+ 
++  accurate = gst_player_config_get_seek_accurate (self->config);
++
++  if (accurate) {
++flags |= GST_SEEK_FLAG_ACCURATE;
++  } else {
++flags &= ~GST_SEEK_FLAG_ACCURATE;
++  }
++
+   if (rate != 1.0) {
+ flags |= GST_SEEK_FLAG_TRICKMODE;
+   }
+@@ -4199,3 +4211,51 @@ gst_player_config_get_position_update_interval (const 
GstStructure * config)
+ 
+   return interval;
+ }
++
++/**
++ * gst_player_config_set_seek_accurate:
++ * @player: #GstPlayer instance
++ * @accurate: accurate seek or not
++ *
++ * Enable or disable accurate seeking. When enabled, elements will try harder
++ * to seek as accurately as possible to the requested seek position. Generally
++ * it will be slower especially for formats that don't have any indexes or
++ * timestamp markers in the stream.
++ *
++ * If accurate seeking is disabled, elements will seek as close as the request
++ * position without slowing down seeking too much.
++ *
++ * Accurate seeking is disabled by default.
++ *
++ * Since: 1.12
++ */
++void
++gst_player_config_set_seek_accurate (GstPlayer * self, gboolean accurate)
++{
++  GstStructure *config = self->config;
++  g_return_if_fail (config != NULL);
++
++  gst_structure_id_set (config,
++  CONFIG_QUARK (ACCURATE_SEEK), G_TYPE_BOOLEAN, accurate, NULL);
++}
++
++/**
++ * gst_player_config_get_seek_accurate:
++ * @config: a #GstPlayer configuration
++ *
++ * Returns: %TRUE if accurate seeking is enabled
++ *
++ * Since 1.12
++ */
++gboolean
++gst_player_config_get_seek_accurate (const GstStructure * config)
++{
++  gboolean accurate = FALSE;
++
++  g_return_val_if_fail (config != NULL, FALSE);
++
++  gst_structure_id_get (config,
++  CONFIG_QUARK (ACCURATE_SEEK), G_TYPE_BOOLEAN, , NULL);
++
++  retur

[OE-core] [pyro][PATCH 4/6] gstreamer1.0-plugins-bad: Add overlayvideorenderer video sink

2017-05-23 Thread Yuqing Zhu
- Add overlay video renderer "video-sink" property, so that can be set

- In create_video_sink, it returns video sink instead of always NULL

- Add new renderer_new_with_sink() API to set video sink

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...layer-Add-overlayvideorenderer-video-sink.patch | 138 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |   1 +
 2 files changed, 139 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-player-Add-overlayvideorenderer-video-sink.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-player-Add-overlayvideorenderer-video-sink.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-player-Add-overlayvideorenderer-video-sink.patch
new file mode 100755
index 000..ba5dd27
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-player-Add-overlayvideorenderer-video-sink.patch
@@ -0,0 +1,138 @@
+From 2437386711abdd866ec46d10a8bf48072ffbaaad Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.w...@nxp.com>
+Date: Tue, 27 Dec 2016 17:13:58 +0800
+Subject: [PATCH 4/5] player: Add overlayvideorenderer video sink
+
+- Add overlay video renderer "video-sink" property, so that can be set
+- In  create_video_sink,it return video sink instead of always NULL
+- Add new renderer_new_with_sink() API to set video sink
+
+Upstream-Status: Backport [1.11.2]
+https://bugzilla.gnome.org/show_bug.cgi?id=776490
+
+Signed-off-by: Lyon Wang <lyon.w...@nxp.com>
+---
+ .../gstplayer-video-overlay-video-renderer.c   | 38 +-
+ .../gstplayer-video-overlay-video-renderer.h   |  1 +
+ 2 files changed, 38 insertions(+), 1 deletion(-)
+
+diff --git a/gst-libs/gst/player/gstplayer-video-overlay-video-renderer.c 
b/gst-libs/gst/player/gstplayer-video-overlay-video-renderer.c
+index 7764d43..411dd3a 100644
+--- a/gst-libs/gst/player/gstplayer-video-overlay-video-renderer.c
 b/gst-libs/gst/player/gstplayer-video-overlay-video-renderer.c
+@@ -40,6 +40,8 @@ struct _GstPlayerVideoOverlayVideoRenderer
+   GstVideoOverlay *video_overlay;
+   gpointer window_handle;
+   gint x, y, width, height;
++
++  GstElement *video_sink;   /* configured video sink, or NULL  */
+ };
+ 
+ struct _GstPlayerVideoOverlayVideoRendererClass
+@@ -55,6 +57,7 @@ enum
+ {
+   VIDEO_OVERLAY_VIDEO_RENDERER_PROP_0,
+   VIDEO_OVERLAY_VIDEO_RENDERER_PROP_WINDOW_HANDLE,
++  VIDEO_OVERLAY_VIDEO_RENDERER_PROP_VIDEO_SINK,
+   VIDEO_OVERLAY_VIDEO_RENDERER_PROP_LAST
+ };
+ 
+@@ -81,6 +84,9 @@ gst_player_video_overlay_video_renderer_set_property 
(GObject * object,
+ gst_video_overlay_set_window_handle (self->video_overlay,
+ (guintptr) self->window_handle);
+   break;
++case VIDEO_OVERLAY_VIDEO_RENDERER_PROP_VIDEO_SINK:
++  self->video_sink = gst_object_ref_sink (g_value_get_object (value));
++  break;
+ default:
+   G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+   break;
+@@ -98,6 +104,9 @@ gst_player_video_overlay_video_renderer_get_property 
(GObject * object,
+ case VIDEO_OVERLAY_VIDEO_RENDERER_PROP_WINDOW_HANDLE:
+   g_value_set_pointer (value, self->window_handle);
+   break;
++case VIDEO_OVERLAY_VIDEO_RENDERER_PROP_VIDEO_SINK:
++  g_value_take_object (value, gst_object_ref (self->video_sink));
++  break;
+ default:
+   G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+   break;
+@@ -113,6 +122,9 @@ gst_player_video_overlay_video_renderer_finalize (GObject 
* object)
+   if (self->video_overlay)
+ gst_object_unref (self->video_overlay);
+ 
++  if (self->video_sink)
++gst_object_unref (self->video_sink);
++
+   G_OBJECT_CLASS
+   (gst_player_video_overlay_video_renderer_parent_class)->finalize 
(object);
+ }
+@@ -135,6 +147,12 @@ static void
+   "Window handle to embed the video into",
+   G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
+ 
++  video_overlay_video_renderer_param_specs
++  [VIDEO_OVERLAY_VIDEO_RENDERER_PROP_VIDEO_SINK] =
++  g_param_spec_object ("video-sink", "Video Sink",
++  "the video output element to use (NULL = default sink)",
++  GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
++
+   g_object_class_install_properties (gobject_class,
+   VIDEO_OVERLAY_VIDEO_RENDERER_PROP_LAST,
+   video_overlay_video_renderer_param_specs);
+@@ -145,6 +163,7 @@ static void
+ (GstPlayerVideoOverlayVideoRenderer * self)
+ {
+   self->x = self->y = self->width = self->height = -1;
++  self->video_sink = NULL;
+ }
+ 
+ static GstElement *gst_player_video_overlay_video_renderer_create_video_sink
+@@ -168,7 +187,7 @@ static GstElement 
*gst_player_video_overlay_video_renderer_create_video_sink
+ gst_video_overlay_set_render_rectangle (s

[OE-core] [pyro][PATCH 5/6] gstreamer1.0-plugins-bad: Fix gst-player failed to load external subtitle uri

2017-05-23 Thread Yuqing Zhu
gst_player_set_uri_internal shouldn't free suburi which maybe set
by user to load external subtitle before start play. It just need
reset playbin's subutri property to NULL no matter if there was a
previous one or not.

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...fix-gst-player-failed-to-load-external-su.patch | 50 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |  1 +
 2 files changed, 51 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch
new file mode 100755
index 000..0d42243
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch
@@ -0,0 +1,50 @@
+From a085090ec68efccd4d82c7cf4ea6f18fb475c4d8 Mon Sep 17 00:00:00 2001
+From: Haihua Hu <jared...@nxp.com>
+Date: Thu, 2 Mar 2017 14:36:56 +0800
+Subject: [PATCH] gst-player: fix gst-player failed to load external subtitle
+ uri
+
+gst_player_set_uri_internal shouldn't free suburi which maybe set
+by user to load external subtitle before start play. It just need
+reset playbin's subutri property to NULL no matter if there was a
+previous one or not.
+
+Upstream-Status: Backport[1.11.3]
+https://bugzilla.gnome.org/show_bug.cgi?id=779453
+
+Signed-off-by: Haihua Hu <jared...@nxp.com>
+---
+ gst-libs/gst/player/gstplayer.c | 10 --
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c
+index fc5463a..3757a09 100644
+--- a/gst-libs/gst/player/gstplayer.c
 b/gst-libs/gst/player/gstplayer.c
+@@ -582,12 +582,7 @@ gst_player_set_uri_internal (gpointer user_data)
+ (GDestroyNotify) uri_loaded_signal_data_free);
+   }
+ 
+-  /* if have suburi from previous playback then free it */
+-  if (self->suburi) {
+-g_free (self->suburi);
+-self->suburi = NULL;
+-g_object_set (self->playbin, "suburi", NULL, NULL);
+-  }
++  g_object_set (self->playbin, "suburi", NULL, NULL);
+ 
+   g_mutex_unlock (>lock);
+ 
+@@ -667,6 +662,9 @@ gst_player_set_property (GObject * object, guint prop_id,
+   g_free (self->redirect_uri);
+   self->redirect_uri = NULL;
+ 
++  g_free (self->suburi);
++  self->suburi = NULL;
++
+   self->uri = g_value_dup_string (value);
+   GST_DEBUG_OBJECT (self, "Set uri=%s", self->uri);
+   g_mutex_unlock (>lock);
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
index 82cd91c..91e1a51 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
@@ -22,6 +22,7 @@ SRC_URI = " \
 file://0003-player-Add-configuration-for-enabling-accurate-seeks.patch \
 file://0004-player-Add-get-track-number-media-info-API.patch \
 file://0005-player-Add-overlayvideorenderer-video-sink.patch \
+file://0006-gst-player-fix-gst-player-failed-to-load-external-su.patch \
 "
 SRC_URI[md5sum] = "2757103e57a096a1a05b3ab85b8381af"
 SRC_URI[sha256sum] = 
"23ddae506b3a223b94869a0d3eea3e9a12e847f94d2d0e0b97102ce13ecd6966"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [pyro][PATCH 3/6] gstreamer1.0-plugins-bad: Add get track number media info API

2017-05-23 Thread Yuqing Zhu
Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...layer-Add-get-track-number-media-info-API.patch | 126 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |   1 +
 2 files changed, 127 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-player-Add-get-track-number-media-info-API.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-player-Add-get-track-number-media-info-API.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-player-Add-get-track-number-media-info-API.patch
new file mode 100755
index 000..82e05bb
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-player-Add-get-track-number-media-info-API.patch
@@ -0,0 +1,126 @@
+From 573142bb46ea578bf0672923553877c9726c Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.w...@nxp.com>
+Date: Tue, 20 Dec 2016 18:20:02 +0800
+Subject: [PATCH 2/5] player: Add get track number media info API
+
+Upstream-Status: Backport [1.11.1]
+https://bugzilla.gnome.org/show_bug.cgi?id=773570
+---
+ docs/libs/gst-plugins-bad-libs-sections.txt |  4 ++
+ gst-libs/gst/player/gstplayer-media-info.c  | 62 +
+ gst-libs/gst/player/gstplayer-media-info.h  |  8 
+ 3 files changed, 74 insertions(+)
+
+diff --git a/docs/libs/gst-plugins-bad-libs-sections.txt 
b/docs/libs/gst-plugins-bad-libs-sections.txt
+index 77092f9..8515556 100644
+--- a/docs/libs/gst-plugins-bad-libs-sections.txt
 b/docs/libs/gst-plugins-bad-libs-sections.txt
+@@ -2064,6 +2064,10 @@ gst_player_media_info_is_live
+ gst_player_media_info_get_image_sample
+ gst_player_media_info_get_tags
+ gst_player_media_info_get_stream_list
++gst_player_media_info_get_number_of_streams
++gst_player_media_info_get_number_of_video_streams
++gst_player_media_info_get_number_of_audio_streams
++gst_player_media_info_get_number_of_subtitle_streams
+ 
+ gst_player_stream_info_get_index
+ gst_player_stream_info_get_caps
+diff --git a/gst-libs/gst/player/gstplayer-media-info.c 
b/gst-libs/gst/player/gstplayer-media-info.c
+index bba8ea6..a6c17c4 100644
+--- a/gst-libs/gst/player/gstplayer-media-info.c
 b/gst-libs/gst/player/gstplayer-media-info.c
+@@ -791,3 +791,65 @@ gst_player_media_info_get_image_sample (const 
GstPlayerMediaInfo * info)
+ 
+   return info->image_sample;
+ }
++
++/**
++ * gst_player_media_info_get_number_of_streams:
++ * @info: a #GstPlayerMediaInfo
++ *
++ * Returns: number of total streams.
++ * Since: 1.12
++ */
++guint
++gst_player_media_info_get_number_of_streams (const GstPlayerMediaInfo * info)
++{
++  g_return_val_if_fail (GST_IS_PLAYER_MEDIA_INFO (info), 0);
++
++  return g_list_length (info->stream_list);
++}
++
++/**
++ * gst_player_media_info_get_number_of_video_streams:
++ * @info: a #GstPlayerMediaInfo
++ *
++ * Returns: number of video streams.
++ * Since: 1.12
++ */
++guint
++gst_player_media_info_get_number_of_video_streams (const GstPlayerMediaInfo *
++info)
++{
++  g_return_val_if_fail (GST_IS_PLAYER_MEDIA_INFO (info), 0);
++
++  return g_list_length (info->video_stream_list);
++}
++
++/**
++ * gst_player_media_info_get_number_of_audio_streams:
++ * @info: a #GstPlayerMediaInfo
++ *
++ * Returns: number of audio streams.
++ * Since: 1.12
++ */
++guint
++gst_player_media_info_get_number_of_audio_streams (const GstPlayerMediaInfo *
++info)
++{
++  g_return_val_if_fail (GST_IS_PLAYER_MEDIA_INFO (info), 0);
++
++  return g_list_length (info->audio_stream_list);
++}
++
++/**
++ * gst_player_media_info_get_number_of_subtitle_streams:
++ * @info: a #GstPlayerMediaInfo
++ *
++ * Returns: number of subtitle streams.
++ * Since: 1.12
++ */
++guint gst_player_media_info_get_number_of_subtitle_streams
++(const GstPlayerMediaInfo * info)
++{
++  g_return_val_if_fail (GST_IS_PLAYER_MEDIA_INFO (info), 0);
++
++  return g_list_length (info->subtitle_stream_list);
++}
+diff --git a/gst-libs/gst/player/gstplayer-media-info.h 
b/gst-libs/gst/player/gstplayer-media-info.h
+index 7ffd6b4..6866ff6 100644
+--- a/gst-libs/gst/player/gstplayer-media-info.h
 b/gst-libs/gst/player/gstplayer-media-info.h
+@@ -175,12 +175,20 @@ GstClockTime  gst_player_media_info_get_duration
+ (const GstPlayerMediaInfo *info);
+ GList*gst_player_media_info_get_stream_list
+ (const GstPlayerMediaInfo *info);
++guint gst_player_media_info_get_number_of_streams
++(const GstPlayerMediaInfo *info);
+ GList*gst_player_get_video_streams
+ (const GstPlayerMediaInfo *info);
++guint gst_player_media_info_get_number_of_video_streams
++(const GstPlayerMediaInfo *info);
+ GList*gst_player_get_audio_streams
+ (const GstPlayerMediaInfo *info);
++guint gst_player_media_info_get_number_of_audio_streams
++(const GstPlayerMediaInfo *info);
+ GList*gst_

[OE-core] [pyro][PATCH 0/6] Add some gstreamer1.0-plugins-bad patches for pyro

2017-05-23 Thread Yuqing Zhu
-Add some enhancements for qmlglsrc
 Some common features for qmlglsrc are added to make app development much 
easier.

-Add some enhancements for gstplayer
 Some gstplayer API enhancements are added to make it much easier for users to 
use.
 Without these API enhancements, some features may not be realized
 (like accurate seek, video sink configuration) when using gstplayer API.
 So it would be better if they can be picked.

-Fix a memory leak issue in glupload, which is common

Yuqing Zhu (6):
  gstreamer1.0-plugins-bad: Add two enhancements for qmlglsrc
  gstreamer1.0-plugins-bad: Add configuration for enabling accurate
seeks
  gstreamer1.0-plugins-bad: Add get track number media info API
  gstreamer1.0-plugins-bad: Add overlayvideorenderer video sink
  gstreamer1.0-plugins-bad: Fix gst-player failed to load external
subtitle uri
  gstreamer1.0-plugins-bad: Fix memory leak when use a GValue in
glupload

 ...2-qmlglsrc-some-enhancements-for-qmlglsrc.patch | 170 +
 ...configuration-for-enabling-accurate-seeks.patch | 148 ++
 ...layer-Add-get-track-number-media-info-API.patch | 126 +++
 ...layer-Add-overlayvideorenderer-video-sink.patch | 138 +
 ...fix-gst-player-failed-to-load-external-su.patch |  50 ++
 ...-glupload-fix-memory-leak-when-use-a-GVal.patch |  29 
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |   6 +
 7 files changed, 667 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-player-Add-configuration-for-enabling-accurate-seeks.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-player-Add-get-track-number-media-info-API.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-player-Add-overlayvideorenderer-video-sink.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glupload-fix-memory-leak-when-use-a-GVal.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v2 6/6] gstreamer1.0-plugins-bad: Fix memory leak when use a GValue in glupload

2017-05-23 Thread Yuqing Zhu
This memory leak issue is common.

GValue "targets" should be unset after set to caps
to avoid memory leak.

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...-glupload-fix-memory-leak-when-use-a-GVal.patch | 29 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |  1 +
 2 files changed, 30 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glupload-fix-memory-leak-when-use-a-GVal.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glupload-fix-memory-leak-when-use-a-GVal.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glupload-fix-memory-leak-when-use-a-GVal.patch
new file mode 100755
index 000..fa98405
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glupload-fix-memory-leak-when-use-a-GVal.patch
@@ -0,0 +1,29 @@
+From a3988d464c89742cfe8fbbd570eef5e6ab5159ba Mon Sep 17 00:00:00 2001
+From: Haihua Hu <jared...@nxp.com>
+Date: Fri, 28 Apr 2017 10:21:31 +0800
+Subject: [PATCH 1/2] glupload: fix memory leak when use a GValue
+
+GValue "targets" should be unset after set to caps
+to avoid memory leak
+
+Upstream-Status: Backport [1.10.5]
+https://bugzilla.gnome.org/show_bug.cgi?id=781876
+---
+ gst-libs/gst/gl/gstglupload.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c
+index f33a696..3ef3b19 100644
+--- a/gst-libs/gst/gl/gstglupload.c
 b/gst-libs/gst/gl/gstglupload.c
+@@ -179,6 +179,7 @@ _caps_intersect_texture_target (GstCaps * caps, 
GstGLTextureTarget target_mask)
+   target = gst_caps_copy (caps);
+   gst_gl_value_set_texture_target_from_mask (, target_mask);
+   gst_caps_set_value (target, "texture-target", );
++  g_value_unset();
+ 
+   ret = gst_caps_intersect_full (caps, target, GST_CAPS_INTERSECT_FIRST);
+ 
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
index 91e1a51..68f78ea 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
@@ -23,6 +23,7 @@ SRC_URI = " \
 file://0004-player-Add-get-track-number-media-info-API.patch \
 file://0005-player-Add-overlayvideorenderer-video-sink.patch \
 file://0006-gst-player-fix-gst-player-failed-to-load-external-su.patch \
+file://0007-glupload-fix-memory-leak-when-use-a-GVal.patch \
 "
 SRC_URI[md5sum] = "2757103e57a096a1a05b3ab85b8381af"
 SRC_URI[sha256sum] = 
"23ddae506b3a223b94869a0d3eea3e9a12e847f94d2d0e0b97102ce13ecd6966"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v2 5/6] gstreamer1.0-plugins-bad: Fix gst-player failed to load external subtitle uri

2017-05-23 Thread Yuqing Zhu
gst_player_set_uri_internal shouldn't free suburi which maybe set
by user to load external subtitle before start play. It just need
reset playbin's subutri property to NULL no matter if there was a
previous one or not.

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...fix-gst-player-failed-to-load-external-su.patch | 50 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |  1 +
 2 files changed, 51 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch
new file mode 100755
index 000..0d42243
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch
@@ -0,0 +1,50 @@
+From a085090ec68efccd4d82c7cf4ea6f18fb475c4d8 Mon Sep 17 00:00:00 2001
+From: Haihua Hu <jared...@nxp.com>
+Date: Thu, 2 Mar 2017 14:36:56 +0800
+Subject: [PATCH] gst-player: fix gst-player failed to load external subtitle
+ uri
+
+gst_player_set_uri_internal shouldn't free suburi which maybe set
+by user to load external subtitle before start play. It just need
+reset playbin's subutri property to NULL no matter if there was a
+previous one or not.
+
+Upstream-Status: Backport[1.11.3]
+https://bugzilla.gnome.org/show_bug.cgi?id=779453
+
+Signed-off-by: Haihua Hu <jared...@nxp.com>
+---
+ gst-libs/gst/player/gstplayer.c | 10 --
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c
+index fc5463a..3757a09 100644
+--- a/gst-libs/gst/player/gstplayer.c
 b/gst-libs/gst/player/gstplayer.c
+@@ -582,12 +582,7 @@ gst_player_set_uri_internal (gpointer user_data)
+ (GDestroyNotify) uri_loaded_signal_data_free);
+   }
+ 
+-  /* if have suburi from previous playback then free it */
+-  if (self->suburi) {
+-g_free (self->suburi);
+-self->suburi = NULL;
+-g_object_set (self->playbin, "suburi", NULL, NULL);
+-  }
++  g_object_set (self->playbin, "suburi", NULL, NULL);
+ 
+   g_mutex_unlock (>lock);
+ 
+@@ -667,6 +662,9 @@ gst_player_set_property (GObject * object, guint prop_id,
+   g_free (self->redirect_uri);
+   self->redirect_uri = NULL;
+ 
++  g_free (self->suburi);
++  self->suburi = NULL;
++
+   self->uri = g_value_dup_string (value);
+   GST_DEBUG_OBJECT (self, "Set uri=%s", self->uri);
+   g_mutex_unlock (>lock);
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
index 82cd91c..91e1a51 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
@@ -22,6 +22,7 @@ SRC_URI = " \
 file://0003-player-Add-configuration-for-enabling-accurate-seeks.patch \
 file://0004-player-Add-get-track-number-media-info-API.patch \
 file://0005-player-Add-overlayvideorenderer-video-sink.patch \
+file://0006-gst-player-fix-gst-player-failed-to-load-external-su.patch \
 "
 SRC_URI[md5sum] = "2757103e57a096a1a05b3ab85b8381af"
 SRC_URI[sha256sum] = 
"23ddae506b3a223b94869a0d3eea3e9a12e847f94d2d0e0b97102ce13ecd6966"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v2 0/6] Add some gstreamer1.0-plugins-bad patches for pyro only

2017-05-23 Thread Yuqing Zhu
-Add some enhancements for qmlglsrc
 Some common features for qmlglsrc are added to make app development much 
easier.

-Add some enhancements for gstplayer
 Some gstplayer API enhancements are added to make it much easier for users to 
use.
 Without these API enhancements, some features may not be realized 
 (like accurate seek, video sink configuration) when using gstplayer API.
 So it would be better if they can be picked.

-Fix a memory leak issue in glupload, which is common

Yuqing Zhu (6):
  gstreamer1.0-plugins-bad: Add two enhancements for qmlglsrc
  gstreamer1.0-plugins-bad: Add configuration for enabling accurate
seeks
  gstreamer1.0-plugins-bad: Add get track number media info API
  gstreamer1.0-plugins-bad: Add overlayvideorenderer video sink
  gstreamer1.0-plugins-bad: Fix gst-player failed to load external
subtitle uri
  gstreamer1.0-plugins-bad: Fix memory leak when use a GValue in
glupload

 ...2-qmlglsrc-some-enhancements-for-qmlglsrc.patch | 170 +
 ...configuration-for-enabling-accurate-seeks.patch | 148 ++
 ...layer-Add-get-track-number-media-info-API.patch | 126 +++
 ...layer-Add-overlayvideorenderer-video-sink.patch | 138 +
 ...fix-gst-player-failed-to-load-external-su.patch |  50 ++
 ...-glupload-fix-memory-leak-when-use-a-GVal.patch |  29 
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |   6 +
 7 files changed, 667 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-player-Add-configuration-for-enabling-accurate-seeks.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-player-Add-get-track-number-media-info-API.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-player-Add-overlayvideorenderer-video-sink.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glupload-fix-memory-leak-when-use-a-GVal.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v2 1/6] gstreamer1.0-plugins-bad: Add two enhancements for qmlglsrc

2017-05-23 Thread Yuqing Zhu
1. Need set use-default-fbo to qquickwindow during set
   property to support change render target on the fly
2. Calculate qmlglsrc refresh frame rate in qtglwindow

It adds some common features for qmlglsrc to make app development much easier

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...2-qmlglsrc-some-enhancements-for-qmlglsrc.patch | 170 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |   1 +
 2 files changed, 171 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch
new file mode 100755
index 000..b4e662f
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch
@@ -0,0 +1,170 @@
+From f55cc58325ed5df0b0d5fd0a61ebb32d735c2481 Mon Sep 17 00:00:00 2001
+From: Haihua Hu <jared...@nxp.com>
+Date: Mon, 7 Nov 2016 16:31:02 +0800
+Subject: [PATCH 23/24] qmlglsrc: some enhancements for qmlglsrc
+
+1. Need set use-default-fbo to qquickwindow during set
+   property to support change render target on the fly.
+2. Calculate qmlglsrc refresh frame rate in qtglwindow
+
+Upstream-Status: Backport [1.11.1]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=774035
+
+Signed-off-by: Haihua Hu <jared...@nxp.com>
+---
+ ext/qt/gstqtsrc.cc | 14 +-
+ ext/qt/qtwindow.cc | 34 --
+ ext/qt/qtwindow.h  |  1 -
+ 3 files changed, 25 insertions(+), 24 deletions(-)
+
+diff --git a/ext/qt/gstqtsrc.cc b/ext/qt/gstqtsrc.cc
+index 3cfc709..350f70d 100644
+--- a/ext/qt/gstqtsrc.cc
 b/ext/qt/gstqtsrc.cc
+@@ -132,6 +132,7 @@ gst_qt_src_init (GstQtSrc * src)
+   gst_base_src_set_live (GST_BASE_SRC (src), DEFAULT_IS_LIVE);
+   src->default_fbo = FALSE;
+   src->pending_image_orientation = TRUE;
++  src->window = NULL;
+ }
+ 
+ static void
+@@ -147,6 +148,8 @@ gst_qt_src_set_property (GObject * object, guint prop_id,
+ 
+   if (qt_src->window)
+ delete qt_src->window;
++  qt_src->window = NULL;
++
+   if (qt_src->qwindow)
+ qt_src->window = new QtGLWindow (NULL, qt_src->qwindow);
+ 
+@@ -154,6 +157,8 @@ gst_qt_src_set_property (GObject * object, guint prop_id,
+ }
+ case PROP_DEFAULT_FBO:
+   qt_src->default_fbo = g_value_get_boolean (value);
++  if (qt_src->window)
++qt_window_use_default_fbo (qt_src->window, qt_src->default_fbo);
+   break;
+ default:
+   G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+@@ -508,7 +513,6 @@ gst_qt_src_change_state (GstElement * element, 
GstStateChange transition)
+   GstQtSrc *qt_src = GST_QT_SRC (element);
+   GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+   QGuiApplication *app;
+-  guint64 frames_rendered = 0;
+ 
+   GST_DEBUG ("changing state: %s => %s",
+   gst_element_state_get_name (GST_STATE_TRANSITION_CURRENT (transition)),
+@@ -553,18 +557,10 @@ gst_qt_src_change_state (GstElement * element, 
GstStateChange transition)
+ 
+   switch (transition) {
+ case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
+-  qt_src->run_time = gst_element_get_start_time (GST_ELEMENT (qt_src));
+   break;
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
+   break;
+ case GST_STATE_CHANGE_READY_TO_NULL:
+-  qt_window_get_total_frames (qt_src->window, _rendered);
+-  if (qt_src->run_time > 0) {
+-GST_DEBUG ("qmlglsrc Total refresh frames (%ld), playing for (%"
+-GST_TIME_FORMAT "), fps (%.3f).\n", frames_rendered,
+-GST_TIME_ARGS (qt_src->run_time),
+-(gfloat) GST_SECOND * frames_rendered / qt_src->run_time);
+-  }
+   break;
+ default:
+   break;
+diff --git a/ext/qt/qtwindow.cc b/ext/qt/qtwindow.cc
+index 3d96751..edb6b24 100644
+--- a/ext/qt/qtwindow.cc
 b/ext/qt/qtwindow.cc
+@@ -29,6 +29,7 @@
+ #include "gstqsgtexture.h"
+ #include "gstqtglutility.h"
+ 
++#include 
+ #include 
+ #include 
+ #include 
+@@ -71,6 +72,8 @@ struct _QtGLWindowPrivate
+ 
+   /* frames that qmlview rendered in its gl thread */
+   guint64 frames_rendered;
++  qint64 start;
++  qint64 stop;
+ };
+ 
+ class InitQtGLContext : public QRunnable
+@@ -146,6 +149,12 @@ QtGLWindow::beforeRendering()
+ 
+   g_mutex_lock (>priv->lock);
+ 
++  static volatile gsize once = 0;
++  if (g_once_init_enter()) {
++this->priv->start = QDateTime::currentDateTime().toMSecsSinceEpoch();
++g_once_init_leave(,1);
++  }
++
+   if (!fbo && !this->priv->useDefaultFbo) {
+ 
+ width = source->width();
+@@ -157,6 +166,10 @@ QtGLWindow::beforeRendering()
+  

[OE-core] [poky][PATCH v2 2/6] gstreamer1.0-plugins-bad: Add configuration for enabling accurate seeks

2017-05-23 Thread Yuqing Zhu
Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...configuration-for-enabling-accurate-seeks.patch | 148 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |   1 +
 2 files changed, 149 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-player-Add-configuration-for-enabling-accurate-seeks.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-player-Add-configuration-for-enabling-accurate-seeks.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-player-Add-configuration-for-enabling-accurate-seeks.patch
new file mode 100755
index 000..46d602c
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-player-Add-configuration-for-enabling-accurate-seeks.patch
@@ -0,0 +1,148 @@
+From 698fbfbf955af2fb9b79f9e6e8091b8750c886c4 Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.w...@nxp.com>
+Date: Wed, 26 Oct 2016 16:28:10 +0800
+Subject: [PATCH 1/5] player: Add configuration for enabling accurate seeks
+
+Upstream-Status: Backport [1.11.1]
+https://bugzilla.gnome.org/show_bug.cgi?id=773521
+
+---
+ docs/libs/gst-plugins-bad-libs-sections.txt |  3 ++
+ gst-libs/gst/player/gstplayer.c | 60 +
+ gst-libs/gst/player/gstplayer.h |  3 ++
+ 3 files changed, 66 insertions(+)
+
+diff --git a/docs/libs/gst-plugins-bad-libs-sections.txt 
b/docs/libs/gst-plugins-bad-libs-sections.txt
+index dbab6f7..77092f9 100644
+--- a/docs/libs/gst-plugins-bad-libs-sections.txt
 b/docs/libs/gst-plugins-bad-libs-sections.txt
+@@ -1953,6 +1953,9 @@ gst_player_config_get_position_update_interval
+ gst_player_config_set_user_agent
+ gst_player_config_get_user_agent
+ 
++gst_player_config_set_seek_accurate
++gst_player_config_get_seek_accurate
++
+ 
+ GST_IS_PLAYER
+ GST_IS_PLAYER_CLASS
+diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c
+index 313bca5..d9ff524 100644
+--- a/gst-libs/gst/player/gstplayer.c
 b/gst-libs/gst/player/gstplayer.c
+@@ -85,6 +85,7 @@ typedef enum
+ {
+   CONFIG_QUARK_USER_AGENT = 0,
+   CONFIG_QUARK_POSITION_INTERVAL_UPDATE,
++  CONFIG_QUARK_ACCURATE_SEEK,
+ 
+   CONFIG_QUARK_MAX
+ } ConfigQuarkId;
+@@ -92,6 +93,7 @@ typedef enum
+ static const gchar *_config_quark_strings[] = {
+   "user-agent",
+   "position-interval-update",
++  "accurate-seek",
+ };
+ 
+ GQuark _config_quark_table[CONFIG_QUARK_MAX];
+@@ -266,6 +268,7 @@ gst_player_init (GstPlayer * self)
+   /* *INDENT-OFF* */
+   self->config = gst_structure_new_id (QUARK_CONFIG,
+   CONFIG_QUARK (POSITION_INTERVAL_UPDATE), G_TYPE_UINT, 
DEFAULT_POSITION_UPDATE_INTERVAL_MS,
++  CONFIG_QUARK (ACCURATE_SEEK), G_TYPE_BOOLEAN, FALSE,
+   NULL);
+   /* *INDENT-ON* */
+ 
+@@ -2967,6 +2970,7 @@ gst_player_seek_internal_locked (GstPlayer * self)
+   GstStateChangeReturn state_ret;
+   GstEvent *s_event;
+   GstSeekFlags flags = 0;
++  gboolean accurate = FALSE;
+ 
+   if (self->seek_source) {
+ g_source_destroy (self->seek_source);
+@@ -3002,6 +3006,14 @@ gst_player_seek_internal_locked (GstPlayer * self)
+ 
+   flags |= GST_SEEK_FLAG_FLUSH;
+ 
++  accurate = gst_player_config_get_seek_accurate (self->config);
++
++  if (accurate) {
++flags |= GST_SEEK_FLAG_ACCURATE;
++  } else {
++flags &= ~GST_SEEK_FLAG_ACCURATE;
++  }
++
+   if (rate != 1.0) {
+ flags |= GST_SEEK_FLAG_TRICKMODE;
+   }
+@@ -4199,3 +4211,51 @@ gst_player_config_get_position_update_interval (const 
GstStructure * config)
+ 
+   return interval;
+ }
++
++/**
++ * gst_player_config_set_seek_accurate:
++ * @player: #GstPlayer instance
++ * @accurate: accurate seek or not
++ *
++ * Enable or disable accurate seeking. When enabled, elements will try harder
++ * to seek as accurately as possible to the requested seek position. Generally
++ * it will be slower especially for formats that don't have any indexes or
++ * timestamp markers in the stream.
++ *
++ * If accurate seeking is disabled, elements will seek as close as the request
++ * position without slowing down seeking too much.
++ *
++ * Accurate seeking is disabled by default.
++ *
++ * Since: 1.12
++ */
++void
++gst_player_config_set_seek_accurate (GstPlayer * self, gboolean accurate)
++{
++  GstStructure *config = self->config;
++  g_return_if_fail (config != NULL);
++
++  gst_structure_id_set (config,
++  CONFIG_QUARK (ACCURATE_SEEK), G_TYPE_BOOLEAN, accurate, NULL);
++}
++
++/**
++ * gst_player_config_get_seek_accurate:
++ * @config: a #GstPlayer configuration
++ *
++ * Returns: %TRUE if accurate seeking is enabled
++ *
++ * Since 1.12
++ */
++gboolean
++gst_player_config_get_seek_accurate (const GstStructure * config)
++{
++  gboolean accurate = FALSE;
++
++  g_return_val_if_fail (config != NULL, FALSE);
++
++  gst_structure_id_get (config,
++  CONFIG_QUARK (ACCURATE_SEEK), G_TYPE_BOOLEAN, , NULL);
++
++  retur

[OE-core] [poky][PATCH v2 4/6] gstreamer1.0-plugins-bad: Add overlayvideorenderer video sink

2017-05-23 Thread Yuqing Zhu
- Add overlay video renderer "video-sink" property, so that can be set

- In create_video_sink, it returns video sink instead of always NULL

- Add new renderer_new_with_sink() API to set video sink

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...layer-Add-overlayvideorenderer-video-sink.patch | 138 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |   1 +
 2 files changed, 139 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-player-Add-overlayvideorenderer-video-sink.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-player-Add-overlayvideorenderer-video-sink.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-player-Add-overlayvideorenderer-video-sink.patch
new file mode 100755
index 000..ba5dd27
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-player-Add-overlayvideorenderer-video-sink.patch
@@ -0,0 +1,138 @@
+From 2437386711abdd866ec46d10a8bf48072ffbaaad Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.w...@nxp.com>
+Date: Tue, 27 Dec 2016 17:13:58 +0800
+Subject: [PATCH 4/5] player: Add overlayvideorenderer video sink
+
+- Add overlay video renderer "video-sink" property, so that can be set
+- In  create_video_sink,it return video sink instead of always NULL
+- Add new renderer_new_with_sink() API to set video sink
+
+Upstream-Status: Backport [1.11.2]
+https://bugzilla.gnome.org/show_bug.cgi?id=776490
+
+Signed-off-by: Lyon Wang <lyon.w...@nxp.com>
+---
+ .../gstplayer-video-overlay-video-renderer.c   | 38 +-
+ .../gstplayer-video-overlay-video-renderer.h   |  1 +
+ 2 files changed, 38 insertions(+), 1 deletion(-)
+
+diff --git a/gst-libs/gst/player/gstplayer-video-overlay-video-renderer.c 
b/gst-libs/gst/player/gstplayer-video-overlay-video-renderer.c
+index 7764d43..411dd3a 100644
+--- a/gst-libs/gst/player/gstplayer-video-overlay-video-renderer.c
 b/gst-libs/gst/player/gstplayer-video-overlay-video-renderer.c
+@@ -40,6 +40,8 @@ struct _GstPlayerVideoOverlayVideoRenderer
+   GstVideoOverlay *video_overlay;
+   gpointer window_handle;
+   gint x, y, width, height;
++
++  GstElement *video_sink;   /* configured video sink, or NULL  */
+ };
+ 
+ struct _GstPlayerVideoOverlayVideoRendererClass
+@@ -55,6 +57,7 @@ enum
+ {
+   VIDEO_OVERLAY_VIDEO_RENDERER_PROP_0,
+   VIDEO_OVERLAY_VIDEO_RENDERER_PROP_WINDOW_HANDLE,
++  VIDEO_OVERLAY_VIDEO_RENDERER_PROP_VIDEO_SINK,
+   VIDEO_OVERLAY_VIDEO_RENDERER_PROP_LAST
+ };
+ 
+@@ -81,6 +84,9 @@ gst_player_video_overlay_video_renderer_set_property 
(GObject * object,
+ gst_video_overlay_set_window_handle (self->video_overlay,
+ (guintptr) self->window_handle);
+   break;
++case VIDEO_OVERLAY_VIDEO_RENDERER_PROP_VIDEO_SINK:
++  self->video_sink = gst_object_ref_sink (g_value_get_object (value));
++  break;
+ default:
+   G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+   break;
+@@ -98,6 +104,9 @@ gst_player_video_overlay_video_renderer_get_property 
(GObject * object,
+ case VIDEO_OVERLAY_VIDEO_RENDERER_PROP_WINDOW_HANDLE:
+   g_value_set_pointer (value, self->window_handle);
+   break;
++case VIDEO_OVERLAY_VIDEO_RENDERER_PROP_VIDEO_SINK:
++  g_value_take_object (value, gst_object_ref (self->video_sink));
++  break;
+ default:
+   G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+   break;
+@@ -113,6 +122,9 @@ gst_player_video_overlay_video_renderer_finalize (GObject 
* object)
+   if (self->video_overlay)
+ gst_object_unref (self->video_overlay);
+ 
++  if (self->video_sink)
++gst_object_unref (self->video_sink);
++
+   G_OBJECT_CLASS
+   (gst_player_video_overlay_video_renderer_parent_class)->finalize 
(object);
+ }
+@@ -135,6 +147,12 @@ static void
+   "Window handle to embed the video into",
+   G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
+ 
++  video_overlay_video_renderer_param_specs
++  [VIDEO_OVERLAY_VIDEO_RENDERER_PROP_VIDEO_SINK] =
++  g_param_spec_object ("video-sink", "Video Sink",
++  "the video output element to use (NULL = default sink)",
++  GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
++
+   g_object_class_install_properties (gobject_class,
+   VIDEO_OVERLAY_VIDEO_RENDERER_PROP_LAST,
+   video_overlay_video_renderer_param_specs);
+@@ -145,6 +163,7 @@ static void
+ (GstPlayerVideoOverlayVideoRenderer * self)
+ {
+   self->x = self->y = self->width = self->height = -1;
++  self->video_sink = NULL;
+ }
+ 
+ static GstElement *gst_player_video_overlay_video_renderer_create_video_sink
+@@ -168,7 +187,7 @@ static GstElement 
*gst_player_video_overlay_video_renderer_create_video_sink
+ gst_video_overlay_set_render_rectangle (s

[OE-core] [poky][PATCH v2 3/6] gstreamer1.0-plugins-bad: Add get track number media info API

2017-05-23 Thread Yuqing Zhu
Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...layer-Add-get-track-number-media-info-API.patch | 126 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |   1 +
 2 files changed, 127 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-player-Add-get-track-number-media-info-API.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-player-Add-get-track-number-media-info-API.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-player-Add-get-track-number-media-info-API.patch
new file mode 100755
index 000..82e05bb
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-player-Add-get-track-number-media-info-API.patch
@@ -0,0 +1,126 @@
+From 573142bb46ea578bf0672923553877c9726c Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.w...@nxp.com>
+Date: Tue, 20 Dec 2016 18:20:02 +0800
+Subject: [PATCH 2/5] player: Add get track number media info API
+
+Upstream-Status: Backport [1.11.1]
+https://bugzilla.gnome.org/show_bug.cgi?id=773570
+---
+ docs/libs/gst-plugins-bad-libs-sections.txt |  4 ++
+ gst-libs/gst/player/gstplayer-media-info.c  | 62 +
+ gst-libs/gst/player/gstplayer-media-info.h  |  8 
+ 3 files changed, 74 insertions(+)
+
+diff --git a/docs/libs/gst-plugins-bad-libs-sections.txt 
b/docs/libs/gst-plugins-bad-libs-sections.txt
+index 77092f9..8515556 100644
+--- a/docs/libs/gst-plugins-bad-libs-sections.txt
 b/docs/libs/gst-plugins-bad-libs-sections.txt
+@@ -2064,6 +2064,10 @@ gst_player_media_info_is_live
+ gst_player_media_info_get_image_sample
+ gst_player_media_info_get_tags
+ gst_player_media_info_get_stream_list
++gst_player_media_info_get_number_of_streams
++gst_player_media_info_get_number_of_video_streams
++gst_player_media_info_get_number_of_audio_streams
++gst_player_media_info_get_number_of_subtitle_streams
+ 
+ gst_player_stream_info_get_index
+ gst_player_stream_info_get_caps
+diff --git a/gst-libs/gst/player/gstplayer-media-info.c 
b/gst-libs/gst/player/gstplayer-media-info.c
+index bba8ea6..a6c17c4 100644
+--- a/gst-libs/gst/player/gstplayer-media-info.c
 b/gst-libs/gst/player/gstplayer-media-info.c
+@@ -791,3 +791,65 @@ gst_player_media_info_get_image_sample (const 
GstPlayerMediaInfo * info)
+ 
+   return info->image_sample;
+ }
++
++/**
++ * gst_player_media_info_get_number_of_streams:
++ * @info: a #GstPlayerMediaInfo
++ *
++ * Returns: number of total streams.
++ * Since: 1.12
++ */
++guint
++gst_player_media_info_get_number_of_streams (const GstPlayerMediaInfo * info)
++{
++  g_return_val_if_fail (GST_IS_PLAYER_MEDIA_INFO (info), 0);
++
++  return g_list_length (info->stream_list);
++}
++
++/**
++ * gst_player_media_info_get_number_of_video_streams:
++ * @info: a #GstPlayerMediaInfo
++ *
++ * Returns: number of video streams.
++ * Since: 1.12
++ */
++guint
++gst_player_media_info_get_number_of_video_streams (const GstPlayerMediaInfo *
++info)
++{
++  g_return_val_if_fail (GST_IS_PLAYER_MEDIA_INFO (info), 0);
++
++  return g_list_length (info->video_stream_list);
++}
++
++/**
++ * gst_player_media_info_get_number_of_audio_streams:
++ * @info: a #GstPlayerMediaInfo
++ *
++ * Returns: number of audio streams.
++ * Since: 1.12
++ */
++guint
++gst_player_media_info_get_number_of_audio_streams (const GstPlayerMediaInfo *
++info)
++{
++  g_return_val_if_fail (GST_IS_PLAYER_MEDIA_INFO (info), 0);
++
++  return g_list_length (info->audio_stream_list);
++}
++
++/**
++ * gst_player_media_info_get_number_of_subtitle_streams:
++ * @info: a #GstPlayerMediaInfo
++ *
++ * Returns: number of subtitle streams.
++ * Since: 1.12
++ */
++guint gst_player_media_info_get_number_of_subtitle_streams
++(const GstPlayerMediaInfo * info)
++{
++  g_return_val_if_fail (GST_IS_PLAYER_MEDIA_INFO (info), 0);
++
++  return g_list_length (info->subtitle_stream_list);
++}
+diff --git a/gst-libs/gst/player/gstplayer-media-info.h 
b/gst-libs/gst/player/gstplayer-media-info.h
+index 7ffd6b4..6866ff6 100644
+--- a/gst-libs/gst/player/gstplayer-media-info.h
 b/gst-libs/gst/player/gstplayer-media-info.h
+@@ -175,12 +175,20 @@ GstClockTime  gst_player_media_info_get_duration
+ (const GstPlayerMediaInfo *info);
+ GList*gst_player_media_info_get_stream_list
+ (const GstPlayerMediaInfo *info);
++guint gst_player_media_info_get_number_of_streams
++(const GstPlayerMediaInfo *info);
+ GList*gst_player_get_video_streams
+ (const GstPlayerMediaInfo *info);
++guint gst_player_media_info_get_number_of_video_streams
++(const GstPlayerMediaInfo *info);
+ GList*gst_player_get_audio_streams
+ (const GstPlayerMediaInfo *info);
++guint gst_player_media_info_get_number_of_audio_streams
++(const GstPlayerMediaInfo *info);
+ GList*gst_

[OE-core] [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4

2017-05-15 Thread Yuqing Zhu
-Add some enhancements for qmlglsrc

-Add configuration for enabling accurate seeks

-Add get track number media info API

-Add overlayvideorenderer video sink

-Fix gst-player failed to load external subtitle uri

-Fix memory leak when use a GValue in glupload


Yuqing Zhu (6):
  gstreamer1.0-plugins-bad: Add some enhancements for qmlglsrc
  gstreamer1.0-plugins-bad: Add configuration for enabling accurate
seeks
  gstreamer1.0-plugins-bad: Add get track number media info API
  gstreamer1.0-plugins-bad: Add overlayvideorenderer video sink
  gstreamer1.0-plugins-bad: Fix gst-player failed to load external
subtitle uri
  gstreamer1.0-plugins-bad: Fix memory leak when use a GValue in
glupload

 ...2-qmlglsrc-some-enhancements-for-qmlglsrc.patch | 170 +
 ...configuration-for-enabling-accurate-seeks.patch | 148 ++
 ...layer-Add-get-track-number-media-info-API.patch | 126 +++
 ...layer-Add-overlayvideorenderer-video-sink.patch | 138 +
 ...fix-gst-player-failed-to-load-external-su.patch |  50 ++
 ...-glupload-fix-memory-leak-when-use-a-GVal.patch |  29 
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |   6 +
 7 files changed, 667 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-player-Add-configuration-for-enabling-accurate-seeks.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-player-Add-get-track-number-media-info-API.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-player-Add-overlayvideorenderer-video-sink.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glupload-fix-memory-leak-when-use-a-GVal.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 4/6] gstreamer1.0-plugins-bad: Add overlayvideorenderer video sink

2017-05-15 Thread Yuqing Zhu
- Add overlay video renderer "video-sink" property, so that can be set

- In create_video_sink, it returns video sink instead of always NULL

- Add new renderer_new_with_sink() API to set video sink

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...layer-Add-overlayvideorenderer-video-sink.patch | 138 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |   1 +
 2 files changed, 139 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-player-Add-overlayvideorenderer-video-sink.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-player-Add-overlayvideorenderer-video-sink.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-player-Add-overlayvideorenderer-video-sink.patch
new file mode 100755
index 000..ba5dd27
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-player-Add-overlayvideorenderer-video-sink.patch
@@ -0,0 +1,138 @@
+From 2437386711abdd866ec46d10a8bf48072ffbaaad Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.w...@nxp.com>
+Date: Tue, 27 Dec 2016 17:13:58 +0800
+Subject: [PATCH 4/5] player: Add overlayvideorenderer video sink
+
+- Add overlay video renderer "video-sink" property, so that can be set
+- In  create_video_sink,it return video sink instead of always NULL
+- Add new renderer_new_with_sink() API to set video sink
+
+Upstream-Status: Backport [1.11.2]
+https://bugzilla.gnome.org/show_bug.cgi?id=776490
+
+Signed-off-by: Lyon Wang <lyon.w...@nxp.com>
+---
+ .../gstplayer-video-overlay-video-renderer.c   | 38 +-
+ .../gstplayer-video-overlay-video-renderer.h   |  1 +
+ 2 files changed, 38 insertions(+), 1 deletion(-)
+
+diff --git a/gst-libs/gst/player/gstplayer-video-overlay-video-renderer.c 
b/gst-libs/gst/player/gstplayer-video-overlay-video-renderer.c
+index 7764d43..411dd3a 100644
+--- a/gst-libs/gst/player/gstplayer-video-overlay-video-renderer.c
 b/gst-libs/gst/player/gstplayer-video-overlay-video-renderer.c
+@@ -40,6 +40,8 @@ struct _GstPlayerVideoOverlayVideoRenderer
+   GstVideoOverlay *video_overlay;
+   gpointer window_handle;
+   gint x, y, width, height;
++
++  GstElement *video_sink;   /* configured video sink, or NULL  */
+ };
+ 
+ struct _GstPlayerVideoOverlayVideoRendererClass
+@@ -55,6 +57,7 @@ enum
+ {
+   VIDEO_OVERLAY_VIDEO_RENDERER_PROP_0,
+   VIDEO_OVERLAY_VIDEO_RENDERER_PROP_WINDOW_HANDLE,
++  VIDEO_OVERLAY_VIDEO_RENDERER_PROP_VIDEO_SINK,
+   VIDEO_OVERLAY_VIDEO_RENDERER_PROP_LAST
+ };
+ 
+@@ -81,6 +84,9 @@ gst_player_video_overlay_video_renderer_set_property 
(GObject * object,
+ gst_video_overlay_set_window_handle (self->video_overlay,
+ (guintptr) self->window_handle);
+   break;
++case VIDEO_OVERLAY_VIDEO_RENDERER_PROP_VIDEO_SINK:
++  self->video_sink = gst_object_ref_sink (g_value_get_object (value));
++  break;
+ default:
+   G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+   break;
+@@ -98,6 +104,9 @@ gst_player_video_overlay_video_renderer_get_property 
(GObject * object,
+ case VIDEO_OVERLAY_VIDEO_RENDERER_PROP_WINDOW_HANDLE:
+   g_value_set_pointer (value, self->window_handle);
+   break;
++case VIDEO_OVERLAY_VIDEO_RENDERER_PROP_VIDEO_SINK:
++  g_value_take_object (value, gst_object_ref (self->video_sink));
++  break;
+ default:
+   G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+   break;
+@@ -113,6 +122,9 @@ gst_player_video_overlay_video_renderer_finalize (GObject 
* object)
+   if (self->video_overlay)
+ gst_object_unref (self->video_overlay);
+ 
++  if (self->video_sink)
++gst_object_unref (self->video_sink);
++
+   G_OBJECT_CLASS
+   (gst_player_video_overlay_video_renderer_parent_class)->finalize 
(object);
+ }
+@@ -135,6 +147,12 @@ static void
+   "Window handle to embed the video into",
+   G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
+ 
++  video_overlay_video_renderer_param_specs
++  [VIDEO_OVERLAY_VIDEO_RENDERER_PROP_VIDEO_SINK] =
++  g_param_spec_object ("video-sink", "Video Sink",
++  "the video output element to use (NULL = default sink)",
++  GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
++
+   g_object_class_install_properties (gobject_class,
+   VIDEO_OVERLAY_VIDEO_RENDERER_PROP_LAST,
+   video_overlay_video_renderer_param_specs);
+@@ -145,6 +163,7 @@ static void
+ (GstPlayerVideoOverlayVideoRenderer * self)
+ {
+   self->x = self->y = self->width = self->height = -1;
++  self->video_sink = NULL;
+ }
+ 
+ static GstElement *gst_player_video_overlay_video_renderer_create_video_sink
+@@ -168,7 +187,7 @@ static GstElement 
*gst_player_video_overlay_video_renderer_create_video_sink
+ gst_video_overlay_set_render_rectangle (s

[OE-core] [poky][PATCH 1/6] gstreamer1.0-plugins-bad: Add some enhancements for qmlglsrc

2017-05-15 Thread Yuqing Zhu
1. Need set use-default-fbo to qquickwindow during set
   property to support change render target on the fly

2. Calculate qmlglsrc refresh frame rate in qtglwindow

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...2-qmlglsrc-some-enhancements-for-qmlglsrc.patch | 170 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |   1 +
 2 files changed, 171 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch
new file mode 100755
index 000..b4e662f
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch
@@ -0,0 +1,170 @@
+From f55cc58325ed5df0b0d5fd0a61ebb32d735c2481 Mon Sep 17 00:00:00 2001
+From: Haihua Hu <jared...@nxp.com>
+Date: Mon, 7 Nov 2016 16:31:02 +0800
+Subject: [PATCH 23/24] qmlglsrc: some enhancements for qmlglsrc
+
+1. Need set use-default-fbo to qquickwindow during set
+   property to support change render target on the fly.
+2. Calculate qmlglsrc refresh frame rate in qtglwindow
+
+Upstream-Status: Backport [1.11.1]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=774035
+
+Signed-off-by: Haihua Hu <jared...@nxp.com>
+---
+ ext/qt/gstqtsrc.cc | 14 +-
+ ext/qt/qtwindow.cc | 34 --
+ ext/qt/qtwindow.h  |  1 -
+ 3 files changed, 25 insertions(+), 24 deletions(-)
+
+diff --git a/ext/qt/gstqtsrc.cc b/ext/qt/gstqtsrc.cc
+index 3cfc709..350f70d 100644
+--- a/ext/qt/gstqtsrc.cc
 b/ext/qt/gstqtsrc.cc
+@@ -132,6 +132,7 @@ gst_qt_src_init (GstQtSrc * src)
+   gst_base_src_set_live (GST_BASE_SRC (src), DEFAULT_IS_LIVE);
+   src->default_fbo = FALSE;
+   src->pending_image_orientation = TRUE;
++  src->window = NULL;
+ }
+ 
+ static void
+@@ -147,6 +148,8 @@ gst_qt_src_set_property (GObject * object, guint prop_id,
+ 
+   if (qt_src->window)
+ delete qt_src->window;
++  qt_src->window = NULL;
++
+   if (qt_src->qwindow)
+ qt_src->window = new QtGLWindow (NULL, qt_src->qwindow);
+ 
+@@ -154,6 +157,8 @@ gst_qt_src_set_property (GObject * object, guint prop_id,
+ }
+ case PROP_DEFAULT_FBO:
+   qt_src->default_fbo = g_value_get_boolean (value);
++  if (qt_src->window)
++qt_window_use_default_fbo (qt_src->window, qt_src->default_fbo);
+   break;
+ default:
+   G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+@@ -508,7 +513,6 @@ gst_qt_src_change_state (GstElement * element, 
GstStateChange transition)
+   GstQtSrc *qt_src = GST_QT_SRC (element);
+   GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
+   QGuiApplication *app;
+-  guint64 frames_rendered = 0;
+ 
+   GST_DEBUG ("changing state: %s => %s",
+   gst_element_state_get_name (GST_STATE_TRANSITION_CURRENT (transition)),
+@@ -553,18 +557,10 @@ gst_qt_src_change_state (GstElement * element, 
GstStateChange transition)
+ 
+   switch (transition) {
+ case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
+-  qt_src->run_time = gst_element_get_start_time (GST_ELEMENT (qt_src));
+   break;
+ case GST_STATE_CHANGE_PAUSED_TO_READY:
+   break;
+ case GST_STATE_CHANGE_READY_TO_NULL:
+-  qt_window_get_total_frames (qt_src->window, _rendered);
+-  if (qt_src->run_time > 0) {
+-GST_DEBUG ("qmlglsrc Total refresh frames (%ld), playing for (%"
+-GST_TIME_FORMAT "), fps (%.3f).\n", frames_rendered,
+-GST_TIME_ARGS (qt_src->run_time),
+-(gfloat) GST_SECOND * frames_rendered / qt_src->run_time);
+-  }
+   break;
+ default:
+   break;
+diff --git a/ext/qt/qtwindow.cc b/ext/qt/qtwindow.cc
+index 3d96751..edb6b24 100644
+--- a/ext/qt/qtwindow.cc
 b/ext/qt/qtwindow.cc
+@@ -29,6 +29,7 @@
+ #include "gstqsgtexture.h"
+ #include "gstqtglutility.h"
+ 
++#include 
+ #include 
+ #include 
+ #include 
+@@ -71,6 +72,8 @@ struct _QtGLWindowPrivate
+ 
+   /* frames that qmlview rendered in its gl thread */
+   guint64 frames_rendered;
++  qint64 start;
++  qint64 stop;
+ };
+ 
+ class InitQtGLContext : public QRunnable
+@@ -146,6 +149,12 @@ QtGLWindow::beforeRendering()
+ 
+   g_mutex_lock (>priv->lock);
+ 
++  static volatile gsize once = 0;
++  if (g_once_init_enter()) {
++this->priv->start = QDateTime::currentDateTime().toMSecsSinceEpoch();
++g_once_init_leave(,1);
++  }
++
+   if (!fbo && !this->priv->useDefaultFbo) {
+ 
+ width = source->width();
+@@ -157,6 +166,10 @@ QtGLWindow::beforeRendering()
+   QOpenGLFramebufferObject::NoAttachment, GL_TEXTURE_2D, GL_RGBA));
+ 
+ 

[OE-core] [poky][PATCH 2/6] gstreamer1.0-plugins-bad: Add configuration for enabling accurate seeks

2017-05-15 Thread Yuqing Zhu
Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...configuration-for-enabling-accurate-seeks.patch | 148 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |   1 +
 2 files changed, 149 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-player-Add-configuration-for-enabling-accurate-seeks.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-player-Add-configuration-for-enabling-accurate-seeks.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-player-Add-configuration-for-enabling-accurate-seeks.patch
new file mode 100755
index 000..46d602c
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-player-Add-configuration-for-enabling-accurate-seeks.patch
@@ -0,0 +1,148 @@
+From 698fbfbf955af2fb9b79f9e6e8091b8750c886c4 Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.w...@nxp.com>
+Date: Wed, 26 Oct 2016 16:28:10 +0800
+Subject: [PATCH 1/5] player: Add configuration for enabling accurate seeks
+
+Upstream-Status: Backport [1.11.1]
+https://bugzilla.gnome.org/show_bug.cgi?id=773521
+
+---
+ docs/libs/gst-plugins-bad-libs-sections.txt |  3 ++
+ gst-libs/gst/player/gstplayer.c | 60 +
+ gst-libs/gst/player/gstplayer.h |  3 ++
+ 3 files changed, 66 insertions(+)
+
+diff --git a/docs/libs/gst-plugins-bad-libs-sections.txt 
b/docs/libs/gst-plugins-bad-libs-sections.txt
+index dbab6f7..77092f9 100644
+--- a/docs/libs/gst-plugins-bad-libs-sections.txt
 b/docs/libs/gst-plugins-bad-libs-sections.txt
+@@ -1953,6 +1953,9 @@ gst_player_config_get_position_update_interval
+ gst_player_config_set_user_agent
+ gst_player_config_get_user_agent
+ 
++gst_player_config_set_seek_accurate
++gst_player_config_get_seek_accurate
++
+ 
+ GST_IS_PLAYER
+ GST_IS_PLAYER_CLASS
+diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c
+index 313bca5..d9ff524 100644
+--- a/gst-libs/gst/player/gstplayer.c
 b/gst-libs/gst/player/gstplayer.c
+@@ -85,6 +85,7 @@ typedef enum
+ {
+   CONFIG_QUARK_USER_AGENT = 0,
+   CONFIG_QUARK_POSITION_INTERVAL_UPDATE,
++  CONFIG_QUARK_ACCURATE_SEEK,
+ 
+   CONFIG_QUARK_MAX
+ } ConfigQuarkId;
+@@ -92,6 +93,7 @@ typedef enum
+ static const gchar *_config_quark_strings[] = {
+   "user-agent",
+   "position-interval-update",
++  "accurate-seek",
+ };
+ 
+ GQuark _config_quark_table[CONFIG_QUARK_MAX];
+@@ -266,6 +268,7 @@ gst_player_init (GstPlayer * self)
+   /* *INDENT-OFF* */
+   self->config = gst_structure_new_id (QUARK_CONFIG,
+   CONFIG_QUARK (POSITION_INTERVAL_UPDATE), G_TYPE_UINT, 
DEFAULT_POSITION_UPDATE_INTERVAL_MS,
++  CONFIG_QUARK (ACCURATE_SEEK), G_TYPE_BOOLEAN, FALSE,
+   NULL);
+   /* *INDENT-ON* */
+ 
+@@ -2967,6 +2970,7 @@ gst_player_seek_internal_locked (GstPlayer * self)
+   GstStateChangeReturn state_ret;
+   GstEvent *s_event;
+   GstSeekFlags flags = 0;
++  gboolean accurate = FALSE;
+ 
+   if (self->seek_source) {
+ g_source_destroy (self->seek_source);
+@@ -3002,6 +3006,14 @@ gst_player_seek_internal_locked (GstPlayer * self)
+ 
+   flags |= GST_SEEK_FLAG_FLUSH;
+ 
++  accurate = gst_player_config_get_seek_accurate (self->config);
++
++  if (accurate) {
++flags |= GST_SEEK_FLAG_ACCURATE;
++  } else {
++flags &= ~GST_SEEK_FLAG_ACCURATE;
++  }
++
+   if (rate != 1.0) {
+ flags |= GST_SEEK_FLAG_TRICKMODE;
+   }
+@@ -4199,3 +4211,51 @@ gst_player_config_get_position_update_interval (const 
GstStructure * config)
+ 
+   return interval;
+ }
++
++/**
++ * gst_player_config_set_seek_accurate:
++ * @player: #GstPlayer instance
++ * @accurate: accurate seek or not
++ *
++ * Enable or disable accurate seeking. When enabled, elements will try harder
++ * to seek as accurately as possible to the requested seek position. Generally
++ * it will be slower especially for formats that don't have any indexes or
++ * timestamp markers in the stream.
++ *
++ * If accurate seeking is disabled, elements will seek as close as the request
++ * position without slowing down seeking too much.
++ *
++ * Accurate seeking is disabled by default.
++ *
++ * Since: 1.12
++ */
++void
++gst_player_config_set_seek_accurate (GstPlayer * self, gboolean accurate)
++{
++  GstStructure *config = self->config;
++  g_return_if_fail (config != NULL);
++
++  gst_structure_id_set (config,
++  CONFIG_QUARK (ACCURATE_SEEK), G_TYPE_BOOLEAN, accurate, NULL);
++}
++
++/**
++ * gst_player_config_get_seek_accurate:
++ * @config: a #GstPlayer configuration
++ *
++ * Returns: %TRUE if accurate seeking is enabled
++ *
++ * Since 1.12
++ */
++gboolean
++gst_player_config_get_seek_accurate (const GstStructure * config)
++{
++  gboolean accurate = FALSE;
++
++  g_return_val_if_fail (config != NULL, FALSE);
++
++  gst_structure_id_get (config,
++  CONFIG_QUARK (ACCURATE_SEEK), G_TYPE_BOOLEAN, , NULL);
++
++  retur

[OE-core] [poky][PATCH 5/6] gstreamer1.0-plugins-bad: Fix gst-player failed to load external subtitle uri

2017-05-15 Thread Yuqing Zhu
gst_player_set_uri_internal shouldn't free suburi which maybe set
by user to load external subtitle before start play. It just need
reset playbin's subutri property to NULL no matter if there was a
previous one or not.

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...fix-gst-player-failed-to-load-external-su.patch | 50 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |  1 +
 2 files changed, 51 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch
new file mode 100755
index 000..0d42243
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch
@@ -0,0 +1,50 @@
+From a085090ec68efccd4d82c7cf4ea6f18fb475c4d8 Mon Sep 17 00:00:00 2001
+From: Haihua Hu <jared...@nxp.com>
+Date: Thu, 2 Mar 2017 14:36:56 +0800
+Subject: [PATCH] gst-player: fix gst-player failed to load external subtitle
+ uri
+
+gst_player_set_uri_internal shouldn't free suburi which maybe set
+by user to load external subtitle before start play. It just need
+reset playbin's subutri property to NULL no matter if there was a
+previous one or not.
+
+Upstream-Status: Backport[1.11.3]
+https://bugzilla.gnome.org/show_bug.cgi?id=779453
+
+Signed-off-by: Haihua Hu <jared...@nxp.com>
+---
+ gst-libs/gst/player/gstplayer.c | 10 --
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c
+index fc5463a..3757a09 100644
+--- a/gst-libs/gst/player/gstplayer.c
 b/gst-libs/gst/player/gstplayer.c
+@@ -582,12 +582,7 @@ gst_player_set_uri_internal (gpointer user_data)
+ (GDestroyNotify) uri_loaded_signal_data_free);
+   }
+ 
+-  /* if have suburi from previous playback then free it */
+-  if (self->suburi) {
+-g_free (self->suburi);
+-self->suburi = NULL;
+-g_object_set (self->playbin, "suburi", NULL, NULL);
+-  }
++  g_object_set (self->playbin, "suburi", NULL, NULL);
+ 
+   g_mutex_unlock (>lock);
+ 
+@@ -667,6 +662,9 @@ gst_player_set_property (GObject * object, guint prop_id,
+   g_free (self->redirect_uri);
+   self->redirect_uri = NULL;
+ 
++  g_free (self->suburi);
++  self->suburi = NULL;
++
+   self->uri = g_value_dup_string (value);
+   GST_DEBUG_OBJECT (self, "Set uri=%s", self->uri);
+   g_mutex_unlock (>lock);
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
index 82cd91c..91e1a51 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
@@ -22,6 +22,7 @@ SRC_URI = " \
 file://0003-player-Add-configuration-for-enabling-accurate-seeks.patch \
 file://0004-player-Add-get-track-number-media-info-API.patch \
 file://0005-player-Add-overlayvideorenderer-video-sink.patch \
+file://0006-gst-player-fix-gst-player-failed-to-load-external-su.patch \
 "
 SRC_URI[md5sum] = "2757103e57a096a1a05b3ab85b8381af"
 SRC_URI[sha256sum] = 
"23ddae506b3a223b94869a0d3eea3e9a12e847f94d2d0e0b97102ce13ecd6966"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 3/6] gstreamer1.0-plugins-bad: Add get track number media info API

2017-05-15 Thread Yuqing Zhu
Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...layer-Add-get-track-number-media-info-API.patch | 126 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |   1 +
 2 files changed, 127 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-player-Add-get-track-number-media-info-API.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-player-Add-get-track-number-media-info-API.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-player-Add-get-track-number-media-info-API.patch
new file mode 100755
index 000..82e05bb
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-player-Add-get-track-number-media-info-API.patch
@@ -0,0 +1,126 @@
+From 573142bb46ea578bf0672923553877c9726c Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.w...@nxp.com>
+Date: Tue, 20 Dec 2016 18:20:02 +0800
+Subject: [PATCH 2/5] player: Add get track number media info API
+
+Upstream-Status: Backport [1.11.1]
+https://bugzilla.gnome.org/show_bug.cgi?id=773570
+---
+ docs/libs/gst-plugins-bad-libs-sections.txt |  4 ++
+ gst-libs/gst/player/gstplayer-media-info.c  | 62 +
+ gst-libs/gst/player/gstplayer-media-info.h  |  8 
+ 3 files changed, 74 insertions(+)
+
+diff --git a/docs/libs/gst-plugins-bad-libs-sections.txt 
b/docs/libs/gst-plugins-bad-libs-sections.txt
+index 77092f9..8515556 100644
+--- a/docs/libs/gst-plugins-bad-libs-sections.txt
 b/docs/libs/gst-plugins-bad-libs-sections.txt
+@@ -2064,6 +2064,10 @@ gst_player_media_info_is_live
+ gst_player_media_info_get_image_sample
+ gst_player_media_info_get_tags
+ gst_player_media_info_get_stream_list
++gst_player_media_info_get_number_of_streams
++gst_player_media_info_get_number_of_video_streams
++gst_player_media_info_get_number_of_audio_streams
++gst_player_media_info_get_number_of_subtitle_streams
+ 
+ gst_player_stream_info_get_index
+ gst_player_stream_info_get_caps
+diff --git a/gst-libs/gst/player/gstplayer-media-info.c 
b/gst-libs/gst/player/gstplayer-media-info.c
+index bba8ea6..a6c17c4 100644
+--- a/gst-libs/gst/player/gstplayer-media-info.c
 b/gst-libs/gst/player/gstplayer-media-info.c
+@@ -791,3 +791,65 @@ gst_player_media_info_get_image_sample (const 
GstPlayerMediaInfo * info)
+ 
+   return info->image_sample;
+ }
++
++/**
++ * gst_player_media_info_get_number_of_streams:
++ * @info: a #GstPlayerMediaInfo
++ *
++ * Returns: number of total streams.
++ * Since: 1.12
++ */
++guint
++gst_player_media_info_get_number_of_streams (const GstPlayerMediaInfo * info)
++{
++  g_return_val_if_fail (GST_IS_PLAYER_MEDIA_INFO (info), 0);
++
++  return g_list_length (info->stream_list);
++}
++
++/**
++ * gst_player_media_info_get_number_of_video_streams:
++ * @info: a #GstPlayerMediaInfo
++ *
++ * Returns: number of video streams.
++ * Since: 1.12
++ */
++guint
++gst_player_media_info_get_number_of_video_streams (const GstPlayerMediaInfo *
++info)
++{
++  g_return_val_if_fail (GST_IS_PLAYER_MEDIA_INFO (info), 0);
++
++  return g_list_length (info->video_stream_list);
++}
++
++/**
++ * gst_player_media_info_get_number_of_audio_streams:
++ * @info: a #GstPlayerMediaInfo
++ *
++ * Returns: number of audio streams.
++ * Since: 1.12
++ */
++guint
++gst_player_media_info_get_number_of_audio_streams (const GstPlayerMediaInfo *
++info)
++{
++  g_return_val_if_fail (GST_IS_PLAYER_MEDIA_INFO (info), 0);
++
++  return g_list_length (info->audio_stream_list);
++}
++
++/**
++ * gst_player_media_info_get_number_of_subtitle_streams:
++ * @info: a #GstPlayerMediaInfo
++ *
++ * Returns: number of subtitle streams.
++ * Since: 1.12
++ */
++guint gst_player_media_info_get_number_of_subtitle_streams
++(const GstPlayerMediaInfo * info)
++{
++  g_return_val_if_fail (GST_IS_PLAYER_MEDIA_INFO (info), 0);
++
++  return g_list_length (info->subtitle_stream_list);
++}
+diff --git a/gst-libs/gst/player/gstplayer-media-info.h 
b/gst-libs/gst/player/gstplayer-media-info.h
+index 7ffd6b4..6866ff6 100644
+--- a/gst-libs/gst/player/gstplayer-media-info.h
 b/gst-libs/gst/player/gstplayer-media-info.h
+@@ -175,12 +175,20 @@ GstClockTime  gst_player_media_info_get_duration
+ (const GstPlayerMediaInfo *info);
+ GList*gst_player_media_info_get_stream_list
+ (const GstPlayerMediaInfo *info);
++guint gst_player_media_info_get_number_of_streams
++(const GstPlayerMediaInfo *info);
+ GList*gst_player_get_video_streams
+ (const GstPlayerMediaInfo *info);
++guint gst_player_media_info_get_number_of_video_streams
++(const GstPlayerMediaInfo *info);
+ GList*gst_player_get_audio_streams
+ (const GstPlayerMediaInfo *info);
++guint gst_player_media_info_get_number_of_audio_streams
++(const GstPlayerMediaInfo *info);
+ GList*gst_

[OE-core] [poky][PATCH 6/6] gstreamer1.0-plugins-bad: Fix memory leak when use a GValue in glupload

2017-05-15 Thread Yuqing Zhu
GValue "targets" should be unset after set to caps
to avoid memory leak.

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...-glupload-fix-memory-leak-when-use-a-GVal.patch | 29 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb   |  1 +
 2 files changed, 30 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glupload-fix-memory-leak-when-use-a-GVal.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glupload-fix-memory-leak-when-use-a-GVal.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glupload-fix-memory-leak-when-use-a-GVal.patch
new file mode 100755
index 000..fa98405
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glupload-fix-memory-leak-when-use-a-GVal.patch
@@ -0,0 +1,29 @@
+From a3988d464c89742cfe8fbbd570eef5e6ab5159ba Mon Sep 17 00:00:00 2001
+From: Haihua Hu <jared...@nxp.com>
+Date: Fri, 28 Apr 2017 10:21:31 +0800
+Subject: [PATCH 1/2] glupload: fix memory leak when use a GValue
+
+GValue "targets" should be unset after set to caps
+to avoid memory leak
+
+Upstream-Status: Backport [1.10.5]
+https://bugzilla.gnome.org/show_bug.cgi?id=781876
+---
+ gst-libs/gst/gl/gstglupload.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c
+index f33a696..3ef3b19 100644
+--- a/gst-libs/gst/gl/gstglupload.c
 b/gst-libs/gst/gl/gstglupload.c
+@@ -179,6 +179,7 @@ _caps_intersect_texture_target (GstCaps * caps, 
GstGLTextureTarget target_mask)
+   target = gst_caps_copy (caps);
+   gst_gl_value_set_texture_target_from_mask (, target_mask);
+   gst_caps_set_value (target, "texture-target", );
++  g_value_unset();
+ 
+   ret = gst_caps_intersect_full (caps, target, GST_CAPS_INTERSECT_FIRST);
+ 
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
index 91e1a51..68f78ea 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb
@@ -23,6 +23,7 @@ SRC_URI = " \
 file://0004-player-Add-get-track-number-media-info-API.patch \
 file://0005-player-Add-overlayvideorenderer-video-sink.patch \
 file://0006-gst-player-fix-gst-player-failed-to-load-external-su.patch \
+file://0007-glupload-fix-memory-leak-when-use-a-GVal.patch \
 "
 SRC_URI[md5sum] = "2757103e57a096a1a05b3ab85b8381af"
 SRC_URI[sha256sum] = 
"23ddae506b3a223b94869a0d3eea3e9a12e847f94d2d0e0b97102ce13ecd6966"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 1/4] gstreamer1.0-plugins-bad: Support video rotation by using transform matrix

2016-10-11 Thread Yuqing Zhu
Add "rotate-method" to glimagesink and apply transform matrix
to vertex coordinate to control rotation.

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...-glplugin-glimagesink-support-video-rotat.patch | 574 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb|   1 +
 2 files changed, 575 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0010-glplugin-glimagesink-support-video-rotat.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0010-glplugin-glimagesink-support-video-rotat.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0010-glplugin-glimagesink-support-video-rotat.patch
new file mode 100755
index 000..b00782c
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0010-glplugin-glimagesink-support-video-rotat.patch
@@ -0,0 +1,574 @@
+From 31c18b0796b433c5a3cfda90960dd394b16f8f1e Mon Sep 17 00:00:00 2001
+From: Haihua Hu <jared...@nxp.com>
+Date: Mon, 9 May 2016 20:26:51 +0800
+Subject: [PATCH] [MMFMWK-7151] [glplugin] glimagesink: support video rotation
+ using transform matrix
+
+Add "rotate-method" to glimagesink and apply transform matrix
+to vertex coordinate to control rotation.
+
+Upstream-Status: Backport[1.9.1]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=765795
+
+Signed-off-by: Haihua Hu <jared...@nxp.com>
+---
+ ext/gl/gstglimagesink.c  | 266 ---
+ ext/gl/gstglimagesink.h  |  18 +++
+ gst-libs/gst/gl/gstglshaderstrings.c |  11 ++
+ gst-libs/gst/gl/gstglshaderstrings.h |   1 +
+ gst-libs/gst/gl/gstglutils.c |  60 
+ gst-libs/gst/gl/gstglutils.h |   5 +
+ 6 files changed, 344 insertions(+), 17 deletions(-)
+
+diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c
+index 185577f..fb60468 100644
+--- a/ext/gl/gstglimagesink.c
 b/ext/gl/gstglimagesink.c
+@@ -120,6 +120,7 @@ G_DEFINE_TYPE (GstGLImageSinkBin, gst_gl_image_sink_bin, 
GST_TYPE_GL_SINK_BIN);
+ enum
+ {
+   PROP_BIN_0,
++  PROP_BIN_ROTATE_METHOD,
+   PROP_BIN_FORCE_ASPECT_RATIO,
+   PROP_BIN_PIXEL_ASPECT_RATIO,
+   PROP_BIN_HANDLE_EVENTS,
+@@ -181,6 +182,39 @@ _on_client_draw (GstGLImageSink * sink, GstGLContext * 
context,
+   return ret;
+ }
+ 
++#define DEFAULT_ROTATE_METHOD GST_GL_ROTATE_METHOD_IDENTITY
++
++#define GST_TYPE_GL_ROTATE_METHOD (gst_gl_rotate_method_get_type())
++
++static const GEnumValue rotate_methods[] = {
++  {GST_GL_ROTATE_METHOD_IDENTITY, "Identity (no rotation)", "none"},
++  {GST_GL_ROTATE_METHOD_90R, "Rotate clockwise 90 degrees", "clockwise"},
++  {GST_GL_ROTATE_METHOD_180, "Rotate 180 degrees", "rotate-180"},
++  {GST_GL_ROTATE_METHOD_90L, "Rotate counter-clockwise 90 degrees",
++  "counterclockwise"},
++  {GST_GL_ROTATE_METHOD_FLIP_HORIZ, "Flip horizontally", "horizontal-flip"},
++  {GST_GL_ROTATE_METHOD_FLIP_VERT, "Flip vertically", "vertical-flip"},
++  {GST_GL_ROTATE_METHOD_FLIP_UL_LR,
++  "Flip across upper left/lower right diagonal", "upper-left-diagonal"},
++  {GST_GL_ROTATE_METHOD_FLIP_UR_LL,
++  "Flip across upper right/lower left diagonal", "upper-right-diagonal"},
++  {GST_GL_ROTATE_METHOD_AUTO,
++  "Select rotate method based on image-orientation tag", "automatic"},
++  {0, NULL, NULL},
++};
++
++static GType
++gst_gl_rotate_method_get_type (void)
++{
++  static GType rotate_method_type = 0;
++
++  if (!rotate_method_type) {
++rotate_method_type = g_enum_register_static ("GstGLRotateMethod",
++rotate_methods);
++  }
++  return rotate_method_type;
++}
++
+ static void
+ gst_gl_image_sink_bin_init (GstGLImageSinkBin * self)
+ {
+@@ -203,6 +237,12 @@ gst_gl_image_sink_bin_class_init (GstGLImageSinkBinClass 
* klass)
+   gobject_class->set_property = gst_gl_image_sink_bin_set_property;
+ 
+   /* gl sink */
++  g_object_class_install_property (gobject_class, PROP_BIN_ROTATE_METHOD,
++  g_param_spec_enum ("rotate-method",
++  "rotate method",
++  "rotate method",
++  GST_TYPE_GL_ROTATE_METHOD, DEFAULT_ROTATE_METHOD,
++  G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+   g_object_class_install_property (gobject_class, PROP_BIN_FORCE_ASPECT_RATIO,
+   g_param_spec_boolean ("force-aspect-ratio",
+   "Force aspect ratio",
+@@ -291,6 +331,7 @@ static void gst_glimage_sink_set_property (GObject * 
object, guint prop_id,
+ static void gst_glimage_sink_get_property (GObject * object, guint prop_id,
+ GValue * value, GParamSpec * param_spec);
+ 
++static gboolean gst_glimage_sink_event (GstBaseSink *sink, GstEvent * event);
+ static gboolean gst_glimage_sink_query (GstBaseSink * bsink, GstQuery * 

[OE-core] [poky][PATCH 0/4] Add patches for gstreamer1.0-plugins-bad V1.8.3

2016-10-11 Thread Yuqing Zhu
-Support video rotation by using transform matrix

-Fix wrong attribute list type for EGL 1.5

-Fix horizontal/vertical flip matrizes

-Fix glimagesink cannot show frame when connect to qmlglsrc

Yuqing Zhu (4):
  gstreamer1.0-plugins-bad: Support video rotation by using transform
matrix
  gstreamer1.0-plugins-bad: Fix wrong attribute list type for EGL 1.5
  gstreamer1.0-plugins-bad: Fix horizontal/vertical flip matrizes
  gstreamer1.0-plugins-bad: Fix glimagesink cannot show frame when
connect to qmlglsrc

 ...-glplugin-glimagesink-support-video-rotat.patch | 574 +
 ...Buf-Wrong-attribute-list-type-for-EGL-1.5.patch | 194 +++
 ...ink-Fix-horizontal-vertical-flip-matrizes.patch |  44 ++
 ...x-glimagesink-cannot-show-frame-when-conn.patch |  71 +++
 .../gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb|   4 +
 5 files changed, 887 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0010-glplugin-glimagesink-support-video-rotat.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0011-EGL_DMA_Buf-Wrong-attribute-list-type-for-EGL-1.5.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0012-glimagesink-Fix-horizontal-vertical-flip-matrizes.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0013-glwindow-Fix-glimagesink-cannot-show-frame-when-conn.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 3/4] gstreamer1.0-plugins-bad: Fix horizontal/vertical flip matrizes

2016-10-11 Thread Yuqing Zhu
Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...ink-Fix-horizontal-vertical-flip-matrizes.patch | 44 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb|  1 +
 2 files changed, 45 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0012-glimagesink-Fix-horizontal-vertical-flip-matrizes.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0012-glimagesink-Fix-horizontal-vertical-flip-matrizes.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0012-glimagesink-Fix-horizontal-vertical-flip-matrizes.patch
new file mode 100755
index 000..701eaef
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0012-glimagesink-Fix-horizontal-vertical-flip-matrizes.patch
@@ -0,0 +1,44 @@
+From 99937ea5854b6182333b9cf578db726748665ae7 Mon Sep 17 00:00:00 2001
+From: Haihua Hu <jared...@nxp.com>
+Date: Mon, 1 Aug 2016 14:12:35 +0800
+Subject: [PATCH 1/6] glimagesink: Fix horizontal/vertical flip matrizes
+
+They were swapped.
+
+Upstream-Status: Backport [1.9.2]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=769371
+
+Signed-off-by: Haihua Hu <jared...@nxp.com>
+---
+ ext/gl/gstglimagesink.c | 8 
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c
+index fb60468..cd3147d 100644
+--- a/ext/gl/gstglimagesink.c
 b/ext/gl/gstglimagesink.c
+@@ -472,16 +472,16 @@ static const gfloat counterclockwise_matrix[] = {
+ 
+ /* horizontal-flip */
+ static const gfloat horizontal_flip_matrix[] = {
+-  1.0f, 0.0f, 0.0f, 0.0f,
+-  0.0f, -1.0f, 0.0f, 0.0f,
++  -1.0f, 0.0f, 0.0f, 0.0f,
++  0.0f, 1.0f, 0.0f, 0.0f,
+   0.0f, 0.0f, 1.0f, 0.0f,
+   0.0f, 0.0f, 0.0f, 1.0f,
+ };
+ 
+ /* vertical-flip */
+ static const gfloat vertical_flip_matrix[] = {
+-  -1.0f, 0.0f, 0.0f, 0.0f,
+-  0.0f, 1.0f, 0.0f, 0.0f,
++  1.0f, 0.0f, 0.0f, 0.0f,
++  0.0f, -1.0f, 0.0f, 0.0f,
+   0.0f, 0.0f, 1.0f, 0.0f,
+   0.0f, 0.0f, 0.0f, 1.0f,
+ };
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb
index 3b57db9..2bde0a6 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb
@@ -21,6 +21,7 @@ SRC_URI = " \
 file://0009-glimagesink-Downrank-to-marginal.patch \
 file://0010-glplugin-glimagesink-support-video-rotat.patch \
 file://0011-EGL_DMA_Buf-Wrong-attribute-list-type-for-EGL-1.5.patch \
+file://0012-glimagesink-Fix-horizontal-vertical-flip-matrizes.patch \
 "
 SRC_URI[md5sum] = "955281a43e98c5464563fa049e0a0911"
 SRC_URI[sha256sum] = 
"7899fcb18e6a1af2888b19c90213af018a57d741c6e72ec56b133bc73ec8509b"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 2/4] gstreamer1.0-plugins-bad: Fix wrong attribute list type for EGL 1.5

2016-10-11 Thread Yuqing Zhu
For EGL 1.5 spec, the attribute list type should be EGLAttrib.

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...Buf-Wrong-attribute-list-type-for-EGL-1.5.patch | 194 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb|   1 +
 2 files changed, 195 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0011-EGL_DMA_Buf-Wrong-attribute-list-type-for-EGL-1.5.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0011-EGL_DMA_Buf-Wrong-attribute-list-type-for-EGL-1.5.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0011-EGL_DMA_Buf-Wrong-attribute-list-type-for-EGL-1.5.patch
new file mode 100755
index 000..8e97cc0
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0011-EGL_DMA_Buf-Wrong-attribute-list-type-for-EGL-1.5.patch
@@ -0,0 +1,194 @@
+From b390dc7aee52f87a0841740092bca19d6e48881f Mon Sep 17 00:00:00 2001
+From: Song Bing <bing.s...@nxp.com>
+Date: Wed, 13 Jul 2016 17:15:44 +0800
+Subject: [PATCH] EGL_DMA_Buf: Wrong attribute list type for EGL 1.5
+
+For EGL 1.5 spec, the attribute list type should be EGLAttrib.
+
+Upstream-Status: Backport [1.9.2]
+https://bugzilla.gnome.org/show_bug.cgi?id=768602
+---
+ gst-libs/gst/gl/egl/gsteglimagememory.c |   78 ---
+ gst-libs/gst/gl/egl/gstglcontext_egl.c  |   20 
+ gst-libs/gst/gl/egl/gstglcontext_egl.h  |3 ++
+ 3 files changed, 66 insertions(+), 35 deletions(-)
+
+diff --git a/gst-libs/gst/gl/egl/gsteglimagememory.c 
b/gst-libs/gst/gl/egl/gsteglimagememory.c
+index 46098b5..6c5ae47 100644
+--- a/gst-libs/gst/gl/egl/gsteglimagememory.c
 b/gst-libs/gst/gl/egl/gsteglimagememory.c
+@@ -432,6 +432,9 @@ gst_egl_image_memory_from_dmabuf (GstGLContext * context,
+   gint fourcc;
+   gint atti = 0;
+   EGLint attribs[13];
++#ifdef EGL_VERSION_1_5
++  EGLAttrib attribs_1_5[13];
++#endif
+   EGLImageKHR img = EGL_NO_IMAGE_KHR;
+ 
+   allocator = gst_egl_image_allocator_obtain ();
+@@ -442,32 +445,55 @@ gst_egl_image_memory_from_dmabuf (GstGLContext * context,
+   GST_VIDEO_INFO_COMP_WIDTH (in_info, plane),
+   GST_VIDEO_INFO_COMP_HEIGHT (in_info, plane));
+ 
+-  attribs[atti++] = EGL_WIDTH;
+-  attribs[atti++] = GST_VIDEO_INFO_COMP_WIDTH (in_info, plane);
+-  attribs[atti++] = EGL_HEIGHT;
+-  attribs[atti++] = GST_VIDEO_INFO_COMP_HEIGHT (in_info, plane);
+-
+-  attribs[atti++] = EGL_LINUX_DRM_FOURCC_EXT;
+-  attribs[atti++] = fourcc;
+-
+-  attribs[atti++] = EGL_DMA_BUF_PLANE0_FD_EXT;
+-  attribs[atti++] = dmabuf;
+-
+-  attribs[atti++] = EGL_DMA_BUF_PLANE0_OFFSET_EXT;
+-  attribs[atti++] = offset;
+-  attribs[atti++] = EGL_DMA_BUF_PLANE0_PITCH_EXT;
+-  attribs[atti++] = GST_VIDEO_INFO_PLANE_STRIDE (in_info, plane);
+-
+-  attribs[atti] = EGL_NONE;
+-
+-  for (int i = 0; i < atti; i++)
+-GST_LOG ("attr %i: %08X", i, attribs[i]);
+-
+-  g_assert (atti == 12);
+-
+-  img = ctx_egl->eglCreateImage (ctx_egl->egl_display, EGL_NO_CONTEXT,
+-  EGL_LINUX_DMA_BUF_EXT, NULL, attribs);
+-
++#ifdef EGL_VERSION_1_5
++  if (GST_GL_CHECK_GL_VERSION (ctx_egl->egl_major, ctx_egl->egl_minor, 1, 5)) 
{
++attribs_1_5[atti++] = EGL_WIDTH;
++attribs_1_5[atti++] = GST_VIDEO_INFO_COMP_WIDTH (in_info, plane);
++attribs_1_5[atti++] = EGL_HEIGHT;
++attribs_1_5[atti++] = GST_VIDEO_INFO_COMP_HEIGHT (in_info, plane);
++attribs_1_5[atti++] = EGL_LINUX_DRM_FOURCC_EXT;
++attribs_1_5[atti++] = fourcc;
++attribs_1_5[atti++] = EGL_DMA_BUF_PLANE0_FD_EXT;
++attribs_1_5[atti++] = dmabuf;
++attribs_1_5[atti++] = EGL_DMA_BUF_PLANE0_OFFSET_EXT;
++attribs_1_5[atti++] = offset;
++attribs_1_5[atti++] = EGL_DMA_BUF_PLANE0_PITCH_EXT;
++attribs_1_5[atti++] = GST_VIDEO_INFO_PLANE_STRIDE (in_info, plane);
++attribs_1_5[atti] = EGL_NONE;
++
++for (int i = 0; i < atti; i++)
++  GST_LOG ("attr %i: %" G_GINTPTR_FORMAT, i, attribs_1_5[i]);
++
++g_assert (atti == 12);
++
++img = ctx_egl->eglCreateImage (ctx_egl->egl_display, EGL_NO_CONTEXT,
++EGL_LINUX_DMA_BUF_EXT, NULL, attribs_1_5);
++
++  } else
++#endif
++  {
++attribs[atti++] = EGL_WIDTH;
++attribs[atti++] = GST_VIDEO_INFO_COMP_WIDTH (in_info, plane);
++attribs[atti++] = EGL_HEIGHT;
++attribs[atti++] = GST_VIDEO_INFO_COMP_HEIGHT (in_info, plane);
++attribs[atti++] = EGL_LINUX_DRM_FOURCC_EXT;
++attribs[atti++] = fourcc;
++attribs[atti++] = EGL_DMA_BUF_PLANE0_FD_EXT;
++attribs[atti++] = dmabuf;
++attribs[atti++] = EGL_DMA_BUF_PLANE0_OFFSET_EXT;
++attribs[atti++] = offset;
++attribs[atti++] = EGL_DMA_BUF_PLANE0_PITCH_EXT;
++attribs[atti++] = GST_VIDEO_INFO_PLANE_STRIDE (in_info, plane);
++attribs[atti] = EGL_NONE;
++
++for (int i = 0; i < atti; i++)
++  GST_LOG ("attr %i: %08X", i, attribs[i]);
++
++g_assert (atti == 12);
++
++img = ctx_egl->eglCreateImage (ctx

[OE-core] [poky][PATCH 4/4] gstreamer1.0-plugins-bad: Fix glimagesink cannot show frame when connect to qmlglsrc

2016-10-11 Thread Yuqing Zhu
1.When connect to qmlglsrc, x11 event loop will be replace by qt event loop
  which will cause the window cannot receive event from xserver, such as resize.

2.Also advertise support for the affine transformation meta in the allocation
  query.

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...x-glimagesink-cannot-show-frame-when-conn.patch | 71 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb|  1 +
 2 files changed, 72 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0013-glwindow-Fix-glimagesink-cannot-show-frame-when-conn.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0013-glwindow-Fix-glimagesink-cannot-show-frame-when-conn.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0013-glwindow-Fix-glimagesink-cannot-show-frame-when-conn.patch
new file mode 100755
index 000..eb79c5a
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0013-glwindow-Fix-glimagesink-cannot-show-frame-when-conn.patch
@@ -0,0 +1,71 @@
+From 139e50acd70b8ce0e220d7d7433ccfe43a6b1fd8 Mon Sep 17 00:00:00 2001
+From: Haihua Hu <jared...@nxp.com>
+Date: Wed, 27 Jul 2016 10:55:01 +0800
+Subject: [PATCH 5/6] glwindow: Fix glimagesink cannot show frame when connect
+ to qmlglsrc
+
+1.When connect to qmlglsrc, x11 event loop will be replace by qt event loop
+  which will cause the window cannot receive event from xserver, such as resize
+2.Also advertise support for the affine transformation meta in the allocation
+  query.
+
+Upstream-Status: Backport [1.9.2]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=768160
+
+Signed-off-by: Haihua Hu <jared...@nxp.com>
+---
+ ext/gl/gstglimagesink.c   |  2 ++
+ gst-libs/gst/gl/x11/gstglwindow_x11.c | 14 +-
+ 2 files changed, 11 insertions(+), 5 deletions(-)
+
+diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c
+index cd3147d..d81fcfb 100644
+--- a/ext/gl/gstglimagesink.c
 b/ext/gl/gstglimagesink.c
+@@ -1957,6 +1957,8 @@ gst_glimage_sink_propose_allocation (GstBaseSink * 
bsink, GstQuery * query)
+ 
+   gst_query_add_allocation_meta (query,
+   GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE, allocation_meta);
++  gst_query_add_allocation_meta (query,
++  GST_VIDEO_AFFINE_TRANSFORMATION_META_API_TYPE, 0);
+ 
+   if (allocation_meta)
+ gst_structure_free (allocation_meta);
+diff --git a/gst-libs/gst/gl/x11/gstglwindow_x11.c 
b/gst-libs/gst/gl/x11/gstglwindow_x11.c
+index 67160f6..bc7b9c0 100644
+--- a/gst-libs/gst/gl/x11/gstglwindow_x11.c
 b/gst-libs/gst/gl/x11/gstglwindow_x11.c
+@@ -399,6 +399,7 @@ draw_cb (gpointer data)
+   GstGLWindow *window = GST_GL_WINDOW (window_x11);
+ 
+   if (gst_gl_window_is_running (window)) {
++guint width, height;
+ XWindowAttributes attr;
+ 
+ XGetWindowAttributes (window_x11->device, window_x11->internal_win_id,
+@@ -422,13 +423,16 @@ draw_cb (gpointer data)
+   }
+ }
+ 
+-if (window_x11->allow_extra_expose_events) {
+-  if (window->queue_resize) {
+-guint width, height;
++gst_gl_window_get_surface_dimensions (window, , );
++if (attr.width != width || attr.height != height) {
++  width = attr.width;
++  height = attr.height;
++  gst_gl_window_queue_resize (window);
++}
+ 
+-gst_gl_window_get_surface_dimensions (window, , );
++if (window_x11->allow_extra_expose_events) {
++  if (window->queue_resize)
+ gst_gl_window_resize (window, width, height);
+-  }
+ 
+   if (window->draw) {
+ GstGLContext *context = gst_gl_window_get_context (window);
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb
index 2bde0a6..55ffce9 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.3.bb
@@ -22,6 +22,7 @@ SRC_URI = " \
 file://0010-glplugin-glimagesink-support-video-rotat.patch \
 file://0011-EGL_DMA_Buf-Wrong-attribute-list-type-for-EGL-1.5.patch \
 file://0012-glimagesink-Fix-horizontal-vertical-flip-matrizes.patch \
+file://0013-glwindow-Fix-glimagesink-cannot-show-frame-when-conn.patch \
 "
 SRC_URI[md5sum] = "955281a43e98c5464563fa049e0a0911"
 SRC_URI[sha256sum] = 
"7899fcb18e6a1af2888b19c90213af018a57d741c6e72ec56b133bc73ec8509b"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH] gstreamer1.0-plugins-good: Remove gst_meta_ximage_transform function

2016-10-11 Thread Yuqing Zhu
Remove the transform function as it is not supported. 

Or gst_buffer_copy_into() will print ERROR log.

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...shouldn-t-implement-transform-if-don-t-su.patch | 48 ++
 .../gstreamer/gstreamer1.0-plugins-good_1.8.3.bb   |  1 +
 2 files changed, 49 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0002-ximageutil-shouldn-t-implement-transform-if-don-t-su.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0002-ximageutil-shouldn-t-implement-transform-if-don-t-su.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0002-ximageutil-shouldn-t-implement-transform-if-don-t-su.patch
new file mode 100755
index 000..a73f16e
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0002-ximageutil-shouldn-t-implement-transform-if-don-t-su.patch
@@ -0,0 +1,48 @@
+From 17b1abd8491d87fab389654f313b72bded24afc2 Mon Sep 17 00:00:00 2001
+From: Song Bing <bing.s...@nxp.com>
+Date: Tue, 26 Apr 2016 16:49:33 +0800
+Subject: [PATCH] ximageutil: shouldn't implement transform if don't support
+ it.
+
+shouldn't implement transform if don't support it. Or
+gst_buffer_copy_into() will print ERROR log.
+
+Upstream-Status: Backport [1.9.1]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=765583
+---
+ sys/ximage/ximageutil.c |   11 +--
+ 1 file changed, 1 insertion(+), 10 deletions(-)
+
+diff --git a/sys/ximage/ximageutil.c b/sys/ximage/ximageutil.c
+index ac2fd49..add0422 100644
+--- a/sys/ximage/ximageutil.c
 b/sys/ximage/ximageutil.c
+@@ -36,15 +36,6 @@ gst_meta_ximage_api_get_type (void)
+   return type;
+ }
+ 
+-static gboolean
+-gst_meta_ximage_transform (GstBuffer * dest, GstMeta * meta,
+-GstBuffer * buffer, GQuark type, gpointer data)
+-{
+-  /* ximage metadata can't be transformed or copied */
+-
+-  return FALSE;
+-}
+-
+ const GstMetaInfo *
+ gst_meta_ximage_get_info (void)
+ {
+@@ -54,7 +45,7 @@ gst_meta_ximage_get_info (void)
+ const GstMetaInfo *meta =
+ gst_meta_register (gst_meta_ximage_api_get_type (), 
"GstMetaXImageSrc",
+ sizeof (GstMetaXImage), (GstMetaInitFunction) NULL,
+-(GstMetaFreeFunction) NULL, gst_meta_ximage_transform);
++(GstMetaFreeFunction) NULL, (GstMetaTransformFunction) NULL);
+ g_once_init_leave (_ximage_info, meta);
+   }
+   return meta_ximage_info;
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb
index 5cc6578..34b6008 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.8.3.bb
@@ -9,6 +9,7 @@ SRC_URI = " \
 file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \
 file://avoid-including-sys-poll.h-directly.patch \
 file://ensure-valid-sentinel-for-gst_structure_get.patch \
+file://0002-ximageutil-shouldn-t-implement-transform-if-don-t-su.patch \
 "
 
 SRC_URI[md5sum] = "473ebb1f15c67de99ddb6e4d027c0876"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [poky][PATCH 1/6] gstreamer1.0-plugins-bad: Enable gldeinterlace on OpenGL ES

2016-07-05 Thread Yuqing Zhu
Hi Ross,

  Thanks for your feedback.
   Yes, it is backported from 1.9.1, I will update  the Upstream-Status and 
resend the patch.


B.R.
Carol

From: Burton, Ross [mailto:ross.bur...@intel.com]
Sent: Monday, July 04, 2016 6:19 PM
To: Yuqing Zhu <carol@nxp.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [poky][PATCH 1/6] gstreamer1.0-plugins-bad: Enable 
gldeinterlace on OpenGL ES


On 4 July 2016 at 06:46, Yuqing Zhu 
<carol@nxp.com<mailto:carol@nxp.com>> wrote:
+Upstream-Status: Pending
+
+https://bugzilla.gnome.org/show_bug.cgi?id=764873

U-S says Pending, bug says fixed.

Is this a backport of a change that actually landed upstream?  I don't really 
agree with OE-Core carrying new API and features in a core component like 
GStreamer that are not backported.

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v2 1/6] gstreamer1.0-plugins-bad: Enable gldeinterlace on OpenGL ES

2016-07-05 Thread Yuqing Zhu
Enable gldeinterlace on OpenGL ES to improve performance.

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...lplugin-enable-gldeinterlace-on-OpenGL-ES.patch | 634 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb|   1 +
 2 files changed, 635 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
new file mode 100755
index 000..51f4eb4
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
@@ -0,0 +1,634 @@
+From 8a0e97f7e672301cc76e394855e8c7a3448b0249 Mon Sep 17 00:00:00 2001
+From: Haihua Hu <jared...@nxp.com>
+Date: Fri, 8 Apr 2016 16:47:15 +0800
+Subject: [PATCH 4/6] [glplugin] enable gldeinterlace on OpenGL ES
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+1.Porting the exist deinterlace shader and OpenGL callback
+  to be compatible with OpenGL ES.
+2.Add a our blur vertical shader to gldeinterlace.
+3.Add a property named “method” to let user choose which
+  deinterlace function to use. Default to choose blur vertical
+  method for better performance.
+
+Upstream-Status: Backport [1.9.1]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=764873
+
+Signed-off-by: Haihua Hu <jared...@nxp.com>
+---
+ ext/gl/Makefile.am|   4 +-
+ ext/gl/gstgldeinterlace.c | 344 +++---
+ ext/gl/gstgldeinterlace.h |   6 +-
+ ext/gl/gstopengl.c|  13 +-
+ 4 files changed, 275 insertions(+), 92 deletions(-)
+
+diff --git a/ext/gl/Makefile.am b/ext/gl/Makefile.am
+index 5d55f54..46419a7 100644
+--- a/ext/gl/Makefile.am
 b/ext/gl/Makefile.am
+@@ -40,6 +40,7 @@ libgstopengl_la_SOURCES = \
+   gstglfilterapp.c \
+   gstglviewconvert.c \
+   gstglstereosplit.c \
++  gstgldeinterlace.c \
+   gstglstereomix.c
+ 
+ noinst_HEADERS = \
+@@ -63,20 +64,19 @@ noinst_HEADERS = \
+   gstglfilterapp.h \
+   gstglstereosplit.h \
+   gstglstereomix.h \
++  gstgldeinterlace.h \
+   gstglviewconvert.h
+ 
+ # full opengl required
+ if USE_OPENGL
+ libgstopengl_la_SOURCES += \
+   gstglfilterglass.c \
+-  gstgldeinterlace.c \
+   gltestsrc.c \
+   gstgltestsrc.c \
+   gstglmosaic.c
+ 
+ noinst_HEADERS += \
+   gstglfilterglass.h \
+-  gstgldeinterlace.h \
+   gltestsrc.h \
+   gstgltestsrc.h \
+   gstglmosaic.h \
+diff --git a/ext/gl/gstgldeinterlace.c b/ext/gl/gstgldeinterlace.c
+index bd0eff0..c1250dc 100644
+--- a/ext/gl/gstgldeinterlace.c
 b/ext/gl/gstgldeinterlace.c
+@@ -43,7 +43,8 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+ 
+ enum
+ {
+-  PROP_0
++  PROP_0,
++  PROP_METHOD
+ };
+ 
+ #define DEBUG_INIT \
+@@ -57,17 +58,23 @@ static void gst_gl_deinterlace_set_property (GObject * 
object,
+ static void gst_gl_deinterlace_get_property (GObject * object,
+ guint prop_id, GValue * value, GParamSpec * pspec);
+ 
++static gboolean gst_gl_deinterlace_start (GstBaseTransform * trans);
+ static gboolean gst_gl_deinterlace_reset (GstBaseTransform * trans);
+-static gboolean gst_gl_deinterlace_init_shader (GstGLFilter * filter);
++static gboolean gst_gl_deinterlace_init_fbo (GstGLFilter * filter);
+ static gboolean gst_gl_deinterlace_filter (GstGLFilter * filter,
+ GstBuffer * inbuf, GstBuffer * outbuf);
+ static gboolean gst_gl_deinterlace_filter_texture (GstGLFilter * filter,
+ guint in_tex, guint out_tex);
+-static void gst_gl_deinterlace_callback (gint width, gint height,
++static void gst_gl_deinterlace_vfir_callback (gint width, gint height,
++guint texture, gpointer stuff);
++static void gst_gl_deinterlace_greedyh_callback (gint width, gint height,
+ guint texture, gpointer stuff);
+ 
+ /* *INDENT-OFF* */
+ static const gchar *greedyh_fragment_source =
++  "#ifdef GL_ES\n"
++  "precision mediump float;\n"
++  "#endif\n"
+   "uniform sampler2D tex;\n"
+   "uniform sampler2D tex_prev;\n"
+   "uniform float max_comb;\n"
+@@ -75,35 +82,35 @@ static const gchar *greedyh_fragment_source =
+   "uniform float motion_sense;\n"
+   "uniform float width;\n"
+   "uniform float height;\n"
++  "varying vec2 v_texcoord;\n"
+ 
+   "void main () {\n"
+-  "  vec2 texcoord = gl_TexCoord[0].xy;\n"
+-  "  if (int(mod(texcoord.y * height, 2.0)) == 0) {\n"
+-  "gl_FragColor = vec4(texture2D(tex_prev, texcoord).rgb, 1.0);\n"
++  "  if (int(mod(v_texcoord.y * height, 2.0)) == 0) {\n"
++  "gl_FragColor = vec4(texture2D(tex_prev, v_texcoo

[OE-core] [poky][PATCH 3/6] gstreamer1.0-plugins-bad: Don't use the predefined variable name in glcolorconvert

2016-07-04 Thread Yuqing Zhu
Using 'sample' as a variable name is an error in GLES3.

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...ert-don-t-use-the-predefined-variable-nam.patch | 32 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb|  1 +
 2 files changed, 33 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch
new file mode 100755
index 000..b75f402
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch
@@ -0,0 +1,32 @@
+From b069672ace2b762f400ca6d318571cbedf5141f2 Mon Sep 17 00:00:00 2001
+From: Matthew Waters <matt...@centricular.com>
+Date: Thu, 31 Mar 2016 20:00:37 +1100
+Subject: [PATCH 1/3] glcolorconvert: don't use the predefined variable name
+ sample
+
+Using 'sample' as a variable name is an error in GLES3
+
+Upstream-Status: Backport [1.9.1]
+---
+ gst-libs/gst/gl/gstglcolorconvert.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gst-libs/gst/gl/gstglcolorconvert.c 
b/gst-libs/gst/gl/gstglcolorconvert.c
+index f478faa..c23624f 100644
+--- a/gst-libs/gst/gl/gstglcolorconvert.c
 b/gst-libs/gst/gl/gstglcolorconvert.c
+@@ -261,9 +261,9 @@ static const struct shader_templ templ_RGB_to_PLANAR_YUV =
+ "for (int j = 0; j < int(chroma_sampling.y); j++) {\n"
+ "  int n = (i+1)*(j+1);\n"
+ "  delta.y = float(j);\n"
+-"  vec4 sample = texture2D(tex, (chroma_pos + delta) / 
unnormalization).%c%c%c%c;\n"
++"  vec4 s = texture2D(tex, (chroma_pos + delta) / 
unnormalization).%c%c%c%c;\n"
+/* rolling average */
+-"  uv_texel = (float(n-1) * uv_texel + sample) / float(n);\n"
++"  uv_texel = (float(n-1) * uv_texel + s) / float(n);\n"
+ "}\n"
+ "  }\n"
+ "}\n"
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
index 0df1b8e..7f6b918 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
@@ -14,6 +14,7 @@ SRC_URI = " \
 file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
 file://0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch \
 file://0003-glcolorconvert-implement-multiple-render-targets-for.patch \
+file://0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch \
 "
 SRC_URI[md5sum] = "83abc2e70684e7b195f18ca2992ef6e8"
 SRC_URI[sha256sum] = 
"d7995317530c8773ec088f94d9320909d41da61996b801ebacce9a56af493f97"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 2/6] gstreamer1.0-plugins-bad: Implement multiple render targets for GLES3

2016-07-04 Thread Yuqing Zhu
There are numerous slight differences required between Desktop GL and GLES3 for
multiple render targets. Need to realize it.

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...ert-implement-multiple-render-targets-for.patch | 244 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb|   1 +
 2 files changed, 245 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch
new file mode 100755
index 000..31d8e05
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch
@@ -0,0 +1,244 @@
+From 127e517568490fc147211d8b2fb4da01cecbbeb5 Mon Sep 17 00:00:00 2001
+From: Matthew Waters <matt...@centricular.com>
+Date: Thu, 31 Mar 2016 19:50:28 +1100
+Subject: [PATCH 5/6] glcolorconvert: implement multiple render targets for
+ GLES3
+
+There are numerous slight differences required between Desktop GL and GLES3 for
+multiple render targets.
+
+1. gl_FragData doesn't exist at all and one is required to use
+   'layout (location = ?) out ...' instead.
+2. gl_FragColor doesn't exist, same as 1
+3. texture2D() has been deprecated
+
+Fortunately most of these have been taken care of with GL3 and the shader
+mangling already exists so just expand the conditions they are used in.  The
+gl_FragData issue requires a new mangle pass though.  We also use this new
+pass on desktop GL for consistency.
+
+Upstream-Status: Backport [1.9.1]
+
+---
+ gst-libs/gst/gl/gstglcolorconvert.c | 125 
+ 1 file changed, 99 insertions(+), 26 deletions(-)
+
+diff --git a/gst-libs/gst/gl/gstglcolorconvert.c 
b/gst-libs/gst/gl/gstglcolorconvert.c
+index 490ec54..f478faa 100644
+--- a/gst-libs/gst/gl/gstglcolorconvert.c
 b/gst-libs/gst/gl/gstglcolorconvert.c
+@@ -1802,10 +1802,11 @@ _mangle_sampler_type (const gchar * str, 
GstGLTextureTarget from,
+ 
+ static gchar *
+ _mangle_varying_attribute (const gchar * str, guint shader_type,
+-GstGLAPI gl_api)
++GstGLAPI gl_api, guint gl_major, guint gl_minor)
+ {
+-  if (gl_api & GST_GL_API_OPENGL3) {
+-if (shader_type == GL_VERTEX_SHADER) {
++  if (shader_type == GL_VERTEX_SHADER) {
++if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
++&& gl_major >= 3)) {
+   gchar *tmp, *tmp2;
+   GRegex *regex;
+ 
+@@ -1821,7 +1822,10 @@ _mangle_varying_attribute (const gchar * str, guint 
shader_type,
+ 
+   g_free (tmp);
+   return tmp2;
+-} else if (shader_type == GL_FRAGMENT_SHADER) {
++}
++  } else if (shader_type == GL_FRAGMENT_SHADER) {
++if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
++&& gl_major > 3)) {
+   gchar *tmp;
+   GRegex *regex;
+ 
+@@ -1837,28 +1841,48 @@ _mangle_varying_attribute (const gchar * str, guint 
shader_type,
+ }
+ 
+ static gchar *
+-_mangle_frag_color (const gchar * str)
++_mangle_frag_color_data (const gchar * str)
+ {
+   GRegex *regex;
+-  gchar *ret;
++  gchar *ret, *tmp;
+ 
+   regex = g_regex_new ("gl_FragColor", 0, 0, NULL);
+   ret = g_regex_replace_literal (regex, str, -1, 0, "fragColor", 0, NULL);
+   g_regex_unref (regex);
+ 
++  tmp = ret;
++  /* search and replace 'gl_FragData[NUM]' into fragColor_NUM */
++  regex = g_regex_new ("gl_FragData\\[(\\d+)\\]", 0, 0, NULL);
++  ret = g_regex_replace (regex, tmp, -1, 0, "fragColor_\\1", 0, NULL);
++  g_regex_unref (regex);
++  g_free (tmp);
++
+   return ret;
+ }
+ 
+ static void
+-_mangle_version_profile_from_gl_api (GstGLAPI gl_api, GstGLSLVersion * 
version,
+-GstGLSLProfile * profile)
++_mangle_version_profile_from_gl_api (GstGLAPI gl_api, gint gl_major,
++gint gl_minor, GstGLSLVersion * version, GstGLSLProfile * profile)
+ {
++  *version = GST_GLSL_VERSION_NONE;
++  *profile = GST_GLSL_PROFILE_NONE;
++
+   if (gl_api & GST_GL_API_OPENGL3) {
+-*version = GST_GLSL_VERSION_150;
+-*profile = GST_GLSL_PROFILE_NONE;
++if (gl_major > 3 || gl_minor >= 3) {
++  *version = GST_GLSL_VERSION_330;
++  *profile = GST_GLSL_PROFILE_CORE;
++} else {
++  *version = GST_GLSL_VERSION_150;
++  *profile = GST_GLSL_PROFILE_NONE;
++}
+   } else if (gl_api & GST_GL_API_GLES2) {
+-*version = GST_GLSL_VERSION_100;
+-*profile = GST_GLSL_PROFILE_ES;
++if (gl_major >= 3) {
++  *version = GST_GLSL_VERSION_300;
++  *profile = GST_GLSL_PROFILE_ES;
++} else if (gl_major >= 2) {
++  *version = GST_GLSL_VERSION_100;
++  *profile = GST_GLSL_PROF

[OE-core] [poky][PATCH 1/6] gstreamer1.0-plugins-bad: Enable gldeinterlace on OpenGL ES

2016-07-04 Thread Yuqing Zhu
Enable gldeinterlace on OpenGL ES to improve performance.

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...lplugin-enable-gldeinterlace-on-OpenGL-ES.patch | 634 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb|   1 +
 2 files changed, 635 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
new file mode 100755
index 000..175e822
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
@@ -0,0 +1,634 @@
+From 8a0e97f7e672301cc76e394855e8c7a3448b0249 Mon Sep 17 00:00:00 2001
+From: Haihua Hu <jared...@nxp.com>
+Date: Fri, 8 Apr 2016 16:47:15 +0800
+Subject: [PATCH 4/6] [glplugin] enable gldeinterlace on OpenGL ES
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+1.Porting the exist deinterlace shader and OpenGL callback
+  to be compatible with OpenGL ES.
+2.Add a our blur vertical shader to gldeinterlace.
+3.Add a property named “method” to let user choose which
+  deinterlace function to use. Default to choose blur vertical
+  method for better performance.
+
+Upstream-Status: Pending
+
+https://bugzilla.gnome.org/show_bug.cgi?id=764873
+
+Signed-off-by: Haihua Hu <jared...@nxp.com>
+---
+ ext/gl/Makefile.am|   4 +-
+ ext/gl/gstgldeinterlace.c | 344 +++---
+ ext/gl/gstgldeinterlace.h |   6 +-
+ ext/gl/gstopengl.c|  13 +-
+ 4 files changed, 275 insertions(+), 92 deletions(-)
+
+diff --git a/ext/gl/Makefile.am b/ext/gl/Makefile.am
+index 5d55f54..46419a7 100644
+--- a/ext/gl/Makefile.am
 b/ext/gl/Makefile.am
+@@ -40,6 +40,7 @@ libgstopengl_la_SOURCES = \
+   gstglfilterapp.c \
+   gstglviewconvert.c \
+   gstglstereosplit.c \
++  gstgldeinterlace.c \
+   gstglstereomix.c
+ 
+ noinst_HEADERS = \
+@@ -63,20 +64,19 @@ noinst_HEADERS = \
+   gstglfilterapp.h \
+   gstglstereosplit.h \
+   gstglstereomix.h \
++  gstgldeinterlace.h \
+   gstglviewconvert.h
+ 
+ # full opengl required
+ if USE_OPENGL
+ libgstopengl_la_SOURCES += \
+   gstglfilterglass.c \
+-  gstgldeinterlace.c \
+   gltestsrc.c \
+   gstgltestsrc.c \
+   gstglmosaic.c
+ 
+ noinst_HEADERS += \
+   gstglfilterglass.h \
+-  gstgldeinterlace.h \
+   gltestsrc.h \
+   gstgltestsrc.h \
+   gstglmosaic.h \
+diff --git a/ext/gl/gstgldeinterlace.c b/ext/gl/gstgldeinterlace.c
+index bd0eff0..c1250dc 100644
+--- a/ext/gl/gstgldeinterlace.c
 b/ext/gl/gstgldeinterlace.c
+@@ -43,7 +43,8 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+ 
+ enum
+ {
+-  PROP_0
++  PROP_0,
++  PROP_METHOD
+ };
+ 
+ #define DEBUG_INIT \
+@@ -57,17 +58,23 @@ static void gst_gl_deinterlace_set_property (GObject * 
object,
+ static void gst_gl_deinterlace_get_property (GObject * object,
+ guint prop_id, GValue * value, GParamSpec * pspec);
+ 
++static gboolean gst_gl_deinterlace_start (GstBaseTransform * trans);
+ static gboolean gst_gl_deinterlace_reset (GstBaseTransform * trans);
+-static gboolean gst_gl_deinterlace_init_shader (GstGLFilter * filter);
++static gboolean gst_gl_deinterlace_init_fbo (GstGLFilter * filter);
+ static gboolean gst_gl_deinterlace_filter (GstGLFilter * filter,
+ GstBuffer * inbuf, GstBuffer * outbuf);
+ static gboolean gst_gl_deinterlace_filter_texture (GstGLFilter * filter,
+ guint in_tex, guint out_tex);
+-static void gst_gl_deinterlace_callback (gint width, gint height,
++static void gst_gl_deinterlace_vfir_callback (gint width, gint height,
++guint texture, gpointer stuff);
++static void gst_gl_deinterlace_greedyh_callback (gint width, gint height,
+ guint texture, gpointer stuff);
+ 
+ /* *INDENT-OFF* */
+ static const gchar *greedyh_fragment_source =
++  "#ifdef GL_ES\n"
++  "precision mediump float;\n"
++  "#endif\n"
+   "uniform sampler2D tex;\n"
+   "uniform sampler2D tex_prev;\n"
+   "uniform float max_comb;\n"
+@@ -75,35 +82,35 @@ static const gchar *greedyh_fragment_source =
+   "uniform float motion_sense;\n"
+   "uniform float width;\n"
+   "uniform float height;\n"
++  "varying vec2 v_texcoord;\n"
+ 
+   "void main () {\n"
+-  "  vec2 texcoord = gl_TexCoord[0].xy;\n"
+-  "  if (int(mod(texcoord.y * height, 2.0)) == 0) {\n"
+-  "gl_FragColor = vec4(texture2D(tex_prev, texcoord).rgb, 1.0);\n"
++  "  if (int(mod(v_texcoord.y * height, 2.0)) == 0) {\n"
++  "gl_FragColor = vec4(texture2D(tex_prev, v_texcoord).rgb, 1

[OE-core] [poky][PATCH 4/6] gstreamer1.0-plugins-bad: Add glBindFragDataLocation in glshader

2016-07-04 Thread Yuqing Zhu
There are some cases where it's needed for
binding in/out variables in shaders.

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 .../0005-glshader-add-glBindFragDataLocation.patch | 77 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb|  1 +
 2 files changed, 78 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
new file mode 100755
index 000..57e9d1a
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
@@ -0,0 +1,77 @@
+From 38221080181229d520522a20bcb1663ca19f7aff Mon Sep 17 00:00:00 2001
+From: Matthew Waters <matt...@centricular.com>
+Date: Thu, 31 Mar 2016 19:25:32 +1100
+Subject: [PATCH 2/3] glshader: add glBindFragDataLocation
+
+There are some cases where it's needed for binding in/out variables in shaders.
+e.g. glsl 150 (gl 3.2) doesn't support the 'layout (location = ?)' specifiers 
in
+the shader source so we have to bind them ourselves.
+
+Upstream-Status: Backport [1.9.1]
+---
+ gst-libs/gst/gl/glprototypes/shaders.h | 10 ++
+ gst-libs/gst/gl/gstglshader.c  | 20 
+ gst-libs/gst/gl/gstglshader.h  |  1 +
+ 3 files changed, 31 insertions(+)
+
+diff --git a/gst-libs/gst/gl/glprototypes/shaders.h 
b/gst-libs/gst/gl/glprototypes/shaders.h
+index 817e479..6d828db 100644
+--- a/gst-libs/gst/gl/glprototypes/shaders.h
 b/gst-libs/gst/gl/glprototypes/shaders.h
+@@ -362,3 +362,13 @@ GST_GL_EXT_FUNCTION (void, UniformMatrix3x4fv,
+ GST_GL_EXT_FUNCTION (void, UniformMatrix4x3fv,
+  (GLint location, GLsizei count, GLboolean transpose, 
const GLfloat *value))
+ GST_GL_EXT_END ()
++
++GST_GL_EXT_BEGIN (bind_frag_data,
++  GST_GL_API_OPENGL | GST_GL_API_OPENGL3,
++  3, 0,
++  255, 255,
++  "\0",
++  "\0")
++GST_GL_EXT_FUNCTION (void, BindFragDataLocation,
++ (GLuint program, GLuint index, const GLchar * name))
++GST_GL_EXT_END ()
+diff --git a/gst-libs/gst/gl/gstglshader.c b/gst-libs/gst/gl/gstglshader.c
+index 9d96784..9f09236 100644
+--- a/gst-libs/gst/gl/gstglshader.c
 b/gst-libs/gst/gl/gstglshader.c
+@@ -1306,3 +1306,23 @@ gst_gl_shader_bind_attribute_location (GstGLShader * 
shader, GLuint index,
+ 
+   gl->BindAttribLocation (priv->program_handle, index, name);
+ }
++
++void
++gst_gl_shader_bind_frag_data_location (GstGLShader * shader,
++guint index, const gchar * name)
++{
++  GstGLShaderPrivate *priv;
++  GstGLFuncs *gl;
++
++  g_return_if_fail (shader != NULL);
++  if (!_ensure_program (shader))
++g_return_if_fail (shader->priv->program_handle);
++  priv = shader->priv;
++  gl = shader->context->gl_vtable;
++  g_return_if_fail (gl->BindFragDataLocation);
++
++  GST_TRACE_OBJECT (shader, "binding program %i frag data \'%s\' location %i",
++  (int) priv->program_handle, name, index);
++
++  gl->BindFragDataLocation (priv->program_handle, index, name);
++}
+diff --git a/gst-libs/gst/gl/gstglshader.h b/gst-libs/gst/gl/gstglshader.h
+index 21410e2..2200b89 100644
+--- a/gst-libs/gst/gl/gstglshader.h
 b/gst-libs/gst/gl/gstglshader.h
+@@ -104,6 +104,7 @@ void gst_gl_shader_set_uniform_matrix_4x3fv (GstGLShader 
*shader, const gchar *n
+ 
+ gint gst_gl_shader_get_attribute_location  (GstGLShader *shader, const gchar 
*name);
+ void gst_gl_shader_bind_attribute_location (GstGLShader * shader, guint 
index, const gchar * name);
++void gst_gl_shader_bind_frag_data_location (GstGLShader * shader, guint 
index, const gchar * name);
+ 
+ G_END_DECLS
+ 
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
index 7f6b918..825d100 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
@@ -15,6 +15,7 @@ SRC_URI = " \
 file://0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch \
 file://0003-glcolorconvert-implement-multiple-render-targets-for.patch \
 file://0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch \
+file://0005-glshader-add-glBindFragDataLocation.patch \
 "
 SRC_URI[md5sum] = "83abc2e70684e7b195f18ca2992ef6e8"
 SRC_URI[sha256sum] = 
"d7995317530c8773ec088f94d9320909d41da61996b801ebacce9a56af493f97"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.8.2

2016-07-04 Thread Yuqing Zhu
--Enable gldeinterlace on OpenGL ES

--Implement multiple render targets for GLES3

--Don't use the predefined variable name in glcolorconvert

--Add glBindFragDataLocation in glshader

--Use the newer texture() function in glcolorconvert

--Fix little rectangel appears at the center when use squeeze and tunnel effects


Yuqing Zhu (6):
  gstreamer1.0-plugins-bad: Enable gldeinterlace on OpenGL ES
  gstreamer1.0-plugins-bad: Implement multiple render targets for GLES3
  gstreamer1.0-plugins-bad: Don't use the predefined variable name in
glcolorconvert
  gstreamer1.0-plugins-bad: Add glBindFragDataLocation in glshader
  gstreamer1.0-plugins-bad: Use the newer texture() function in
glcolorconvert
  gstreamer1.0-plugins-bad: Fix little rectangel appears at the center
when use squeeze and tunnel effects

 ...lplugin-enable-gldeinterlace-on-OpenGL-ES.patch | 634 +
 ...ert-implement-multiple-render-targets-for.patch | 244 
 ...ert-don-t-use-the-predefined-variable-nam.patch |  32 ++
 .../0005-glshader-add-glBindFragDataLocation.patch |  77 +++
 ...ert-GLES3-deprecates-texture2D-and-it-doe.patch |  51 ++
 ...effects-fix-little-rectangel-appears-at-t.patch |  46 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb|   6 +
 7 files changed, 1090 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-enable-gldeinterlace-on-OpenGL-ES.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-glcolorconvert-implement-multiple-render-targets-for.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glshader-add-glBindFragDataLocation.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-gleffects-fix-little-rectangel-appears-at-t.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 6/6] gstreamer1.0-plugins-bad: Fix little rectangel appears at the center when use squeeze and tunnel effects

2016-07-04 Thread Yuqing Zhu
Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...effects-fix-little-rectangel-appears-at-t.patch | 46 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb|  1 +
 2 files changed, 47 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-gleffects-fix-little-rectangel-appears-at-t.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-gleffects-fix-little-rectangel-appears-at-t.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-gleffects-fix-little-rectangel-appears-at-t.patch
new file mode 100755
index 000..90bfba9
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-gleffects-fix-little-rectangel-appears-at-t.patch
@@ -0,0 +1,46 @@
+From 43549773608b4f58dc664b7115a1ef0dcb32f251 Mon Sep 17 00:00:00 2001
+From: Haihua Hu <jared...@nxp.com>
+Date: Tue, 14 Jun 2016 13:48:09 +0800
+Subject: [PATCH 1/2] [glplugin]gleffects: fix little rectangel appears at the
+ center when use squeeze and tunnel effects
+
+These two shader will calculate the verctor length and use it as denominator.
+But length could be zero which will cause undefine behaviour. Add protection 
for
+this condition
+
+Upstream-Status: Backport [1.8.3]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=767635
+
+Signed-off-by: Haihua Hu <jared...@nxp.com>
+---
+ ext/gl/effects/gstgleffectssources.c | 6 --
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/ext/gl/effects/gstgleffectssources.c 
b/ext/gl/effects/gstgleffectssources.c
+index 6bdc155..3e87b8b 100644
+--- a/ext/gl/effects/gstgleffectssources.c
 b/ext/gl/effects/gstgleffectssources.c
+@@ -100,7 +100,8 @@ const gchar *squeeze_fragment_source_gles2 =
+   "void main () {"
+   "  vec2 texturecoord = v_texcoord.xy;"
+   "  vec2 normcoord = texturecoord - 0.5;"
+-  "  float r = length (normcoord);"
++  /* Add a very small value to length otherwise it could be 0 */
++  "  float r = length (normcoord)+0.01;"
+   "  r = pow(r, 0.40)*1.3;"
+   "  normcoord = normcoord / r;"
+   "  texturecoord = (normcoord + 0.5);"
+@@ -136,7 +137,8 @@ const gchar *tunnel_fragment_source_gles2 =
+* rect textures */
+   "  normcoord = (texturecoord - 0.5);"
+   "  float r = length(normcoord);"
+-  "  normcoord *= clamp (r, 0.0, 0.275) / r;"
++  "  if (r > 0.0)"
++  "normcoord *= clamp (r, 0.0, 0.275) / r;"
+   "  texturecoord = normcoord + 0.5;"
+   "  gl_FragColor = texture2D (tex, texturecoord);"
+   "}";
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
index 49b3677..d0912b2 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
@@ -17,6 +17,7 @@ SRC_URI = " \
 file://0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch \
 file://0005-glshader-add-glBindFragDataLocation.patch \
 file://0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch \
+file://0007-glplugin-gleffects-fix-little-rectangel-appears-at-t.patch \
 "
 SRC_URI[md5sum] = "83abc2e70684e7b195f18ca2992ef6e8"
 SRC_URI[sha256sum] = 
"d7995317530c8773ec088f94d9320909d41da61996b801ebacce9a56af493f97"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 5/6] gstreamer1.0-plugins-bad: Use the newer texture() function in glcolorconvert

2016-07-04 Thread Yuqing Zhu
GLES3 deprecates texture2D() and it does not work at all
in newer versions than 3.3. The new function can fix it.

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...ert-GLES3-deprecates-texture2D-and-it-doe.patch | 51 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb|  1 +
 2 files changed, 52 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch
new file mode 100755
index 000..79ef4c8
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch
@@ -0,0 +1,51 @@
+From 764fd69f8482eca9f925cefe72ebae090ae59d43 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebast...@centricular.com>
+Date: Tue, 19 Apr 2016 19:27:33 +0300
+Subject: [PATCH 3/3] glcolorconvert: GLES3 deprecates texture2D() and it does
+ not work at all in newer versions than 3.3
+
+Use the newer texture() function instead. This fixes glimagesink and other
+things on various Android devices.
+
+Upstream-Status: Backport [1.9.1]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=765266
+---
+ gst-libs/gst/gl/gstglcolorconvert.c | 7 ---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/gst-libs/gst/gl/gstglcolorconvert.c 
b/gst-libs/gst/gl/gstglcolorconvert.c
+index c23624f..f472d5d 100644
+--- a/gst-libs/gst/gl/gstglcolorconvert.c
 b/gst-libs/gst/gl/gstglcolorconvert.c
+@@ -1716,7 +1716,7 @@ _unbind_buffer (GstGLColorConvert * convert)
+ 
+ static gchar *
+ _mangle_texture_access (const gchar * str, GstGLTextureTarget from,
+-GstGLTextureTarget to, GstGLAPI gl_api)
++GstGLTextureTarget to, GstGLAPI gl_api, guint gl_major, guint gl_minor)
+ {
+   const gchar *from_str = NULL, *to_str = NULL;
+   gchar *ret, *tmp;
+@@ -1730,7 +1730,8 @@ _mangle_texture_access (const gchar * str, 
GstGLTextureTarget from,
+   if (from == GST_GL_TEXTURE_TARGET_EXTERNAL_OES)
+ from_str = "texture2D";
+ 
+-  if (gl_api & GST_GL_API_OPENGL3) {
++  if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
++  && gl_major >= 3)) {
+ to_str = "texture";
+   } else {
+ if (to == GST_GL_TEXTURE_TARGET_2D)
+@@ -1898,7 +1899,7 @@ _mangle_shader (const gchar * str, guint shader_type, 
GstGLTextureTarget from,
+ 
+   _mangle_version_profile_from_gl_api (gl_api, gl_major, gl_minor, version,
+   profile);
+-  tmp = _mangle_texture_access (str, from, to, gl_api);
++  tmp = _mangle_texture_access (str, from, to, gl_api, gl_major, gl_minor);
+   tmp2 = _mangle_sampler_type (tmp, from, to);
+   g_free (tmp);
+   tmp =
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
index 825d100..49b3677 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.8.2.bb
@@ -16,6 +16,7 @@ SRC_URI = " \
 file://0003-glcolorconvert-implement-multiple-render-targets-for.patch \
 file://0004-glcolorconvert-don-t-use-the-predefined-variable-nam.patch \
 file://0005-glshader-add-glBindFragDataLocation.patch \
+file://0006-glcolorconvert-GLES3-deprecates-texture2D-and-it-doe.patch \
 "
 SRC_URI[md5sum] = "83abc2e70684e7b195f18ca2992ef6e8"
 SRC_URI[sha256sum] = 
"d7995317530c8773ec088f94d9320909d41da61996b801ebacce9a56af493f97"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH] alsa-lib: Fix incorrect appl pointer when mmap_commit() returns error.

2016-05-04 Thread Yuqing Zhu
The appl pointer needs to be updated only when snd_pcm_mmap_commit() is
successfully returned. Or it shouldn't be updated.
This is to fix the avail_update()'s result is incorrect when returns error.

Signed-off-by: Yuqing Zhu <carol@nxp.com>
---
 ...fix-appl-pointer-not-correct-when-mmap_co.patch | 137 +
 meta/recipes-multimedia/alsa/alsa-lib_1.1.0.bb |   1 +
 2 files changed, 138 insertions(+)
 create mode 100755 
meta/recipes-multimedia/alsa/alsa-lib/0001-pcm_plugin-fix-appl-pointer-not-correct-when-mmap_co.patch

diff --git 
a/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm_plugin-fix-appl-pointer-not-correct-when-mmap_co.patch
 
b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm_plugin-fix-appl-pointer-not-correct-when-mmap_co.patch
new file mode 100755
index 000..9fd69f3
--- /dev/null
+++ 
b/meta/recipes-multimedia/alsa/alsa-lib/0001-pcm_plugin-fix-appl-pointer-not-correct-when-mmap_co.patch
@@ -0,0 +1,137 @@
+From 7c424edd116e76eee6218a1e9a6ff6c4daaf2a4d Mon Sep 17 00:00:00 2001
+From: Shengjiu Wang <shengjiu.w...@freescale.com>
+Date: Wed, 6 Apr 2016 19:02:12 +0800
+Subject: [PATCH] pcm_plugin: fix appl pointer not correct when mmap_commit()
+ return error
+
+When snd_pcm_mmap_commit() return error, the appl pointer is also updated.
+which cause the avail_update()'s result wrong.
+This patch move the snd_pcm_mmap_appl_forward() to the place when
+snd_pcm_mmap_commit() is successfully returned.
+
+Upstream-Status: Submitted [https://patchwork.kernel.org/patch/8760881/]
+
+Signed-off-by: Shengjiu Wang <shengjiu.w...@freescale.com>
+Signed-off-by: Takashi Iwai <ti...@suse.de>
+---
+ src/pcm/pcm_plugin.c | 48 
+ 1 file changed, 32 insertions(+), 16 deletions(-)
+
+diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
+index d007e8c..940491d 100644
+--- a/src/pcm/pcm_plugin.c
 b/src/pcm/pcm_plugin.c
+@@ -279,18 +279,22 @@ static snd_pcm_sframes_t 
snd_pcm_plugin_write_areas(snd_pcm_t *pcm,
+   return -EPIPE;
+   }
+   snd_atomic_write_begin(>watom);
+-  snd_pcm_mmap_appl_forward(pcm, frames);
+   result = snd_pcm_mmap_commit(slave, slave_offset, slave_frames);
+   if (result > 0 && (snd_pcm_uframes_t)result != slave_frames) {
+   snd_pcm_sframes_t res;
+   res = plugin->undo_write(pcm, slave_areas, slave_offset 
+ result, slave_frames, slave_frames - result);
+-  if (res < 0)
++  if (res < 0) {
++  snd_atomic_write_end(>watom);
+   return xfer > 0 ? (snd_pcm_sframes_t)xfer : res;
++  }
+   frames -= res;
+   }
+-  snd_atomic_write_end(>watom);
+-  if (result <= 0)
++  if (result <= 0) {
++  snd_atomic_write_end(>watom);
+   return xfer > 0 ? (snd_pcm_sframes_t)xfer : result;
++  }
++  snd_pcm_mmap_appl_forward(pcm, frames);
++  snd_atomic_write_end(>watom);
+   offset += frames;
+   xfer += frames;
+   size -= frames;
+@@ -325,19 +329,23 @@ static snd_pcm_sframes_t 
snd_pcm_plugin_read_areas(snd_pcm_t *pcm,
+   return -EPIPE;
+   }
+   snd_atomic_write_begin(>watom);
+-  snd_pcm_mmap_appl_forward(pcm, frames);
+   result = snd_pcm_mmap_commit(slave, slave_offset, slave_frames);
+   if (result > 0 && (snd_pcm_uframes_t)result != slave_frames) {
+   snd_pcm_sframes_t res;
+   
+   res = plugin->undo_read(slave, areas, offset, frames, 
slave_frames - result);
+-  if (res < 0)
++  if (res < 0) {
++  snd_atomic_write_end(>watom);
+   return xfer > 0 ? (snd_pcm_sframes_t)xfer : res;
++  }
+   frames -= res;
+   }
+-  snd_atomic_write_end(>watom);
+-  if (result <= 0)
++  if (result <= 0) {
++  snd_atomic_write_end(>watom);
+   return xfer > 0 ? (snd_pcm_sframes_t)xfer : result;
++  }
++  snd_pcm_mmap_appl_forward(pcm, frames);
++  snd_atomic_write_end(>watom);
+   offset += frames;
+   xfer += frames;
+   size -= frames;
+@@ -423,19 +431,23 @@ snd_pcm_plugin_mmap_commit(snd_pcm_t *pcm,
+   frames = plugin->write(pcm, areas, appl_offset, frames,
+  slave_areas, slave_offset, 
_frames);
+   snd_atomic_write_

Re: [OE-core] [poky][PATCH 0/2] Add patches for gstreamer 1.6

2016-01-31 Thread Yuqing Zhu
Hi Alex,

 Sorry for causing this misunderstanding.
 Actually I have replied the maintainer's email. And for some rejected 
patches, I said I would keep them in our internal layer. 
 For these two following patches, Richard said the Backports might be ok, 
so I was waiting for these two patches' feedback.
 But I might regenerate a second version patches only with these two 
patches at that time. That was my inconsideration.
 
  Really sorry for this misunderstanding! Please help to review them again, 
thanks!



B.R.

Yuqing Zhu

-Original Message-
From: Alexander Kanavin [mailto:alexander.kana...@linux.intel.com] 
Sent: Thursday, January 28, 2016 8:55 PM
To: openembedded-core@lists.openembedded.org
Cc: b54...@freescale.com
Subject: Re: [OE-core] [poky][PATCH 0/2] Add patches for gstreamer 1.6

On 01/28/2016 11:02 AM, Yuqing Zhu wrote:
> As gstreamer has been upgraded from 1.6.2 to 1.6.3, and my former 
> patches haven't been accepted yet, need to recreate the patches based on new 
> recipe.

The patches have not been accepted because you didn't answer the questions that 
oe-core maintainers had asked you.


Alex

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 1/2] gstreamer1.0-plugins-bad: Fix memory leak of navigation thread

2016-01-28 Thread Yuqing Zhu
When exit navigation thread, call g_thread_join() to release
the resource hold by it.

Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...window-fix-memory-leak-of-navigation-thre.patch | 35 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb|  1 +
 2 files changed, 36 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
new file mode 100755
index 000..3491a15
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
@@ -0,0 +1,35 @@
+From 95cda7fbcf1a81289d9315c801c8e2b3d896f4cb Mon Sep 17 00:00:00 2001
+From: Haihua Hu <b55...@freescale.com>
+Date: Mon, 30 Nov 2015 09:36:09 +0800
+Subject: [PATCH 2/5] [glplugin] glwindow: fix memory leak of navigation
+ thread
+
+When exit navigation thread, call g_thread_join() to release
+the resource hold by it.
+
+Upstream-Status: Backport [1.7.1]
+
+bugzilla URL: https://bugzilla.gnome.org/show_bug.cgi?id=758820
+
+Signed-off-by: Haihua Hu <b55...@freescale.com>
+---
+ gst-libs/gst/gl/gstglwindow.c |3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c
+index 44b74ca..42ef296 100644
+--- a/gst-libs/gst/gl/gstglwindow.c
 b/gst-libs/gst/gl/gstglwindow.c
+@@ -343,6 +343,9 @@ gst_gl_window_finalize (GObject * object)
+ while (window->nav_alive) {
+   g_cond_wait (>nav_destroy_cond, >nav_lock);
+ }
++/* release resource hold by navigation thread */
++g_thread_join(window->priv->navigation_thread);
++window->priv->navigation_thread = NULL;
+ g_mutex_unlock (>nav_lock);
+   }
+ 
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb
index 4b9143f..c51a637 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb
@@ -9,6 +9,7 @@ SRC_URI = " \
 
http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz
 \
 file://configure-allow-to-disable-libssh2.patch \
 file://0001-glimagesink-Downrank-to-marginal.patch \
+file://0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch \
 "
 
 SRC_URI[md5sum] = "4857adcafe41e4b9b8805cf88303bd55"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 2/2] gstreamer1.0-plugins-base: Add video crop supporting when convert frame

2016-01-28 Thread Yuqing Zhu
Getting thumbnail will use convertframe to convert video frame to
desired video format and size. But haven't process crop meta on
the video buffer. Need to add video crop support.

Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...ame-Support-video-crop-when-convert-frame.patch | 143 +
 .../gstreamer/gstreamer1.0-plugins-base_1.6.3.bb   |   1 +
 2 files changed, 144 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch
new file mode 100755
index 000..096a6f4
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch
@@ -0,0 +1,143 @@
+From 5be6ed00aad028d9cbb4e0c63af0be69d335c71e Mon Sep 17 00:00:00 2001
+From: Song Bing <b06...@freescale.com>
+Date: Fri, 11 Dec 2015 21:42:00 +0800
+Subject: [PATCH] convertframe: Support video crop when convert frame
+
+Get thumbnail will user convertframe to convert video frame to
+desired video format and size. But haven't process crop meta on
+the video buffer. Add support video crop.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=759329
+
+Upstream-Status: Backport [1.7.1]
+
+---
+ gst-libs/gst/video/convertframe.c | 65 +--
+ 1 file changed, 56 insertions(+), 9 deletions(-)
+
+diff --git a/gst-libs/gst/video/convertframe.c 
b/gst-libs/gst/video/convertframe.c
+index aa9c3d3..942a51e 100644
+--- a/gst-libs/gst/video/convertframe.c
 b/gst-libs/gst/video/convertframe.c
+@@ -110,12 +110,23 @@ fail:
+ static GstElement *
+ build_convert_frame_pipeline (GstElement ** src_element,
+ GstElement ** sink_element, const GstCaps * from_caps,
+-const GstCaps * to_caps, GError ** err)
++GstVideoCropMeta * cmeta, const GstCaps * to_caps, GError ** err)
+ {
+-  GstElement *src = NULL, *csp = NULL, *vscale = NULL;
+-  GstElement *sink = NULL, *encoder = NULL, *pipeline;
++  GstElement *vcrop = NULL, *csp = NULL, *csp2 = NULL, *vscale = NULL;
++  GstElement *src = NULL, *sink = NULL, *encoder = NULL, *pipeline;
++  GstVideoInfo info;
+   GError *error = NULL;
+ 
++  if (cmeta) {
++if (!create_element ("videocrop", , )) {
++  g_warning
++  ("build_convert_frame_pipeline: Buffer has crop metadata but 
videocrop element is not found. Cropping will be disabled");
++} else {
++  if (!create_element ("videoconvert", , ))
++goto no_elements;
++}
++  }
++
+   /* videoscale is here to correct for the pixel-aspect-ratio for us */
+   GST_DEBUG ("creating elements");
+   if (!create_element ("appsrc", , ) ||
+@@ -133,15 +144,42 @@ build_convert_frame_pipeline (GstElement ** src_element,
+ 
+   GST_DEBUG ("adding elements");
+   gst_bin_add_many (GST_BIN (pipeline), src, csp, vscale, sink, NULL);
++  if (vcrop)
++gst_bin_add_many (GST_BIN (pipeline), vcrop, csp2, NULL);
+ 
+   /* set caps */
+   g_object_set (src, "caps", from_caps, NULL);
++  if (vcrop) {
++gst_video_info_from_caps (, from_caps);
++g_object_set (vcrop, "left", cmeta->x, NULL);
++g_object_set (vcrop, "top", cmeta->y, NULL);
++g_object_set (vcrop, "right", GST_VIDEO_INFO_WIDTH () - cmeta->width,
++NULL);
++g_object_set (vcrop, "bottom",
++GST_VIDEO_INFO_HEIGHT () - cmeta->height, NULL);
++GST_DEBUG ("crop meta [x,y,width,height]: %d %d %d %d", cmeta->x, 
cmeta->y,
++cmeta->width, cmeta->height);
++  }
+   g_object_set (sink, "caps", to_caps, NULL);
+ 
+   /* FIXME: linking is still way too expensive, profile this properly */
+-  GST_DEBUG ("linking src->csp");
+-  if (!gst_element_link_pads (src, "src", csp, "sink"))
+-goto link_failed;
++  if (vcrop) {
++GST_DEBUG ("linking src->csp2");
++if (!gst_element_link_pads (src, "src", csp2, "sink"))
++  goto link_failed;
++
++GST_DEBUG ("linking csp2->vcrop");
++if (!gst_element_link_pads (csp2, "src", vcrop, "sink"))
++  goto link_failed;
++
++GST_DEBUG ("linking vcrop->csp");
++if (!gst_element_link_pads (vcrop, "src", csp, "sink"))
++  goto link_failed;
++  } else {
++GST_DEBUG ("linking src->csp");
++if (!gst_element_link_pads (src, "src", csp, "sink"))
++  goto link_failed;
++  }
+ 
+   GST_DEBUG ("linking csp->vscale");
+   if (!gst_element_link_pads_full (csp, "src",

[OE-core] [poky][PATCH 0/2] Add patches for gstreamer 1.6

2016-01-28 Thread Yuqing Zhu
As gstreamer has been upgraded from 1.6.2 to 1.6.3, and my former patches 
haven't 
been accepted yet, need to recreate the patches based on new recipe.

---gstreamer1.0-plugins-base
   Add video crop supporting when convert frame.

---gstreamer1.0-plugins-bad
   Fix memory leak of navigation thread.


Yuqing Zhu (2):
  gstreamer1.0-plugins-bad: Fix memory leak of navigation thread
  gstreamer1.0-plugins-base: Add video crop supporting when convert
frame

 ...window-fix-memory-leak-of-navigation-thre.patch |  35 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb|   1 +
 ...ame-Support-video-crop-when-convert-frame.patch | 143 +
 .../gstreamer/gstreamer1.0-plugins-base_1.6.3.bb   |   1 +
 4 files changed, 180 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v2 0/7] Add patches for gstreamer 1.6

2016-01-20 Thread Yuqing Zhu
---gstreamer1.0
   Correct the setting for FLAG_DISCONT when push to adapter,
   in case audio decoder subclass can not get enough data.

---gstreamer1.0-plugins-base
   Send taglist if no valid frame is decoded util EOS.
   Add video crop supporting when convert frame.

---gstreamer1.0-plugins-bad
   Need to set right pid if pid is 0 when create streams.
   Add detecting picture coding type when drain.
   Fix memory leak of navigation thread.

Yuqing Zhu (7):
  gstreamer1.0: [baseparse] unset FLAG_DISCONT when push to adapter
  gstreamer1.0-plugins-base: Fix taglist not being sent to down stream
if all the frame corrupted
  gstreamer1.0-plugins-base: Add video crop supporting when convert
frame
  gstreamer1.0-plugins-bad: Need to set right pid if pid is 0 when
create streams
  gstreamer1.0-plugins-bad: Add detecting picture coding type when drain
  gstreamer1.0-plugins-bad: Add detecting picture coding type when drain
  gstreamer1.0-plugins-bad: Fix memory leak of navigation thread

 ...pegtsmux-Need-get-pid-when-create-streams.patch |  45 +++
 ...arse-Need-detect-picture-coding-type-when.patch |  47 +++
 ...rse-Need-detect-picture-coding-type-when-.patch |  47 +++
 ...window-fix-memory-leak-of-navigation-thre.patch |  35 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb|   7 +-
 ...-send-to-down-stream-if-all-the-frame-cor.patch |  57 
 ...ame-Support-video-crop-when-convert-frame.patch | 143 +
 .../gstreamer/gstreamer1.0-plugins-base_1.6.2.bb   |   2 +
 ...e-unset-FLAG_DISCONT-when-push-to-adapter.patch |  33 +
 .../gstreamer/gstreamer1.0_1.6.2.bb|   1 +
 10 files changed, 416 insertions(+), 1 deletion(-)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-mpegtsmux-Need-get-pid-when-create-streams.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-mpeg4videoparse-Need-detect-picture-coding-type-when.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-mpegvideoparse-Need-detect-picture-coding-type-when-.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0006-convertframe-Support-video-crop-when-convert-frame.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-baseparse-unset-FLAG_DISCONT-when-push-to-adapter.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v2 4/7] gstreamer1.0-plugins-bad: Need to set right pid if pid is 0 when create streams

2016-01-20 Thread Yuqing Zhu
When camerabin use mpegtsmux as muxer to start video recording and then
stop video recording and then start video recording again, mpegtsmux will
get wrong pid.
Need to get pid when create streams.

Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...pegtsmux-Need-get-pid-when-create-streams.patch | 45 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb|  4 +-
 2 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-mpegtsmux-Need-get-pid-when-create-streams.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-mpegtsmux-Need-get-pid-when-create-streams.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-mpegtsmux-Need-get-pid-when-create-streams.patch
new file mode 100755
index 000..21819a7
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-mpegtsmux-Need-get-pid-when-create-streams.patch
@@ -0,0 +1,45 @@
+From 3e0bc017ca9b4e093484ee6b3b73917918364e92 Mon Sep 17 00:00:00 2001
+From: Song Bing <b06...@freescale.com>
+Date: Wed, 22 Apr 2015 18:06:35 +0800
+Subject: [PATCH 02/10] mpegtsmux: Need get pid when create streams.
+
+when camerabin use mpegtsmux as muxer, start video recording and then
+stop video recording and then start video recording, mpegtsmux get wrong
+pid.
+
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=748288]
+
+---
+ gst/mpegtsmux/mpegtsmux.c | 15 +++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c
+index c3a0dbb..5a6d9e1 100644
+--- a/gst/mpegtsmux/mpegtsmux.c
 b/gst/mpegtsmux/mpegtsmux.c
+@@ -761,6 +761,21 @@ mpegtsmux_create_streams (MpegTsMux * mux)
+   } else {
+ ts_data->prog_id = DEFAULT_PROG_ID;
+   }
++
++  if (!ts_data->pid) {
++gint pid = -1;
++
++name = GST_PAD_NAME (c_data->pad);
++if (name != NULL && sscanf (name, "sink_%d", ) == 1) {
++  if (tsmux_find_stream (mux->tsmux, pid)) {
++GST_WARNING_OBJECT (mux, "Duplicate PID");
++  }
++} else {
++  pid = tsmux_get_new_pid (mux->tsmux);
++}
++
++ts_data->pid = pid;
++  }
+ }
+ 
+ ts_data->prog =
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
index 284e1f2..3f30f86 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
 file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \
 
file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50"
 
-SRC_URI += "file://0001-glimagesink-Downrank-to-marginal.patch"
+SRC_URI += "file://0001-glimagesink-Downrank-to-marginal.patch \
+file://0002-mpegtsmux-Need-get-pid-when-create-streams.patch \
+"
 
 SRC_URI[md5sum] = "7c73bec1d389f0e184eb9e9f883d"
 SRC_URI[sha256sum] = 
"650855e39ff56a8bb6cb0c192109c5926ce12f536d06e19ebf829de71ef396fe"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v2 3/7] gstreamer1.0-plugins-base: Add video crop supporting when convert frame

2016-01-20 Thread Yuqing Zhu
Getting thumbnail will use convertframe to convert video frame to
desired video format and size. But haven't process crop meta on
the video buffer. Need to add video crop support.

Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...ame-Support-video-crop-when-convert-frame.patch | 143 +
 .../gstreamer/gstreamer1.0-plugins-base_1.6.2.bb   |   1 +
 2 files changed, 144 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0006-convertframe-Support-video-crop-when-convert-frame.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0006-convertframe-Support-video-crop-when-convert-frame.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0006-convertframe-Support-video-crop-when-convert-frame.patch
new file mode 100755
index 000..096a6f4
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0006-convertframe-Support-video-crop-when-convert-frame.patch
@@ -0,0 +1,143 @@
+From 5be6ed00aad028d9cbb4e0c63af0be69d335c71e Mon Sep 17 00:00:00 2001
+From: Song Bing <b06...@freescale.com>
+Date: Fri, 11 Dec 2015 21:42:00 +0800
+Subject: [PATCH] convertframe: Support video crop when convert frame
+
+Get thumbnail will user convertframe to convert video frame to
+desired video format and size. But haven't process crop meta on
+the video buffer. Add support video crop.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=759329
+
+Upstream-Status: Backport [1.7.1]
+
+---
+ gst-libs/gst/video/convertframe.c | 65 +--
+ 1 file changed, 56 insertions(+), 9 deletions(-)
+
+diff --git a/gst-libs/gst/video/convertframe.c 
b/gst-libs/gst/video/convertframe.c
+index aa9c3d3..942a51e 100644
+--- a/gst-libs/gst/video/convertframe.c
 b/gst-libs/gst/video/convertframe.c
+@@ -110,12 +110,23 @@ fail:
+ static GstElement *
+ build_convert_frame_pipeline (GstElement ** src_element,
+ GstElement ** sink_element, const GstCaps * from_caps,
+-const GstCaps * to_caps, GError ** err)
++GstVideoCropMeta * cmeta, const GstCaps * to_caps, GError ** err)
+ {
+-  GstElement *src = NULL, *csp = NULL, *vscale = NULL;
+-  GstElement *sink = NULL, *encoder = NULL, *pipeline;
++  GstElement *vcrop = NULL, *csp = NULL, *csp2 = NULL, *vscale = NULL;
++  GstElement *src = NULL, *sink = NULL, *encoder = NULL, *pipeline;
++  GstVideoInfo info;
+   GError *error = NULL;
+ 
++  if (cmeta) {
++if (!create_element ("videocrop", , )) {
++  g_warning
++  ("build_convert_frame_pipeline: Buffer has crop metadata but 
videocrop element is not found. Cropping will be disabled");
++} else {
++  if (!create_element ("videoconvert", , ))
++goto no_elements;
++}
++  }
++
+   /* videoscale is here to correct for the pixel-aspect-ratio for us */
+   GST_DEBUG ("creating elements");
+   if (!create_element ("appsrc", , ) ||
+@@ -133,15 +144,42 @@ build_convert_frame_pipeline (GstElement ** src_element,
+ 
+   GST_DEBUG ("adding elements");
+   gst_bin_add_many (GST_BIN (pipeline), src, csp, vscale, sink, NULL);
++  if (vcrop)
++gst_bin_add_many (GST_BIN (pipeline), vcrop, csp2, NULL);
+ 
+   /* set caps */
+   g_object_set (src, "caps", from_caps, NULL);
++  if (vcrop) {
++gst_video_info_from_caps (, from_caps);
++g_object_set (vcrop, "left", cmeta->x, NULL);
++g_object_set (vcrop, "top", cmeta->y, NULL);
++g_object_set (vcrop, "right", GST_VIDEO_INFO_WIDTH () - cmeta->width,
++NULL);
++g_object_set (vcrop, "bottom",
++GST_VIDEO_INFO_HEIGHT () - cmeta->height, NULL);
++GST_DEBUG ("crop meta [x,y,width,height]: %d %d %d %d", cmeta->x, 
cmeta->y,
++cmeta->width, cmeta->height);
++  }
+   g_object_set (sink, "caps", to_caps, NULL);
+ 
+   /* FIXME: linking is still way too expensive, profile this properly */
+-  GST_DEBUG ("linking src->csp");
+-  if (!gst_element_link_pads (src, "src", csp, "sink"))
+-goto link_failed;
++  if (vcrop) {
++GST_DEBUG ("linking src->csp2");
++if (!gst_element_link_pads (src, "src", csp2, "sink"))
++  goto link_failed;
++
++GST_DEBUG ("linking csp2->vcrop");
++if (!gst_element_link_pads (csp2, "src", vcrop, "sink"))
++  goto link_failed;
++
++GST_DEBUG ("linking vcrop->csp");
++if (!gst_element_link_pads (vcrop, "src", csp, "sink"))
++  goto link_failed;
++  } else {
++GST_DEBUG ("linking src->csp");
++if (!gst_element_link_pads (src, "src", csp, "sink"))
++  goto link_failed;
++  }
+ 
+   GST_DEBUG ("linking csp->vscale");
+   if (!gst_element_link_pads_full (csp, "src",

[OE-core] [poky][PATCH v2 7/7] gstreamer1.0-plugins-bad: Fix memory leak of navigation thread

2016-01-20 Thread Yuqing Zhu
When exit navigation thread, call g_thread_join() to release
the resource hold by it.

Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...window-fix-memory-leak-of-navigation-thre.patch | 35 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb|  1 +
 2 files changed, 36 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
new file mode 100755
index 000..3491a15
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
@@ -0,0 +1,35 @@
+From 95cda7fbcf1a81289d9315c801c8e2b3d896f4cb Mon Sep 17 00:00:00 2001
+From: Haihua Hu <b55...@freescale.com>
+Date: Mon, 30 Nov 2015 09:36:09 +0800
+Subject: [PATCH 2/5] [glplugin] glwindow: fix memory leak of navigation
+ thread
+
+When exit navigation thread, call g_thread_join() to release
+the resource hold by it.
+
+Upstream-Status: Backport [1.7.1]
+
+bugzilla URL: https://bugzilla.gnome.org/show_bug.cgi?id=758820
+
+Signed-off-by: Haihua Hu <b55...@freescale.com>
+---
+ gst-libs/gst/gl/gstglwindow.c |3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c
+index 44b74ca..42ef296 100644
+--- a/gst-libs/gst/gl/gstglwindow.c
 b/gst-libs/gst/gl/gstglwindow.c
+@@ -343,6 +343,9 @@ gst_gl_window_finalize (GObject * object)
+ while (window->nav_alive) {
+   g_cond_wait (>nav_destroy_cond, >nav_lock);
+ }
++/* release resource hold by navigation thread */
++g_thread_join(window->priv->navigation_thread);
++window->priv->navigation_thread = NULL;
+ g_mutex_unlock (>nav_lock);
+   }
+ 
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
index 4628018..0e67fe5 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
@@ -9,6 +9,7 @@ SRC_URI += "file://0001-glimagesink-Downrank-to-marginal.patch \
 file://0002-mpegtsmux-Need-get-pid-when-create-streams.patch \
 
file://0003-mpeg4videoparse-Need-detect-picture-coding-type-when.patch \
 
file://0004-mpegvideoparse-Need-detect-picture-coding-type-when-.patch \
+
file://0005-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch \
 "
 
 SRC_URI[md5sum] = "7c73bec1d389f0e184eb9e9f883d"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v2 2/7] gstreamer1.0-plugins-base: Fix taglist not being sent to down stream if all the frame corrupted

2016-01-20 Thread Yuqing Zhu
Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...-send-to-down-stream-if-all-the-frame-cor.patch | 57 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.6.2.bb   |  1 +
 2 files changed, 58 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch
new file mode 100755
index 000..0f4657b
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch
@@ -0,0 +1,57 @@
+From 2f2fc40a88061995053c60d700efe20cb17358c9 Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.w...@freescale.com>
+Date: Wed, 21 Oct 2015 16:35:43 +0800
+Subject: [PATCH 8/9] taglist not send to down stream if all the frame
+ corrupted
+
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=737246]
+
+Signed-off-by: Jian Li <lj.qfy...@gmail.com>
+---
+ gst-libs/gst/audio/gstaudiodecoder.c | 9 +
+ gst-libs/gst/video/gstvideodecoder.c | 8 
+ 2 files changed, 17 insertions(+)
+
+diff --git a/gst-libs/gst/audio/gstaudiodecoder.c 
b/gst-libs/gst/audio/gstaudiodecoder.c
+index f4c663a..b68f9eb 100644
+--- a/gst-libs/gst/audio/gstaudiodecoder.c
 b/gst-libs/gst/audio/gstaudiodecoder.c
+@@ -2309,6 +2309,15 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * 
dec, GstEvent * event)
+ ("no valid frames found"));
+   }
+ 
++  /* send taglist if no valid frame is decoded util EOS */
++  if (dec->priv->taglist && dec->priv->taglist_changed) {
++GST_DEBUG_OBJECT (dec, "codec tag %" GST_PTR_FORMAT, 
dec->priv->taglist);
++if (!gst_tag_list_is_empty (dec->priv->taglist))
++  gst_audio_decoder_push_event (dec,
++  gst_event_new_tag (gst_tag_list_ref (dec->priv->taglist)));
++dec->priv->taglist_changed = FALSE;
++  }
++
+   /* Forward EOS because no buffer or serialized event will come after
+* EOS and nothing could trigger another _finish_frame() call. */
+   if (dec->priv->pending_events)
+diff --git a/gst-libs/gst/video/gstvideodecoder.c 
b/gst-libs/gst/video/gstvideodecoder.c
+index f8a5869..514c06f 100644
+--- a/gst-libs/gst/video/gstvideodecoder.c
 b/gst-libs/gst/video/gstvideodecoder.c
+@@ -1265,6 +1265,14 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * 
decoder,
+* parent class' ::sink_event() until a later time.
+*/
+   forward_immediate = TRUE;
++
++  /* send taglist if no valid frame is decoded util EOS */
++  if (decoder->priv->tags && decoder->priv->tags_changed) {
++gst_video_decoder_push_event (decoder,
++gst_event_new_tag (gst_tag_list_ref (decoder->priv->tags)));
++decoder->priv->tags_changed = FALSE;
++  }
++
+   break;
+ }
+ case GST_EVENT_GAP:
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
index 473dbcd..3139148 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
@@ -9,6 +9,7 @@ SRC_URI += "file://get-caps-from-src-pad-when-query-caps.patch \
 file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
 
file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
 file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
+
file://0005-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \
 "
 
 SRC_URI[md5sum] = "f530fbbe287edce79c55a37bd1a39fe2"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v2 5/7] gstreamer1.0-plugins-bad: Add detecting picture coding type when drain

2016-01-20 Thread Yuqing Zhu
Our use case is demuxer only output key frame when backward playback.
Every frame is DISCONT and KEY frame. mpeg4videoparse will detect coding
type when detect start code after VOP. Our use case will drain after VOP
and can't detect start code after VOP. Add check coding type code when
drain.

Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...arse-Need-detect-picture-coding-type-when.patch | 47 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb|  1 +
 2 files changed, 48 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-mpeg4videoparse-Need-detect-picture-coding-type-when.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-mpeg4videoparse-Need-detect-picture-coding-type-when.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-mpeg4videoparse-Need-detect-picture-coding-type-when.patch
new file mode 100755
index 000..3f09d4d
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-mpeg4videoparse-Need-detect-picture-coding-type-when.patch
@@ -0,0 +1,47 @@
+From f712092e768347b59719f5016714c91d4d82483b Mon Sep 17 00:00:00 2001
+From: Song Bing <b06...@freescale.com>
+Date: Wed, 20 May 2015 15:13:20 +0800
+Subject: [PATCH 03/10] mpeg4videoparse: Need detect picture coding type when
+ drain
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+our use case is demuxer only output key frame when backward playback.
+every frame is DISCONT and KEY frame. mpeg4videoparse will detect coding
+type when detect start code after VOP. our use case will drain after VOP
+and can't detect start code after VOP. Add check coding type code when
+drain.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=749617]
+
+---
+ gst/videoparsers/gstmpeg4videoparse.c | 12 
+ 1 file changed, 12 insertions(+)
+
+diff --git a/gst/videoparsers/gstmpeg4videoparse.c 
b/gst/videoparsers/gstmpeg4videoparse.c
+index 53db2d5..dbbd6d2 100644
+--- a/gst/videoparsers/gstmpeg4videoparse.c
 b/gst/videoparsers/gstmpeg4videoparse.c
+@@ -502,6 +502,18 @@ next:
+ case (GST_MPEG4_PARSER_ERROR):
+   /* if draining, take all */
+   if (GST_BASE_PARSE_DRAINING (parse)) {
++/* need decide intra_frame */
++if (mp4vparse->vop_offset >= 0) {
++  if (G_LIKELY (size > mp4vparse->vop_offset + 1)) {
++mp4vparse->intra_frame =
++  ((data[mp4vparse->vop_offset + 1] >> 6 & 0x3) == 0);
++  } else {
++GST_WARNING_OBJECT (mp4vparse, "no data following VOP startcode");
++mp4vparse->intra_frame = FALSE;
++  }
++  GST_LOG_OBJECT (mp4vparse, "is intra %d %d",
++  mp4vparse->intra_frame, mp4vparse->vop_offset);
++}
+ framesize = size;
+ ret = TRUE;
+   } else {
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
index 3f30f86..507d048 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
 
 SRC_URI += "file://0001-glimagesink-Downrank-to-marginal.patch \
 file://0002-mpegtsmux-Need-get-pid-when-create-streams.patch \
+
file://0003-mpeg4videoparse-Need-detect-picture-coding-type-when.patch \
 "
 
 SRC_URI[md5sum] = "7c73bec1d389f0e184eb9e9f883d"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 13/13] gstreamer1.0-plugins-bad: Fix loop test hang in glimagesink

2016-01-18 Thread Yuqing Zhu
Root cause:
In glimagesink, gl thread will dispatch event queue and window_show()
is called from streaming thread. Gl thread will empty event queue and
potentially cause gst_gl_wl_display_roundtrip_queue() blocking the
streaming thread to wait for an event occur. Actually, no event can occur
becaue the swap_buffer event is queued by streaming thread but it is blocked.

Solution:
Use two event queue, One for surface and another for gl thread.

Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...-wayland-fix-loop-test-hang-in-glimagesin.patch | 142 +
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb|   1 +
 2 files changed, 143 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin-gl-wayland-fix-loop-test-hang-in-glimagesin.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin-gl-wayland-fix-loop-test-hang-in-glimagesin.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin-gl-wayland-fix-loop-test-hang-in-glimagesin.patch
new file mode 100755
index 000..59f47de
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin-gl-wayland-fix-loop-test-hang-in-glimagesin.patch
@@ -0,0 +1,142 @@
+From 196799920b36b47e2f99fa55732abda6574e247c Mon Sep 17 00:00:00 2001
+From: Haihua Hu <b55...@freescale.com>
+Date: Sun, 6 Dec 2015 14:25:44 +0800
+Subject: [PATCH 3/5] [glplugin] gl/wayland: fix loop test hang in glimagesink
+
+Root cause: In glimagesink, gl thread will dispatch event queue and 
window_show()
+is called from streaming thread. Gl thread will empty event queue and
+potentially cause gst_gl_wl_display_roundtrip_queue() blocking the
+streaming thread to wait for an event occur. Actually, no event can occur
+becaue the swap_buffer event is queued by streaming thread but it is blocked.
+
+Solution: Use two event queue, One for surface and another for gl thread
+
+Upstream-Status: Pending
+
+bugzilla URL: https://bugzilla.gnome.org/show_bug.cgi?id=758984
+
+Signed-off-by: Haihua Hu <b55...@freescale.com>
+---
+ gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c |   33 ++---
+ gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h |2 +-
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+diff --git a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c 
b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c
+index b557daa..8ec9e7a 100644
+--- a/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c
 b/gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.c
+@@ -245,6 +245,10 @@ destroy_surfaces (GstGLWindowWaylandEGL * window_egl)
+ wl_egl_window_destroy (window_egl->window.native);
+ window_egl->window.native = NULL;
+   }
++  if(window_egl->window.surface_queue) {
++wl_event_queue_destroy (window_egl->window.surface_queue);
++window_egl->window.surface_queue = NULL;
++  }
+ }
+ 
+ static void
+@@ -253,13 +257,15 @@ create_surfaces (GstGLWindowWaylandEGL * window_egl)
+   GstGLDisplayWayland *display =
+   GST_GL_DISPLAY_WAYLAND (GST_GL_WINDOW (window_egl)->display);
+   gint width, height;
++  if (!window_egl->window.surface_queue)
++window_egl->window.surface_queue = wl_display_create_queue 
(display->display);
+ 
+   if (!window_egl->window.surface) {
+ window_egl->window.surface =
+ wl_compositor_create_surface (display->compositor);
+-if (window_egl->window.queue)
++if (window_egl->window.surface_queue)
+   wl_proxy_set_queue ((struct wl_proxy *) window_egl->window.surface,
+-  window_egl->window.queue);
++  window_egl->window.surface_queue);
+   }
+ 
+   if (window_egl->window.foreign_surface) {
+@@ -275,9 +281,9 @@ create_surfaces (GstGLWindowWaylandEGL * window_egl)
+   window_egl->window.subsurface =
+   wl_subcompositor_get_subsurface (display->subcompositor,
+   window_egl->window.surface, window_egl->window.foreign_surface);
+-  if (window_egl->window.queue)
++  if (window_egl->window.surface_queue)
+ wl_proxy_set_queue ((struct wl_proxy *) window_egl->window.subsurface,
+-window_egl->window.queue);
++window_egl->window.surface_queue);
+ 
+   wl_subsurface_set_position (window_egl->window.subsurface,
+   window_egl->window.window_x, window_egl->window.window_y);
+@@ -289,9 +295,9 @@ create_surfaces (GstGLWindowWaylandEGL * window_egl)
+   window_egl->window.shell_surface =
+   wl_shell_get_shell_surface (display->shell,
+   window_egl->window.surface);
+-  if (window_egl->window.queue)
++  if (window_egl->window.surface_queue)
+ wl_proxy_set_queue ((struct wl_proxy *) window_egl->window.
+-shell_surface, window_egl->window.queue);
++shell_surface, window_egl->window.surface_queue);
+ 
+ 

[OE-core] [poky][PATCH 06/13] gstreamer1.0-plugins-base: Add video crop supporting when convert frame

2016-01-18 Thread Yuqing Zhu
Getting thumbnail will use convertframe to convert video frame to
desired video format and size. But haven't process crop meta on
the video buffer. Need to add video crop support.

Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...ame-Support-video-crop-when-convert-frame.patch | 143 +
 .../gstreamer/gstreamer1.0-plugins-base_1.6.2.bb   |   1 +
 2 files changed, 144 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-convertframe-Support-video-crop-when-convert-frame.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-convertframe-Support-video-crop-when-convert-frame.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-convertframe-Support-video-crop-when-convert-frame.patch
new file mode 100755
index 000..096a6f4
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-convertframe-Support-video-crop-when-convert-frame.patch
@@ -0,0 +1,143 @@
+From 5be6ed00aad028d9cbb4e0c63af0be69d335c71e Mon Sep 17 00:00:00 2001
+From: Song Bing <b06...@freescale.com>
+Date: Fri, 11 Dec 2015 21:42:00 +0800
+Subject: [PATCH] convertframe: Support video crop when convert frame
+
+Get thumbnail will user convertframe to convert video frame to
+desired video format and size. But haven't process crop meta on
+the video buffer. Add support video crop.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=759329
+
+Upstream-Status: Backport [1.7.1]
+
+---
+ gst-libs/gst/video/convertframe.c | 65 +--
+ 1 file changed, 56 insertions(+), 9 deletions(-)
+
+diff --git a/gst-libs/gst/video/convertframe.c 
b/gst-libs/gst/video/convertframe.c
+index aa9c3d3..942a51e 100644
+--- a/gst-libs/gst/video/convertframe.c
 b/gst-libs/gst/video/convertframe.c
+@@ -110,12 +110,23 @@ fail:
+ static GstElement *
+ build_convert_frame_pipeline (GstElement ** src_element,
+ GstElement ** sink_element, const GstCaps * from_caps,
+-const GstCaps * to_caps, GError ** err)
++GstVideoCropMeta * cmeta, const GstCaps * to_caps, GError ** err)
+ {
+-  GstElement *src = NULL, *csp = NULL, *vscale = NULL;
+-  GstElement *sink = NULL, *encoder = NULL, *pipeline;
++  GstElement *vcrop = NULL, *csp = NULL, *csp2 = NULL, *vscale = NULL;
++  GstElement *src = NULL, *sink = NULL, *encoder = NULL, *pipeline;
++  GstVideoInfo info;
+   GError *error = NULL;
+ 
++  if (cmeta) {
++if (!create_element ("videocrop", , )) {
++  g_warning
++  ("build_convert_frame_pipeline: Buffer has crop metadata but 
videocrop element is not found. Cropping will be disabled");
++} else {
++  if (!create_element ("videoconvert", , ))
++goto no_elements;
++}
++  }
++
+   /* videoscale is here to correct for the pixel-aspect-ratio for us */
+   GST_DEBUG ("creating elements");
+   if (!create_element ("appsrc", , ) ||
+@@ -133,15 +144,42 @@ build_convert_frame_pipeline (GstElement ** src_element,
+ 
+   GST_DEBUG ("adding elements");
+   gst_bin_add_many (GST_BIN (pipeline), src, csp, vscale, sink, NULL);
++  if (vcrop)
++gst_bin_add_many (GST_BIN (pipeline), vcrop, csp2, NULL);
+ 
+   /* set caps */
+   g_object_set (src, "caps", from_caps, NULL);
++  if (vcrop) {
++gst_video_info_from_caps (, from_caps);
++g_object_set (vcrop, "left", cmeta->x, NULL);
++g_object_set (vcrop, "top", cmeta->y, NULL);
++g_object_set (vcrop, "right", GST_VIDEO_INFO_WIDTH () - cmeta->width,
++NULL);
++g_object_set (vcrop, "bottom",
++GST_VIDEO_INFO_HEIGHT () - cmeta->height, NULL);
++GST_DEBUG ("crop meta [x,y,width,height]: %d %d %d %d", cmeta->x, 
cmeta->y,
++cmeta->width, cmeta->height);
++  }
+   g_object_set (sink, "caps", to_caps, NULL);
+ 
+   /* FIXME: linking is still way too expensive, profile this properly */
+-  GST_DEBUG ("linking src->csp");
+-  if (!gst_element_link_pads (src, "src", csp, "sink"))
+-goto link_failed;
++  if (vcrop) {
++GST_DEBUG ("linking src->csp2");
++if (!gst_element_link_pads (src, "src", csp2, "sink"))
++  goto link_failed;
++
++GST_DEBUG ("linking csp2->vcrop");
++if (!gst_element_link_pads (csp2, "src", vcrop, "sink"))
++  goto link_failed;
++
++GST_DEBUG ("linking vcrop->csp");
++if (!gst_element_link_pads (vcrop, "src", csp, "sink"))
++  goto link_failed;
++  } else {
++GST_DEBUG ("linking src->csp");
++if (!gst_element_link_pads (src, "src", csp, "sink"))
++  goto link_failed;
++  }
+ 
+   GST_DEBUG ("linking csp->vscale");
+   if (!gst_element_link_pads_full (csp, "src",

[OE-core] [poky][PATCH 00/13] Add patches for gstreamer 1.6

2016-01-18 Thread Yuqing Zhu
---gstreamer1.0
   Correct the setting for FLAG_DISCONT when push to adapter.

---gstreamer1.0-plugins-base
   Fix taglist not being sent to down stream issue.
   Fix audio/video decoder error.
   Make gstaudiobasesink print warning instead of returning ERROR.
   Disable orc optimization for lib video.
   Add video crop supporting when convert frame.

---gstreamer1.0-plugins-bad
   Fix mpegtsmux get wrong pid.
   Add code type checking in mpeg4videoparse when draining.
   Detect picture coding type when draining.
   Fix frame rate info lost when fixating caps.
   Add video stitching support based on Open CV.
   Fix memory leak of navigation thread in glwindow.
   Fix loop test hang in glimagesink.


Yuqing Zhu (13):
  gstreamer1.0: [baseparse] unset FLAG_DISCONT when push to adapter
  gstreamer1.0-plugins-base: Fix taglist not being sent to down stream
if all the frame corrupted
  gstreamer1.0-plugins-base: Fix audio/video decoder error
  gstreamer1.0-plugins-base: Make gstaudiobasesink print warning instead
of returning ERROR
  gstreamer1.0-plugins-base: Disable orc optimization for lib video
  gstreamer1.0-plugins-base: Add video crop supporting when convert
frame
  gstreamer1.0-plugins-bad: Fix mpegtsmux get wrong pid
  gstreamer1.0-plugins-bad: Add check coding type when drain in
mpeg4videoparse
  gstreamer1.0-plugins-bad: Adding picture coding type when drain
  gstreamer1.0-plugins-bad: Fix frame rate info lost when fixate caps
  gstreamer1.0-plugins-bad: Add video stitching support based on Open CV
  gstreamer1.0-plugins-bad: Fix memory leak of navigation thread in
glwindow
  gstreamer1.0-plugins-bad: Fix loop test hang in glimagesink

 ...pegtsmux-Need-get-pid-when-create-streams.patch |   45 +
 ...arse-Need-detect-picture-coding-type-when.patch |   47 +
 ...rse-Need-detect-picture-coding-type-when-.patch |   47 +
 ...ter-Lost-frame-rate-info-when-fixate-caps.patch |   51 +
 ...-video-stitching-support-based-on-Open-CV.patch | 1915 
 ...window-fix-memory-leak-of-navigation-thre.patch |   35 +
 ...-wayland-fix-loop-test-hang-in-glimagesin.patch |  142 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb|   10 +-
 ...-send-to-down-stream-if-all-the-frame-cor.patch |   58 +
 .../0006-handle-audio-video-decoder-error.patch|   66 +
 ...esink-print-warning-istead-of-return-ERRO.patch |   47 +
 ...-optimization-for-lib-video-in-plugins-ba.patch |   34 +
 ...ame-Support-video-crop-when-convert-frame.patch |  143 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.6.2.bb   |5 +
 ...e-unset-FLAG_DISCONT-when-push-to-adapter.patch |   34 +
 .../gstreamer/gstreamer1.0_1.6.2.bb|1 +
 16 files changed, 2679 insertions(+), 1 deletion(-)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-mpegtsmux-Need-get-pid-when-create-streams.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-mpeg4videoparse-Need-detect-picture-coding-type-when.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-mpegvideoparse-Need-detect-picture-coding-type-when-.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glfilter-Lost-frame-rate-info-when-fixate-caps.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-opencv-Add-video-stitching-support-based-on-Open-CV.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-glplugin-gl-wayland-fix-loop-test-hang-in-glimagesin.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0006-handle-audio-video-decoder-error.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0007-gstaudiobasesink-print-warning-istead-of-return-ERRO.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0008-Disable-orc-optimization-for-lib-video-in-plugins-ba.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-convertframe-Support-video-crop-when-convert-frame.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-baseparse-unset-FLAG_DISCONT-when-push-to-adapter.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 10/13] gstreamer1.0-plugins-bad: Fix frame rate info lost when fixate caps

2016-01-18 Thread Yuqing Zhu
Frame rate info will be lost when fixate caps. It will
cause down stream element fail, such as avimux.

Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...ter-Lost-frame-rate-info-when-fixate-caps.patch | 51 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb|  1 +
 2 files changed, 52 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glfilter-Lost-frame-rate-info-when-fixate-caps.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glfilter-Lost-frame-rate-info-when-fixate-caps.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glfilter-Lost-frame-rate-info-when-fixate-caps.patch
new file mode 100755
index 000..7313415
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-glfilter-Lost-frame-rate-info-when-fixate-caps.patch
@@ -0,0 +1,51 @@
+From 15fcb87bc9abd69377b38ef0f8b48b84a56909f4 Mon Sep 17 00:00:00 2001
+From: Song Bing <b06...@freescale.com>
+Date: Mon, 8 Jun 2015 17:06:22 +0800
+Subject: [PATCH 06/10] glfilter: Lost frame rate info when fixate caps
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Lost frame rate info when fixate caps. It will cause
+down stream element fail, such avimux.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=750545]
+
+---
+ gst-libs/gst/gl/gstglfilter.c | 13 -
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c
+index 78bcbc9..65eba1e 100644
+--- a/gst-libs/gst/gl/gstglfilter.c
 b/gst-libs/gst/gl/gstglfilter.c
+@@ -258,7 +258,8 @@ gst_gl_filter_fixate_caps (GstBaseTransform * bt,
+ GstPadDirection direction, GstCaps * caps, GstCaps * othercaps)
+ {
+   GstStructure *ins, *outs;
+-  const GValue *from_par, *to_par;
++  const GValue *from_par, *to_par, *from_fps;
++  gint framerate_num, framerate_den;
+   GValue fpar = { 0, }, tpar = {
+   0,};
+ 
+@@ -271,6 +272,16 @@ gst_gl_filter_fixate_caps (GstBaseTransform * bt,
+   ins = gst_caps_get_structure (caps, 0);
+   outs = gst_caps_get_structure (othercaps, 0);
+ 
++  /* replace frame rate */
++  from_fps = gst_structure_get_value (ins, "framerate");
++  if (from_fps) {
++  gst_structure_set_value (outs, "framerate", from_fps);
++  } else {
++if (gst_structure_get_fraction (ins, "framerate", _num, 
_den))
++  gst_structure_set (outs, "framerate", GST_TYPE_FRACTION, framerate_num, 
framerate_den,
++  NULL);
++  }
++
+   from_par = gst_structure_get_value (ins, "pixel-aspect-ratio");
+   to_par = gst_structure_get_value (outs, "pixel-aspect-ratio");
+ 
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
index 4628018..c434a08 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
@@ -9,6 +9,7 @@ SRC_URI += "file://0001-glimagesink-Downrank-to-marginal.patch \
 file://0002-mpegtsmux-Need-get-pid-when-create-streams.patch \
 
file://0003-mpeg4videoparse-Need-detect-picture-coding-type-when.patch \
 
file://0004-mpegvideoparse-Need-detect-picture-coding-type-when-.patch \
+file://0005-glfilter-Lost-frame-rate-info-when-fixate-caps.patch \
 "
 
 SRC_URI[md5sum] = "7c73bec1d389f0e184eb9e9f883d"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 02/13] gstreamer1.0-plugins-base: Fix taglist not being sent to down stream if all the frame corrupted

2016-01-18 Thread Yuqing Zhu
Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...-send-to-down-stream-if-all-the-frame-cor.patch | 58 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.6.2.bb   |  1 +
 2 files changed, 59 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch
new file mode 100755
index 000..1e5ef5d
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch
@@ -0,0 +1,58 @@
+From 2f2fc40a88061995053c60d700efe20cb17358c9 Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.w...@freescale.com>
+Date: Wed, 21 Oct 2015 16:35:43 +0800
+Subject: [PATCH 8/9] taglist not send to down stream if all the frame
+ corrupted
+
+https://bugzilla.gnome.org/show_bug.cgi?id=737246
+
+Upstream-Status: Pending
+
+Signed-off-by: Jian Li <lj.qfy...@gmail.com>
+---
+ gst-libs/gst/audio/gstaudiodecoder.c | 9 +
+ gst-libs/gst/video/gstvideodecoder.c | 8 
+ 2 files changed, 17 insertions(+)
+
+diff --git a/gst-libs/gst/audio/gstaudiodecoder.c 
b/gst-libs/gst/audio/gstaudiodecoder.c
+index f4c663a..b68f9eb 100644
+--- a/gst-libs/gst/audio/gstaudiodecoder.c
 b/gst-libs/gst/audio/gstaudiodecoder.c
+@@ -2309,6 +2309,15 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * 
dec, GstEvent * event)
+ ("no valid frames found"));
+   }
+ 
++  /* send taglist if no valid frame is decoded util EOS */
++  if (dec->priv->taglist && dec->priv->taglist_changed) {
++GST_DEBUG_OBJECT (dec, "codec tag %" GST_PTR_FORMAT, 
dec->priv->taglist);
++if (!gst_tag_list_is_empty (dec->priv->taglist))
++  gst_audio_decoder_push_event (dec,
++  gst_event_new_tag (gst_tag_list_ref (dec->priv->taglist)));
++dec->priv->taglist_changed = FALSE;
++  }
++
+   /* Forward EOS because no buffer or serialized event will come after
+* EOS and nothing could trigger another _finish_frame() call. */
+   if (dec->priv->pending_events)
+diff --git a/gst-libs/gst/video/gstvideodecoder.c 
b/gst-libs/gst/video/gstvideodecoder.c
+index f8a5869..514c06f 100644
+--- a/gst-libs/gst/video/gstvideodecoder.c
 b/gst-libs/gst/video/gstvideodecoder.c
+@@ -1265,6 +1265,14 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * 
decoder,
+* parent class' ::sink_event() until a later time.
+*/
+   forward_immediate = TRUE;
++
++  /* send taglist if no valid frame is decoded util EOS */
++  if (decoder->priv->tags && decoder->priv->tags_changed) {
++gst_video_decoder_push_event (decoder,
++gst_event_new_tag (gst_tag_list_ref (decoder->priv->tags)));
++decoder->priv->tags_changed = FALSE;
++  }
++
+   break;
+ }
+ case GST_EVENT_GAP:
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
index 473dbcd..3139148 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
@@ -9,6 +9,7 @@ SRC_URI += "file://get-caps-from-src-pad-when-query-caps.patch \
 file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
 
file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
 file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
+
file://0005-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \
 "
 
 SRC_URI[md5sum] = "f530fbbe287edce79c55a37bd1a39fe2"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 05/13] gstreamer1.0-plugins-base: Disable orc optimization for lib video

2016-01-18 Thread Yuqing Zhu
- the orc optimization for lib video in plugins base may
  cause segmentation fault.

- disalbe orc optimization for lib video and just use the c source.

Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...-optimization-for-lib-video-in-plugins-ba.patch | 34 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.6.2.bb   |  1 +
 2 files changed, 35 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0008-Disable-orc-optimization-for-lib-video-in-plugins-ba.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0008-Disable-orc-optimization-for-lib-video-in-plugins-ba.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0008-Disable-orc-optimization-for-lib-video-in-plugins-ba.patch
new file mode 100755
index 000..9e80d96
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0008-Disable-orc-optimization-for-lib-video-in-plugins-ba.patch
@@ -0,0 +1,34 @@
+From 51554875c2ee2714a4f80456f805cc2dfd612f78 Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.w...@freescale.com>
+Date: Thu, 10 Dec 2015 14:32:43 +0800
+Subject: [PATCH] Disable orc optimization for lib video in plugins-base
+
+- the orc optimization for lib video in plugins base may
+cause segmentation fault
+- disalbe orc optimization for lib video and just use the c source
+
+package:  gstreamer1.0-plugins-base
+Community ticket: https://bugzilla.gnome.org/show_bug.cgi?id=759286
+Upstream-Status: pending
+
+Signed-off-by: Lyon Wang <lyon.w...@freescale.com>
+---
+ gst-libs/gst/video/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am
+index 5d31fa1..f91fca6 100644
+--- a/gst-libs/gst/video/Makefile.am
 b/gst-libs/gst/video/Makefile.am
+@@ -84,7 +84,7 @@ nodist_libgstvideo_@GST_API_VERSION@include_HEADERS = 
$(built_headers)
+ noinst_HEADERS = gstvideoutilsprivate.h
+ 
+ libgstvideo_@GST_API_VERSION@_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) 
$(GST_BASE_CFLAGS) $(GST_CFLAGS) \
+-  $(ORC_CFLAGS)
++  $(ORC_CFLAGS) -DDISABLE_ORC
+ libgstvideo_@GST_API_VERSION@_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) 
$(ORC_LIBS) $(LIBM)
+ libgstvideo_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) 
$(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
+ 
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
index 2e7952b..c6f5d77 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
@@ -12,6 +12,7 @@ SRC_URI += 
"file://get-caps-from-src-pad-when-query-caps.patch \
 
file://0005-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \
 file://0006-handle-audio-video-decoder-error.patch \
 
file://0007-gstaudiobasesink-print-warning-istead-of-return-ERRO.patch \
+
file://0008-Disable-orc-optimization-for-lib-video-in-plugins-ba.patch \
 "
 
 SRC_URI[md5sum] = "f530fbbe287edce79c55a37bd1a39fe2"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 08/13] gstreamer1.0-plugins-bad: Add check coding type when drain in mpeg4videoparse

2016-01-18 Thread Yuqing Zhu
Our use case is demuxer only output key frame when backward playback.
Every frame is DISCONT and KEY frame. mpeg4videoparse will detect coding
type when detect start code after VOP. our use case will drain after VOP
and can't detect start code after VOP. Add check coding type code when
drain.

Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...arse-Need-detect-picture-coding-type-when.patch | 47 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb|  1 +
 2 files changed, 48 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-mpeg4videoparse-Need-detect-picture-coding-type-when.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-mpeg4videoparse-Need-detect-picture-coding-type-when.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-mpeg4videoparse-Need-detect-picture-coding-type-when.patch
new file mode 100755
index 000..3f09d4d
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0003-mpeg4videoparse-Need-detect-picture-coding-type-when.patch
@@ -0,0 +1,47 @@
+From f712092e768347b59719f5016714c91d4d82483b Mon Sep 17 00:00:00 2001
+From: Song Bing <b06...@freescale.com>
+Date: Wed, 20 May 2015 15:13:20 +0800
+Subject: [PATCH 03/10] mpeg4videoparse: Need detect picture coding type when
+ drain
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+our use case is demuxer only output key frame when backward playback.
+every frame is DISCONT and KEY frame. mpeg4videoparse will detect coding
+type when detect start code after VOP. our use case will drain after VOP
+and can't detect start code after VOP. Add check coding type code when
+drain.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=749617]
+
+---
+ gst/videoparsers/gstmpeg4videoparse.c | 12 
+ 1 file changed, 12 insertions(+)
+
+diff --git a/gst/videoparsers/gstmpeg4videoparse.c 
b/gst/videoparsers/gstmpeg4videoparse.c
+index 53db2d5..dbbd6d2 100644
+--- a/gst/videoparsers/gstmpeg4videoparse.c
 b/gst/videoparsers/gstmpeg4videoparse.c
+@@ -502,6 +502,18 @@ next:
+ case (GST_MPEG4_PARSER_ERROR):
+   /* if draining, take all */
+   if (GST_BASE_PARSE_DRAINING (parse)) {
++/* need decide intra_frame */
++if (mp4vparse->vop_offset >= 0) {
++  if (G_LIKELY (size > mp4vparse->vop_offset + 1)) {
++mp4vparse->intra_frame =
++  ((data[mp4vparse->vop_offset + 1] >> 6 & 0x3) == 0);
++  } else {
++GST_WARNING_OBJECT (mp4vparse, "no data following VOP startcode");
++mp4vparse->intra_frame = FALSE;
++  }
++  GST_LOG_OBJECT (mp4vparse, "is intra %d %d",
++  mp4vparse->intra_frame, mp4vparse->vop_offset);
++}
+ framesize = size;
+ ret = TRUE;
+   } else {
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
index 3f30f86..507d048 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
 
 SRC_URI += "file://0001-glimagesink-Downrank-to-marginal.patch \
 file://0002-mpegtsmux-Need-get-pid-when-create-streams.patch \
+
file://0003-mpeg4videoparse-Need-detect-picture-coding-type-when.patch \
 "
 
 SRC_URI[md5sum] = "7c73bec1d389f0e184eb9e9f883d"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 03/13] gstreamer1.0-plugins-base: Fix audio/video decoder error

2016-01-18 Thread Yuqing Zhu
When there is input data and no output data to the end of the stream, it will
send GST_ELEMENT_ERROR, So the clips playing will quit.
However, if only one of the tracks is corrupt, there is no need to quit other
tracks playing.

The patch comments the GST_ELEMENT_ERROR() and just add GST_ERROR_OBJECT()
information instead.

Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 .../0006-handle-audio-video-decoder-error.patch| 66 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.6.2.bb   |  1 +
 2 files changed, 67 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0006-handle-audio-video-decoder-error.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0006-handle-audio-video-decoder-error.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0006-handle-audio-video-decoder-error.patch
new file mode 100755
index 000..2b714e4
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0006-handle-audio-video-decoder-error.patch
@@ -0,0 +1,66 @@
+From 9e2b1ea55e1676649f4130bd15c2cfcceb7bfed0 Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.w...@freescale.com>
+Date: Mon, 15 Dec 2014 16:52:07 +0800
+Subject: [PATCH 9/9] handle audio/video decoder error
+
+When there is input data and no output data to the end of the stream, it will
+send GST_ELEMENT_ERROR, So the clips playing will quit.
+However, if only one of the tracks is corrupt, there is no need to quit other
+tracks playing.
+
+The patch comments the GST_ELEMENT_ERROR() and just add GST_ERROR_OBJECT()
+information instead.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=741542
+
+Upstream-Status: Pending
+
+Signed-off-by: Lyon Wang <lyon.w...@freescale.com>
+---
+ gst-libs/gst/audio/gstaudiodecoder.c | 5 +++--
+ gst-libs/gst/video/gstvideodecoder.c | 5 +++--
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+ mode change 100644 => 100755 gst-libs/gst/audio/gstaudiodecoder.c
+ mode change 100644 => 100755 gst-libs/gst/video/gstvideodecoder.c
+
+diff --git a/gst-libs/gst/audio/gstaudiodecoder.c 
b/gst-libs/gst/audio/gstaudiodecoder.c
+old mode 100644
+new mode 100755
+index b68f9eb..506c13d
+--- a/gst-libs/gst/audio/gstaudiodecoder.c
 b/gst-libs/gst/audio/gstaudiodecoder.c
+@@ -2304,9 +2304,10 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * 
dec, GstEvent * event)
+   GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
+ 
+   if (dec->priv->ctx.had_input_data && !dec->priv->ctx.had_output_data) {
+-GST_ELEMENT_ERROR (dec, STREAM, DECODE,
++/* GST_ELEMENT_ERROR (dec, STREAM, DECODE,
+ ("No valid frames decoded before end of stream"),
+-("no valid frames found"));
++("no valid frames found")); */
++GST_ERROR_OBJECT(dec, "No valid frames decoded before end of stream");
+   }
+ 
+   /* send taglist if no valid frame is decoded util EOS */
+diff --git a/gst-libs/gst/video/gstvideodecoder.c 
b/gst-libs/gst/video/gstvideodecoder.c
+old mode 100644
+new mode 100755
+index 514c06f..fa29083
+--- a/gst-libs/gst/video/gstvideodecoder.c
 b/gst-libs/gst/video/gstvideodecoder.c
+@@ -1251,9 +1251,10 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * 
decoder,
+ 
+   /* Error out even if EOS was ok when we had input, but no output */
+   if (ret && priv->had_input_data && !priv->had_output_data) {
+-GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
++/* GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+ ("No valid frames decoded before end of stream"),
+-("no valid frames found"));
++("no valid frames found")); */
++GST_ERROR_OBJECT(decoder, "No valid frames decoded before end of 
stream");
+   }
+ 
+   /* Forward EOS immediately. This is required because no
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
index 3139148..014f081 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
@@ -10,6 +10,7 @@ SRC_URI += 
"file://get-caps-from-src-pad-when-query-caps.patch \
 
file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
 file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
 
file://0005-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \
+file://0006-handle-audio-video-decoder-error.patch \
 "
 
 SRC_URI[md5sum] = "f530fbbe287edce79c55a37bd1a39fe2"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 11/13] gstreamer1.0-plugins-bad: Add video stitching support based on Open CV

2016-01-18 Thread Yuqing Zhu
Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...-video-stitching-support-based-on-Open-CV.patch | 1915 
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb|1 +
 2 files changed, 1916 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-opencv-Add-video-stitching-support-based-on-Open-CV.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-opencv-Add-video-stitching-support-based-on-Open-CV.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-opencv-Add-video-stitching-support-based-on-Open-CV.patch
new file mode 100755
index 000..e19e222
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-opencv-Add-video-stitching-support-based-on-Open-CV.patch
@@ -0,0 +1,1915 @@
+From a2a7f25eba91b429a26fd5347007420e258676de Mon Sep 17 00:00:00 2001
+From: Song Bing <b06...@freescale.com>
+Date: Mon, 1 Jun 2015 13:30:11 +0800
+Subject: [PATCH 07/10] opencv: Add video stitching support based on Open CV
+
+Add video stitching element based on Open CV.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=751203]
+---
+ docs/plugins/Makefile.am |   1 +
+ ext/opencv/Makefile.am   |  12 +-
+ ext/opencv/gstcvstitching.cpp| 834 +++
+ ext/opencv/gstcvstitching.h  | 130 ++
+ ext/opencv/gstopencv.cpp |   4 +
+ ext/opencv/gstopencvaggregator.c | 705 +
+ ext/opencv/gstopencvaggregator.h | 118 ++
+ 7 files changed, 1803 insertions(+), 1 deletion(-)
+ create mode 100644 ext/opencv/gstcvstitching.cpp
+ create mode 100644 ext/opencv/gstcvstitching.h
+ create mode 100644 ext/opencv/gstopencvaggregator.c
+ create mode 100644 ext/opencv/gstopencvaggregator.h
+
+diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am
+index c431f78..d96ace8 100644
+--- a/docs/plugins/Makefile.am
 b/docs/plugins/Makefile.am
+@@ -97,6 +97,7 @@ EXTRA_HFILES = \
+   $(top_srcdir)/ext/opencv/gstpyramidsegment.h \
+   $(top_srcdir)/ext/opencv/gsttemplatematch.h \
+   $(top_srcdir)/ext/opencv/gsttextoverlay.h \
++  $(top_srcdir)/ext/opencv/gstcvstitching.h \
+   $(top_srcdir)/ext/openni2/gstopenni2src.h \
+   $(top_srcdir)/ext/rsvg/gstrsvgdec.h \
+   $(top_srcdir)/ext/rsvg/gstrsvgoverlay.h \
+diff --git a/ext/opencv/Makefile.am b/ext/opencv/Makefile.am
+index 72472fb..66c5786 100644
+--- a/ext/opencv/Makefile.am
 b/ext/opencv/Makefile.am
+@@ -24,10 +24,15 @@ libgstopencv_la_SOURCES = gstopencv.cpp \
+   gstsegmentation.cpp \
+   gstgrabcut.cpp \
+   gstdisparity.cpp \
++  gstopencvaggregator.c \
++  gstcvstitching.cpp \
+   motioncells_wrapper.cpp \
+   MotionCells.cpp
+ 
+-libgstopencv_la_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) 
$(GST_CXXFLAGS) $(OPENCV_CFLAGS)
++libgstopencv_la_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \
++  $(GST_CXXFLAGS) $(OPENCV_CFLAGS) \
++  -I$(top_srcdir)/gst-libs \
++  -I$(top_builddir)/gst-libs
+ 
+ # flags used to compile this facedetect
+ # add other _CFLAGS and _LIBS as needed
+@@ -36,11 +41,14 @@ libgstopencv_la_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) 
$(GST_BASE_CFLAGS) $(GST_C
+ # OpenCV's define isn't good enough to avoid 'unused' gcc warnings (at v2.1.0)
+ libgstopencv_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \
+   $(GST_CFLAGS) $(OPENCV_CFLAGS) \
++  -I$(top_srcdir)/gst-libs \
++  -I$(top_builddir)/gst-libs \
+   
-DGST_HAAR_CASCADES_DIR=\"$(pkgdatadir)/@GST_API_VERSION@/opencv_haarcascades\" 
\
+   -DCV_INLINE="static inline" \
+   -DCV_NO_BACKWARD_COMPATIBILITY
+ 
+ libgstopencv_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(OPENCV_LIBS) \
++  
$(top_builddir)/gst-libs/gst/video/libgstbadvideo-$(GST_API_VERSION).la \
+   $(GSTPB_BASE_LIBS) -lgstvideo-$(GST_API_VERSION)
+ 
+ libgstopencv_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+@@ -67,6 +75,8 @@ noinst_HEADERS = gstopencvvideofilter.h gstopencvutils.h \
+   gstsegmentation.h \
+   gstgrabcut.h \
+   gstdisparity.h \
++  gstopencvaggregator.h \
++  gstcvstitching.h \
+   gstmotioncells.h \
+   motioncells_wrapper.h \
+   MotionCells.h
+diff --git a/ext/opencv/gstcvstitching.cpp b/ext/opencv/gstcvstitching.cpp
+new file mode 100644
+index 000..47105f7
+--- /dev/null
 b/ext/opencv/gstcvstitching.cpp
+@@ -0,0 +1,834 @@
++/*
++ * GStreamer
++ * Copyright (C) 2015 Song Bing <b06...@freescale.com>
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Softw

[OE-core] [poky][PATCH 07/13] gstreamer1.0-plugins-bad: Fix mpegtsmux get wrong pid

2016-01-18 Thread Yuqing Zhu
When camerabin use mpegtsmux as muxer to start video recording and then
stop video recording and then start video recording again, mpegtsmux will
get wrong pid.
Need to get pid when create streams.

Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...pegtsmux-Need-get-pid-when-create-streams.patch | 45 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb|  4 +-
 2 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-mpegtsmux-Need-get-pid-when-create-streams.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-mpegtsmux-Need-get-pid-when-create-streams.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-mpegtsmux-Need-get-pid-when-create-streams.patch
new file mode 100755
index 000..f2c063f
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-mpegtsmux-Need-get-pid-when-create-streams.patch
@@ -0,0 +1,45 @@
+From 3e0bc017ca9b4e093484ee6b3b73917918364e92 Mon Sep 17 00:00:00 2001
+From: Song Bing <b06...@freescale.com>
+Date: Wed, 22 Apr 2015 18:06:35 +0800
+Subject: [PATCH 02/10] mpegtsmux: Need get pid when create streams.
+
+when camerabin use mpegtsmux as muxer, start video recording and then
+stop video recording and then start video recording, mpegtsmux get wrong
+pid.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=748288
+
+Upstream-Status: Pending
+---
+ gst/mpegtsmux/mpegtsmux.c | 15 +++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c
+index c3a0dbb..5a6d9e1 100644
+--- a/gst/mpegtsmux/mpegtsmux.c
 b/gst/mpegtsmux/mpegtsmux.c
+@@ -761,6 +761,21 @@ mpegtsmux_create_streams (MpegTsMux * mux)
+   } else {
+ ts_data->prog_id = DEFAULT_PROG_ID;
+   }
++
++  if (!ts_data->pid) {
++gint pid = -1;
++
++name = GST_PAD_NAME (c_data->pad);
++if (name != NULL && sscanf (name, "sink_%d", ) == 1) {
++  if (tsmux_find_stream (mux->tsmux, pid)) {
++GST_WARNING_OBJECT (mux, "Duplicate PID");
++  }
++} else {
++  pid = tsmux_get_new_pid (mux->tsmux);
++}
++
++ts_data->pid = pid;
++  }
+ }
+ 
+ ts_data->prog =
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
index 284e1f2..3f30f86 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
 file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \
 
file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50"
 
-SRC_URI += "file://0001-glimagesink-Downrank-to-marginal.patch"
+SRC_URI += "file://0001-glimagesink-Downrank-to-marginal.patch \
+file://0002-mpegtsmux-Need-get-pid-when-create-streams.patch \
+"
 
 SRC_URI[md5sum] = "7c73bec1d389f0e184eb9e9f883d"
 SRC_URI[sha256sum] = 
"650855e39ff56a8bb6cb0c192109c5926ce12f536d06e19ebf829de71ef396fe"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 12/13] gstreamer1.0-plugins-bad: Fix memory leak of navigation thread in glwindow

2016-01-18 Thread Yuqing Zhu
When exit navigation thread, call g_thread_join() to release
the resource which is hold by it.

Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...window-fix-memory-leak-of-navigation-thre.patch | 35 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb|  1 +
 2 files changed, 36 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
new file mode 100755
index 000..60866bf
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0007-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
@@ -0,0 +1,35 @@
+From 95cda7fbcf1a81289d9315c801c8e2b3d896f4cb Mon Sep 17 00:00:00 2001
+From: Haihua Hu <b55...@freescale.com>
+Date: Mon, 30 Nov 2015 09:36:09 +0800
+Subject: [PATCH 2/5] [glplugin] glwindow: fix memory leak of navigation
+ thread
+
+When exit navigation thread, call g_thread_join() to release
+the resource hold by it.
+
+Upstream-Status: Pending
+
+bugzilla URL: https://bugzilla.gnome.org/show_bug.cgi?id=758820
+
+Signed-off-by: Haihua Hu <b55...@freescale.com>
+---
+ gst-libs/gst/gl/gstglwindow.c |3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c
+index 44b74ca..42ef296 100644
+--- a/gst-libs/gst/gl/gstglwindow.c
 b/gst-libs/gst/gl/gstglwindow.c
+@@ -343,6 +343,9 @@ gst_gl_window_finalize (GObject * object)
+ while (window->nav_alive) {
+   g_cond_wait (>nav_destroy_cond, >nav_lock);
+ }
++/* release resource hold by navigation thread */
++g_thread_join(window->priv->navigation_thread);
++window->priv->navigation_thread = NULL;
+ g_mutex_unlock (>nav_lock);
+   }
+ 
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
index a75d1e9..280ec26 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
@@ -11,6 +11,7 @@ SRC_URI += 
"file://0001-glimagesink-Downrank-to-marginal.patch \
 
file://0004-mpegvideoparse-Need-detect-picture-coding-type-when-.patch \
 file://0005-glfilter-Lost-frame-rate-info-when-fixate-caps.patch \
 
file://0006-opencv-Add-video-stitching-support-based-on-Open-CV.patch \
+
file://0007-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch \
 "
 
 SRC_URI[md5sum] = "7c73bec1d389f0e184eb9e9f883d"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 04/13] gstreamer1.0-plugins-base: Make gstaudiobasesink print warning instead of returning ERROR

2016-01-18 Thread Yuqing Zhu
For those clips with corrupt audio track,
there might be no output from audio decoder
and thus the audio track have no chance to negotiate.
We can just print error warning instead of return ERROR,
so that other track can be played normally.

Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...esink-print-warning-istead-of-return-ERRO.patch | 47 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.6.2.bb   |  1 +
 2 files changed, 48 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0007-gstaudiobasesink-print-warning-istead-of-return-ERRO.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0007-gstaudiobasesink-print-warning-istead-of-return-ERRO.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0007-gstaudiobasesink-print-warning-istead-of-return-ERRO.patch
new file mode 100755
index 000..cf56afc
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0007-gstaudiobasesink-print-warning-istead-of-return-ERRO.patch
@@ -0,0 +1,47 @@
+From 5d83c4db60646ce077dfb2460b59c9d30ce06b04 Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.w...@freescale.com>
+Date: Tue, 17 Nov 2015 14:56:47 +0800
+Subject: [PATCH] gstaudiobasesink print warning istead of return ERROR.
+
+For those clips with corrupt audio track,
+there might be no output from audio decoder
+and thus the audio track have no chance to negotiate.
+We can just print error warning instead of return ERROR,
+so that other track can be played normally
+
+https://bugzilla.gnome.org/show_bug.cgi?id=758215
+
+Upstream-Status:  Pending
+
+Signed-off-by: Lyon Wang <lyon.w...@freescale.com>
+---
+ gst-libs/gst/audio/gstaudiobasesink.c | 7 ++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+ mode change 100644 => 100755 gst-libs/gst/audio/gstaudiobasesink.c
+
+diff --git a/gst-libs/gst/audio/gstaudiobasesink.c 
b/gst-libs/gst/audio/gstaudiobasesink.c
+old mode 100644
+new mode 100755
+index 704801e..a4a716b
+--- a/gst-libs/gst/audio/gstaudiobasesink.c
 b/gst-libs/gst/audio/gstaudiobasesink.c
+@@ -1133,10 +1133,15 @@ gst_audio_base_sink_wait_event (GstBaseSink * bsink, 
GstEvent * event)
+ case GST_EVENT_GAP:
+   /* We must have a negotiated format before starting the ringbuffer */
+   if (G_UNLIKELY (!gst_audio_ring_buffer_is_acquired (sink->ringbuffer))) 
{
+-GST_ELEMENT_ERROR (sink, STREAM, FORMAT, (NULL),
++  /*  GST_ELEMENT_ERROR (sink, STREAM, FORMAT, (NULL),
+ ("Sink not negotiated before %s event.",
+ GST_EVENT_TYPE_NAME (event)));
++
+ return GST_FLOW_ERROR;
++   */
++/* consider there might be chance that corrupt audio track without 
output buffer and not negotiated.
++ We'd better not return error and quit play, video track can keep 
playing.*/
++GST_ERROR_OBJECT(sink, "Sink not negotiated before %s 
event.",GST_EVENT_TYPE_NAME (event));
+   }
+ 
+   gst_audio_base_sink_force_start (sink);
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
index 014f081..2e7952b 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.2.bb
@@ -11,6 +11,7 @@ SRC_URI += 
"file://get-caps-from-src-pad-when-query-caps.patch \
 file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
 
file://0005-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \
 file://0006-handle-audio-video-decoder-error.patch \
+
file://0007-gstaudiobasesink-print-warning-istead-of-return-ERRO.patch \
 "
 
 SRC_URI[md5sum] = "f530fbbe287edce79c55a37bd1a39fe2"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH 09/13] gstreamer1.0-plugins-bad: Detect picture coding type when drain

2016-01-18 Thread Yuqing Zhu
Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...rse-Need-detect-picture-coding-type-when-.patch | 47 ++
 .../gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb|  1 +
 2 files changed, 48 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-mpegvideoparse-Need-detect-picture-coding-type-when-.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-mpegvideoparse-Need-detect-picture-coding-type-when-.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-mpegvideoparse-Need-detect-picture-coding-type-when-.patch
new file mode 100755
index 000..81e5f28
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0004-mpegvideoparse-Need-detect-picture-coding-type-when-.patch
@@ -0,0 +1,47 @@
+From 71c688f09c86b2428f58757f42d9ae1ad26227a4 Mon Sep 17 00:00:00 2001
+From: Song Bing <b06...@freescale.com>
+Date: Wed, 20 May 2015 15:15:08 +0800
+Subject: [PATCH 04/10] mpegvideoparse: Need detect picture coding type when
+ drain
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Need detect picture coding type when drain
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=749617]
+
+---
+ gst/videoparsers/gstmpegvideoparse.c | 16 
+ 1 file changed, 16 insertions(+)
+
+diff --git a/gst/videoparsers/gstmpegvideoparse.c 
b/gst/videoparsers/gstmpegvideoparse.c
+index 54ee13b..c70fa6d 100644
+--- a/gst/videoparsers/gstmpegvideoparse.c
 b/gst/videoparsers/gstmpegvideoparse.c
+@@ -717,6 +717,22 @@ need_more:
+   if (GST_BASE_PARSE_DRAINING (parse)) {
+ GST_LOG_OBJECT (mpvparse, "draining, accepting all data");
+ off = size;
++/* decide picture codding type */
++if (mpvparse->pic_offset >= 0 && mpvparse->pic_offset < off) {
++  GstMpegVideoPacket header;
++
++  header.data = map.data;
++  header.type = GST_MPEG_VIDEO_PACKET_PICTURE;
++  header.offset = mpvparse->pic_offset;
++  header.size = map.size - mpvparse->pic_offset;
++  if (gst_mpeg_video_packet_parse_picture_header (, 
>pichdr))
++GST_LOG_OBJECT (mpvparse, "picture_coding_type %d (%s), ending"
++"frame of size %d", mpvparse->pichdr.pic_type,
++picture_type_name (mpvparse->pichdr.pic_type), off - 4);
++  else
++GST_LOG_OBJECT (mpvparse, "Couldn't parse picture at offset %d",
++mpvparse->pic_offset);
++}
+ ret = TRUE;
+   } else {
+ GST_LOG_OBJECT (mpvparse, "need more data");
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
index 507d048..4628018 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.2.bb
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
 SRC_URI += "file://0001-glimagesink-Downrank-to-marginal.patch \
 file://0002-mpegtsmux-Need-get-pid-when-create-streams.patch \
 
file://0003-mpeg4videoparse-Need-detect-picture-coding-type-when.patch \
+
file://0004-mpegvideoparse-Need-detect-picture-coding-type-when-.patch \
 "
 
 SRC_URI[md5sum] = "7c73bec1d389f0e184eb9e9f883d"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH] gstreamer1.0: Fix basesink drop buffer error

2015-09-17 Thread Yuqing Zhu
Basesink: Shouldn't drop buffer when sync=false

Signed-off-by: Yuqing Zhu <b54...@freescale.com>
---
 ...ink-Shouldn-t-drop-buffer-when-sync-false.patch | 30 ++
 .../gstreamer/gstreamer1.0_1.4.5.bb|  1 +
 2 files changed, 31 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-basesink-Shouldn-t-drop-buffer-when-sync-false.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-basesink-Shouldn-t-drop-buffer-when-sync-false.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-basesink-Shouldn-t-drop-buffer-when-sync-false.patch
new file mode 100755
index 000..d682ee6
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-basesink-Shouldn-t-drop-buffer-when-sync-false.patch
@@ -0,0 +1,30 @@
+From 73df2b5c0aea58015788f5a94a3ec65296a688d3 Mon Sep 17 00:00:00 2001
+From: Song Bing <b06...@freescale.com>
+Date: Thu, 2 Jul 2015 14:32:21 +0800
+Subject: [PATCH] basesink: Shouldn't drop buffer when sync=false
+
+Shouldn't drop buffer when sync=false
+
+Upstream-Status: Accepted
+
+https://bugzilla.gnome.org/show_bug.cgi?id=751819
+---
+ libs/gst/base/gstbasesink.c |2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c
+index d44e8fc..cd759ac 100644
+--- a/libs/gst/base/gstbasesink.c
 b/libs/gst/base/gstbasesink.c
+@@ -3423,7 +3423,7 @@ gst_base_sink_chain_unlocked (GstBaseSink * basesink, 
GstPad * pad,
+ if (G_UNLIKELY (stepped))
+   goto dropped;
+ 
+-if (syncable && do_sync) {
++if (syncable && do_sync && gst_base_sink_get_sync (basesink)) {
+   GstClock *clock;
+ 
+   GST_OBJECT_LOCK (basesink);
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb
index db58754..73a4a99 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb
@@ -9,6 +9,7 @@ SRC_URI = " \
 file://0001-gstinfo-Shorten-__FILE__-on-all-platforms.patch \
 file://inputselector-sticky-events-haven-t-send-out-when-ac-1-4-1.patch \
 file://0002-basesink-Fix-QoS-lateness-checking-if-subclass-imple.patch \
+file://0003-basesink-Shouldn-t-drop-buffer-when-sync-false.patch \
 "
 SRC_URI[md5sum] = "88a9289c64a4950ebb4f544980234289"
 SRC_URI[sha256sum] = 
"40801aa7f979024526258a0e94707ba42b8ab6f7d2206e56adbc4433155cb0ae"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v4 1/2] gstreamer1.0: Fix ticky events haven't been sent out when active track reach EOS

2015-08-21 Thread Yuqing Zhu
EOS event hasn't been sent to down-element. The resolution is block EOS event
of inactive pad, sending the event after the pad actived.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...cky-events-haven-t-send-out-when-ac-1-4-1.patch | 167 +
 .../gstreamer/gstreamer1.0_1.4.5.bb|   1 +
 2 files changed, 168 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0/inputselector-sticky-events-haven-t-send-out-when-ac-1-4-1.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0/inputselector-sticky-events-haven-t-send-out-when-ac-1-4-1.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0/inputselector-sticky-events-haven-t-send-out-when-ac-1-4-1.patch
new file mode 100755
index 000..f50ce6f
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0/inputselector-sticky-events-haven-t-send-out-when-ac-1-4-1.patch
@@ -0,0 +1,167 @@
+From 83bed90c306ed3185d48febf6441177d638f7341 Mon Sep 17 00:00:00 2001
+From: Song Bing b06...@freescale.com
+Date: Wed, 24 Dec 2014 10:13:51 +0800
+Subject: [PATCH] inputselector: sticky events haven't send out when active
+ track reach EOS
+
+EOS event hasn't been send to down-element. The resolution is block EOS event
+of inactive pad, send the event after the pad actived.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=740949
+
+Upstream-Status: Backport [1.5.1]
+
+Signed-off-by: Song Bing b06...@freescale.com
+---
+ plugins/elements/gstinputselector.c |   58 ++-
+ plugins/elements/gstinputselector.h |1 +
+ 2 files changed, 45 insertions(+), 14 deletions(-)
+
+diff --git a/plugins/elements/gstinputselector.c 
b/plugins/elements/gstinputselector.c
+index fb50802..4461f7c 100644
+--- a/plugins/elements/gstinputselector.c
 b/plugins/elements/gstinputselector.c
+@@ -440,6 +440,17 @@ gst_selector_pad_iterate_linked_pads (GstPad * pad, 
GstObject * parent)
+ }
+ 
+ static gboolean
++gst_input_selector_eos_wait (GstInputSelector * self, GstSelectorPad * pad)
++{
++  while (!self-eos  !self-flushing  !pad-flushing) {
++/* we can be unlocked here when we are shutting down (flushing) or when we
++ * get unblocked */
++GST_INPUT_SELECTOR_WAIT (self);
++  }
++  return self-flushing;
++}
++
++static gboolean
+ gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
+ {
+   gboolean res = TRUE;
+@@ -486,6 +497,7 @@ gst_selector_pad_event (GstPad * pad, GstObject * parent, 
GstEvent * event)
+ case GST_EVENT_FLUSH_START:
+   /* Unblock the pad if it's waiting */
+   selpad-flushing = TRUE;
++  sel-eos = FALSE;
+   GST_INPUT_SELECTOR_BROADCAST (sel);
+   break;
+ case GST_EVENT_FLUSH_STOP:
+@@ -523,21 +535,12 @@ gst_selector_pad_event (GstPad * pad, GstObject * 
parent, GstEvent * event)
+ case GST_EVENT_EOS:
+   selpad-eos = TRUE;
+ 
+-  if (forward) {
+-selpad-eos_sent = TRUE;
+-  } else {
+-GstSelectorPad *active_selpad;
+-
+-/* If the active sinkpad is in EOS state but EOS
+- * was not sent downstream this means that the pad
+- * got EOS before it was set as active pad and that
+- * the previously active pad got EOS after it was
+- * active
+- */
+-active_selpad = GST_SELECTOR_PAD (active_sinkpad);
+-forward = (active_selpad-eos  !active_selpad-eos_sent);
+-active_selpad-eos_sent = TRUE;
++  if (!forward) {
++/* blocked until active the sind pad or flush */
++gst_input_selector_eos_wait (sel, selpad);
++forward = TRUE;
+   }
++  selpad-eos_sent = TRUE;
+   GST_DEBUG_OBJECT (pad, received EOS);
+   break;
+ case GST_EVENT_GAP:{
+@@ -676,6 +679,12 @@ gst_input_selector_wait_running_time (GstInputSelector * 
sel,
+ gst_input_selector_activate_sinkpad (sel, GST_PAD_CAST (selpad));
+ active_selpad = GST_SELECTOR_PAD_CAST (active_sinkpad);
+ 
++if (sel-eos) {
++  GST_DEBUG_OBJECT (sel, Not waiting because inputselector reach EOS.);
++  GST_INPUT_SELECTOR_UNLOCK (sel);
++  return FALSE;
++}
++
+ if (seg-format != GST_FORMAT_TIME) {
+   GST_DEBUG_OBJECT (selpad,
+   Not waiting because we don't have a TIME segment);
+@@ -971,6 +980,12 @@ gst_selector_pad_chain (GstPad * pad, GstObject * parent, 
GstBuffer * buf)
+   GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
+ 
+   GST_INPUT_SELECTOR_LOCK (sel);
++  if (sel-eos) {
++GST_DEBUG_OBJECT (pad, inputselector eos.);
++GST_INPUT_SELECTOR_UNLOCK (sel);
++goto eos;
++  }
++
+   /* wait or check for flushing */
+   if (gst_input_selector_wait (sel, selpad)) {
+ GST_INPUT_SELECTOR_UNLOCK (sel);
+@@ -1151,6 +1166,13 @@ flushing:
+ res = GST_FLOW_FLUSHING;
+ goto done;
+   }
++eos:
++  {
++GST_DEBUG_OBJECT (pad, We are eos, discard buffer %p, buf);
++gst_buffer_unref (buf);
++res = GST_FLOW_EOS;
++goto done;
++  }
+ }
+ 
+ static

[OE-core] [poky][PATCH v4 2/2] gstreamer1.0: Fix QoS/lateness checking if subclass implements prepare/prepare_list vfuncs

2015-08-21 Thread Yuqing Zhu
In function gst_base_sink_chain_unlocked(), it should calculate jitter based
on current media clock, rather than just passing 0.
Or it will drop all the frames when rewind in slow speed, such as -2X.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...x-QoS-lateness-checking-if-subclass-imple.patch | 70 ++
 .../gstreamer/gstreamer1.0_1.4.5.bb|  1 +
 2 files changed, 71 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-basesink-Fix-QoS-lateness-checking-if-subclass-imple.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-basesink-Fix-QoS-lateness-checking-if-subclass-imple.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-basesink-Fix-QoS-lateness-checking-if-subclass-imple.patch
new file mode 100644
index 000..b6edda1
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-basesink-Fix-QoS-lateness-checking-if-subclass-imple.patch
@@ -0,0 +1,70 @@
+From 6914566ed6a89c96973a578aa5ecd01ee68cdcfd Mon Sep 17 00:00:00 2001
+From: Jian jian...@freescale.com
+Date: Thu, 14 May 2015 15:49:43 +0800
+Subject: [PATCH] basesink: Fix QoS/lateness checking if subclass implements
+ prepare/prepare_list vfuncs
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In basesink functions gst_base_sink_chain_unlocked(), below code is used to
+checking if buffer is late before doing prepare call to save some effort:
+if (syncable  do_sync)
+  late =
+  gst_base_sink_is_too_late (basesink, obj, rstart, rstop,
+  GST_CLOCK_EARLY, 0, FALSE);
+
+if (G_UNLIKELY (late))
+  goto dropped;
+
+But this code has problem, it should calculate jitter based on current media
+clock, rather than just passing 0. I found it will drop all the frames when
+rewind in slow speed, such as -2X.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=749258
+
+Upstream-Status: Backport [1.5.1]
+---
+ libs/gst/base/gstbasesink.c |   26 ++
+ 1 file changed, 22 insertions(+), 4 deletions(-)
+
+diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c
+index a505695..5fb2d6a 100644
+--- a/libs/gst/base/gstbasesink.c
 b/libs/gst/base/gstbasesink.c
+@@ -3369,10 +3369,28 @@ gst_base_sink_chain_unlocked (GstBaseSink * basesink, 
GstPad * pad,
+ if (G_UNLIKELY (stepped))
+   goto dropped;
+ 
+-if (syncable  do_sync)
+-  late =
+-  gst_base_sink_is_too_late (basesink, obj, rstart, rstop,
+-  GST_CLOCK_EARLY, 0, FALSE);
++if (syncable  do_sync) {
++  GstClock *clock;
++
++  GST_OBJECT_LOCK (basesink);
++  clock = GST_ELEMENT_CLOCK (basesink);
++  if (clock  GST_STATE (basesink) == GST_STATE_PLAYING) {
++GstClockTime base_time;
++GstClockTime stime;
++GstClockTime now;
++
++base_time = GST_ELEMENT_CAST (basesink)-base_time;
++stime = base_time + gst_base_sink_adjust_time (basesink, rstart);
++now = gst_clock_get_time (clock);
++GST_OBJECT_UNLOCK (basesink);
++
++late =
++gst_base_sink_is_too_late (basesink, obj, rstart, rstop,
++GST_CLOCK_EARLY, GST_CLOCK_DIFF (stime, now), FALSE);
++  } else {
++GST_OBJECT_UNLOCK (basesink);
++  }
++}
+ 
+ if (G_UNLIKELY (late))
+   goto dropped;
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb
index 902f79d..db58754 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb
@@ -8,6 +8,7 @@ SRC_URI =  \
 file://0001-Fix-crash-with-gst-inspect.patch \
 file://0001-gstinfo-Shorten-__FILE__-on-all-platforms.patch \
 file://inputselector-sticky-events-haven-t-send-out-when-ac-1-4-1.patch \
+file://0002-basesink-Fix-QoS-lateness-checking-if-subclass-imple.patch \
 
 SRC_URI[md5sum] = 88a9289c64a4950ebb4f544980234289
 SRC_URI[sha256sum] = 
40801aa7f979024526258a0e94707ba42b8ab6f7d2206e56adbc4433155cb0ae
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v4 0/2] gstreamer1.0: Add patches for Gstreamer 1.4.5

2015-08-21 Thread Yuqing Zhu
Fix sticky events haven't been sent out when active track reach EOS

Fix QoS/lateness checking if subclass implements prepare/prepare_list vfuncs


Yuqing Zhu (2):
  gstreamer1.0: Fix ticky events haven't been sent out when active track
reach EOS
  gstreamer1.0: Fix QoS/lateness checking if subclass implements
prepare/prepare_list vfuncs

 ...x-QoS-lateness-checking-if-subclass-imple.patch |  70 +
 ...cky-events-haven-t-send-out-when-ac-1-4-1.patch | 167 +
 .../gstreamer/gstreamer1.0_1.4.5.bb|   2 +
 3 files changed, 239 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-basesink-Fix-QoS-lateness-checking-if-subclass-imple.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0/inputselector-sticky-events-haven-t-send-out-when-ac-1-4-1.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v8 02/11] gstreamer1.0-plugins-base: Handle audio/video decoder error

2015-08-09 Thread Yuqing Zhu
When there is input data and no output data to the end of the stream, it will
send GST_ELEMENT_ERROR and quit from playing.
The patch comments the GST_ELEMENT_ERROR() and just add GST_ERROR_OBJECT()
information instead.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 .../handle-audio-video-decoder-error.patch | 64 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 65 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch
new file mode 100755
index 000..833ce72
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch
@@ -0,0 +1,64 @@
+From bcb2b8b6f49e7c66124a4f5e07dea829d5ebfe59 Mon Sep 17 00:00:00 2001
+From: Lyon Wang lyon.w...@freescale.com
+Date: Mon, 15 Dec 2014 16:52:07 +0800
+Subject: [PATCH] handle audio/video decoder error
+
+When there is input data and no output data to the end of the stream, it will
+send GST_ELEMENT_ERROR, So the clips playing will quit.
+However, if only one of the tracks is corrupt, there is no need to quit other
+tracks playing.
+
+The patch comments the GST_ELEMENT_ERROR() and just add GST_ERROR_OBJECT()
+information instead.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=741542]
+
+Signed-off-by: Lyon Wang lyon.w...@freescale.com
+---
+ gst-libs/gst/audio/gstaudiodecoder.c |5 +++--
+ gst-libs/gst/video/gstvideodecoder.c |5 +++--
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+ mode change 100644 = 100755 gst-libs/gst/audio/gstaudiodecoder.c
+ mode change 100644 = 100755 gst-libs/gst/video/gstvideodecoder.c
+
+diff --git a/gst-libs/gst/audio/gstaudiodecoder.c 
b/gst-libs/gst/audio/gstaudiodecoder.c
+old mode 100644
+new mode 100755
+index c2e7a28..891df0a
+--- a/gst-libs/gst/audio/gstaudiodecoder.c
 b/gst-libs/gst/audio/gstaudiodecoder.c
+@@ -2123,9 +2123,10 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * 
dec, GstEvent * event)
+   GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
+ 
+   if (dec-priv-ctx.had_input_data  !dec-priv-ctx.had_output_data) {
+-GST_ELEMENT_ERROR (dec, STREAM, DECODE,
++/* GST_ELEMENT_ERROR (dec, STREAM, DECODE,
+ (No valid frames decoded before end of stream),
+-(no valid frames found));
++(no valid frames found)); */
++GST_ERROR_OBJECT(dec, No valid frames decoded before end of stream);
+   }
+ 
+   /* send taglist if no valid frame is decoded util EOS */
+diff --git a/gst-libs/gst/video/gstvideodecoder.c 
b/gst-libs/gst/video/gstvideodecoder.c
+old mode 100644
+new mode 100755
+index ac581e1..4278bcd
+--- a/gst-libs/gst/video/gstvideodecoder.c
 b/gst-libs/gst/video/gstvideodecoder.c
+@@ -1068,9 +1068,10 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * 
decoder,
+ 
+   /* Error out even if EOS was ok when we had input, but no output */
+   if (ret  priv-had_input_data  !priv-had_output_data) {
+-GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
++/* GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+ (No valid frames decoded before end of stream),
+-(no valid frames found));
++(no valid frames found)); */
++GST_ERROR_OBJECT(decoder, No valid frames decoded before end of 
stream);
+   }
+ 
+   /* Forward EOS immediately. This is required because no
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index aaa1ecb..aa90179 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -9,6 +9,7 @@ SRC_URI += 
file://do-not-change-eos-event-to-gap-event-if.patch \
 file://get-caps-from-src-pad-when-query-caps.patch \
 file://taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \
 file://fix-id3demux-utf16-to-utf8-issue.patch \
+file://handle-audio-video-decoder-error.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v8 01/11] gstreamer1.0-plugins-base: Bug fix for id3demux issue

2015-08-09 Thread Yuqing Zhu
Use g_utf16_to_utf8() instead of g_convert to fix the issue that
id3 tags utf16 charaters cannot be extreacted in id3demux when try
to get the id3v2 tag such as TIT2, TALB etc.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 .../fix-id3demux-utf16-to-utf8-issue.patch | 54 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 55 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch
new file mode 100755
index 000..ef3f75f
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch
@@ -0,0 +1,54 @@
+Author: Lyon Wang b12...@freescale.com
+Date:   Thu Oct 9 17:37:43 2014 +0800
+
+[id3v2frames] Bug fix for id3demux issue
+
+Fix the issue that id3 tags utf16 charaters cannot be extreacted in id3demux
+when I tried to get the id3v2 tag such as TIT2, TALB etc. it will return extrac
+failed.
+
+Checked in id3v2frame.c,  When parse the UTF-16 streams, it used g_convert() to
+convert the buffer from UTF-16 to UTF-8, however it will return err that this
+conversion is not supported which cause the extraction failed with these UTF-16
+characters.
+
+In the patch, use g_utf16_to_utf8() instead of g_convert, which can convert the
+character format successfully.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=741144
+
+Upstream-Status: Backport [1.5.1]
+
+Signed-off-by: Lyon Wang b12...@freescale.com
+
+diff --git a/gst-libs/gst/tag/id3v2frames.c b/gst-libs/gst/tag/id3v2frames.c
+old mode 100644
+new mode 100755
+index 3785c2a..7b9d8ac
+--- a/gst-libs/gst/tag/id3v2frames.c
 b/gst-libs/gst/tag/id3v2frames.c
+@@ -1057,14 +1057,17 @@ parse_insert_string_field (guint8 encoding, gchar * 
data, gint data_size,
+ data_size -= 2;
+   }
+ 
+-  field = g_convert (data, data_size, UTF-8, in_encode, NULL, NULL, 
NULL);
+-
+-  if (field == NULL || g_utf8_validate (field, -1, NULL) == FALSE) {
+-/* As a fallback, try interpreting UTF-16 in the other endianness */
+-if (in_encode == utf16beenc)
+-  field = g_convert (data, data_size, UTF-8, utf16leenc,
+-  NULL, NULL, NULL);
++  if (in_encode == utf16beenc) {
++   gunichar2 *data_utf16;
++   guint i;
++   data_utf16 =  (gunichar2 *) data;
++  for (i=0; i(data_size1); i++) {
++data_utf16[i] = GUINT16_TO_LE (data_utf16[i]);
++  }
+   }
++  //field = g_convert (data, data_size, UTF-8, in_encode, NULL, NULL, 
NULL);
++   field = g_utf16_to_utf8((gunichar2 *)data, (glong)(data_size1), 
NULL, NULL, NULL);
++
+ }
+ 
+   break;
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index 11cf8b4..aaa1ecb 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = 
file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
 SRC_URI += file://do-not-change-eos-event-to-gap-event-if.patch \
 file://get-caps-from-src-pad-when-query-caps.patch \
 file://taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \
+file://fix-id3demux-utf16-to-utf8-issue.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v8 06/11] gstreamer1.0-plugins-base: Do not change EOS event to GAP event

2015-08-09 Thread Yuqing Zhu
-Sending EOS event instead of GAP event as GAP event has error if A/V have the 
different duration.

-Stop sending second track EOS event when returing failure after sending the 
first track EOS.
 Fixed by ignoring the return error.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 .../do-not-change-eos-event-to-gap-event2.patch| 49 ++
 .../do-not-change-eos-event-to-gap-event3.patch| 31 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  2 +
 3 files changed, 82 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
new file mode 100755
index 000..f24bc7c
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
@@ -0,0 +1,49 @@
+commit f9536544f5ad182b4f78d0143d1daa45dd64e624
+Author: Song Bing b06...@freescale.com
+Date:   Thu Oct 9 17:37:43 2014 +0800
+
+[gststreamsynchronizer] send EOS event insterd of GAP event as GAP
+event has issue when A/V have different duration.
+
+send EOS event insterd of GAP event as GAP event has issue when A/V have 
different duration.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=736655]
+
+Signed-off-by: Song Bing b06...@freescale.com
+
+diff --git a/gst/playback/gststreamsynchronizer.c 
b/gst/playback/gststreamsynchronizer.c
+index 3e17c55..ff42d72 100644
+--- a/gst/playback/gststreamsynchronizer.c
 b/gst/playback/gststreamsynchronizer.c
+@@ -488,19 +488,24 @@ gst_stream_synchronizer_sink_event (GstPad * pad, 
GstObject * parent,
+ }
+ g_slist_free (pads);
+   } else {
+-/* if EOS, but no data has passed, then send EOS event */
++/* if EOS, but no data has passed, then send something to replace EOS
++ * for preroll purposes */
+ if (!seen_data) {
+-  GstEvent *gap_event;
++  GstEvent *eos_event;
+ 
+-  gap_event = gst_event_new_eos ();
+-  ret = gst_pad_push_event (srcpad, gap_event);
++  /* FIXME: change to EOS event as GAP event has issue when A/V have
++   * different duration */
++  eos_event = gst_event_new_eos ();
++  ret = gst_pad_push_event (srcpad, eos_event);
+ } else {
+-  GstEvent *gap_event;
++  GstEvent *eos_event;
+ 
+   /* FIXME: Also send a GAP event to let audio sinks start their
+* clock in case they did not have enough data yet */
+-  gap_event = gst_event_new_gap (timestamp, GST_CLOCK_TIME_NONE);
+-  ret = gst_pad_push_event (srcpad, gap_event);
++  /* FIXME: change to EOS event as GAP event has issue when A/V have
++   * different duration */
++  eos_event = gst_event_new_eos ();
++  ret = gst_pad_push_event (srcpad, eos_event);
+ }
+   }
+   gst_object_unref (srcpad);
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch
new file mode 100755
index 000..731be68
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch
@@ -0,0 +1,31 @@
+commit 3f7052aac5e0118a9a9e09fff2f65091be448972
+Author: Song Bing b06...@freescale.com
+Date:   Thu Oct 23 13:35:13 2014 +0800
+
+[streamsynchronizer] One stream can finish playback.
+  
+As changed GAP event EOS event, so EOS will send more times, which will
+cause send function return error.
+Streamsynchronizer will don’t send second track EOS event if send the
+first track EOS return fail. Fixed by ignore the return error.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=736655]
+
+Signed-off-by: Song Bing b06...@freescale.com
+
+diff --git a/gst/playback/gststreamsynchronizer.c 
b/gst/playback/gststreamsynchronizer.c
+index ff42d72..d1732c3 100644
+--- a/gst/playback/gststreamsynchronizer.c
 b/gst/playback/gststreamsynchronizer.c
+@@ -482,7 +482,10 @@ gst_stream_synchronizer_sink_event (GstPad * pad, 
GstObject * parent,
+ while (epad) {
+   pad = epad-data;
+   GST_DEBUG_OBJECT (pad, Pushing EOS);
+-  ret = ret  gst_pad_push_event (pad, gst_event_new_eos ());
++  /* FIXME: remove error check as GAP changed to EOS will send EOS
++   * more times, which will cause return error and then don't send
++   * EOS event to following tracks. */
++  gst_pad_push_event (pad, gst_event_new_eos

[OE-core] [poky][PATCH v8 10/11] gstreamer1.0-plugins-base: Set need_segment after sink pad receive GST_EVENT_SEGMENT

2015-08-09 Thread Yuqing Zhu
Subparse works in push mode, chain funciton will be called once
up stream element finished the seeking and flushing.

If set need_segment flag in src pad event handler, the segment
event will be pushed earlier, result in the subtitle text will
be send out to down stream from the beginning.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...t-need_segment-after-sink-pad-received-GS.patch | 69 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 70 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
new file mode 100644
index 000..7813915
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
@@ -0,0 +1,69 @@
+From ed09c8fd2c9c2b5384b72cc70af3728be6694e64 Mon Sep 17 00:00:00 2001
+From: Mingke Wang mingke.w...@freescale.com
+Date: Thu, 19 Mar 2015 14:20:26 +0800
+Subject: [PATCH 4/4] subparse: set need_segment after sink pad received
+ GST_EVENT_SEGMENT
+
+subparse works in push mode, chain funciton will be called once
+up stream element finished the seeking and flushing.
+if set need_segment flag in src pad event handler, the segment
+event will be pushed earlier, result in the subtitle text will
+be send out to down stream from the beginning.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747498]
+
+Signed-off-by: Mingke Wang mingke.w...@freescale.com
+
+diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c
+old mode 100644
+new mode 100755
+index b565e93..7741ccc
+--- a/gst/subparse/gstsubparse.c
 b/gst/subparse/gstsubparse.c
+@@ -266,22 +266,20 @@ gst_sub_parse_src_event (GstPad * pad, GstObject * 
parent, GstEvent * event)
+ goto beach;
+   }
+ 
++  /* Apply the seek to our segment */
++  gst_segment_do_seek (self-segment, rate, format, flags,
++  start_type, start, stop_type, stop, update);
++
++  GST_DEBUG_OBJECT (self, segment after seek: % GST_SEGMENT_FORMAT,
++  self-segment);
++
+   /* Convert that seek to a seeking in bytes at position 0,
+  FIXME: could use an index */
+   ret = gst_pad_push_event (self-sinkpad,
+   gst_event_new_seek (rate, GST_FORMAT_BYTES, flags,
+   GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, 0));
+ 
+-  if (ret) {
+-/* Apply the seek to our segment */
+-gst_segment_do_seek (self-segment, rate, format, flags,
+-start_type, start, stop_type, stop, update);
+-
+-GST_DEBUG_OBJECT (self, segment after seek: % GST_SEGMENT_FORMAT,
+-self-segment);
+-
+-self-need_segment = TRUE;
+-  } else {
++  if (!ret) {
+ GST_WARNING_OBJECT (self, seek to 0 bytes failed);
+   }
+ 
+@@ -1632,8 +1630,10 @@ gst_sub_parse_sink_event (GstPad * pad, GstObject * 
parent, GstEvent * event)
+   gst_event_parse_segment (event, s);
+   if (s-format == GST_FORMAT_TIME)
+ gst_event_copy_segment (event, self-segment);
+-  GST_DEBUG_OBJECT (self, newsegment (%s),
+-  gst_format_get_name (self-segment.format));
++  GST_DEBUG_OBJECT (self, newsegment (%s) % GST_SEGMENT_FORMAT,
++  gst_format_get_name (self-segment.format), self-segment);
++
++  self-need_segment = TRUE;
+ 
+   /* if not time format, we'll either start with a 0 timestamp anyway or
+* it's following a seek in which case we'll have saved the requested
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index 85e2ad6..ba76bdd 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -20,6 +20,7 @@ SRC_URI += 
file://do-not-change-eos-event-to-gap-event-if.patch \
 
file://0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch \
 
file://0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch \
 file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
+
file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v8 05/11] gstreamer1.0-plugins-base: Keep sticky events around when doing a soft reset

2015-08-09 Thread Yuqing Zhu
The current code will first discard all frames, and then tries to copy
all sticky events from the (now discarded) frames. So change the order.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...p-sticky-events-around-when-doing-a-soft-.patch | 46 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch
new file mode 100644
index 000..b476969
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch
@@ -0,0 +1,46 @@
+From c3f7d36b992a3cbcee3386dea85720f3cb04e1ff Mon Sep 17 00:00:00 2001
+From: Song Bing b06...@freescale.com
+Date: Fri, 27 Mar 2015 13:39:43 +0800
+Subject: [PATCH] videoencoder: Keep sticky events around when doing a soft
+ reset
+
+The current code will first discard all frames, and then tries to copy
+all sticky events from the (now discarded) frames. Let's change the order.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=746865
+
+Upstream-Status: Accepted 
+
+---
+ gst-libs/gst/video/gstvideoencoder.c |8 
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gst-libs/gst/video/gstvideoencoder.c 
b/gst-libs/gst/video/gstvideoencoder.c
+index 614ba2d..4c5b111 100644
+--- a/gst-libs/gst/video/gstvideoencoder.c
 b/gst-libs/gst/video/gstvideoencoder.c
+@@ -340,10 +340,6 @@ gst_video_encoder_reset (GstVideoEncoder * encoder, 
gboolean hard)
+ 
+   priv-drained = TRUE;
+ 
+-  g_list_foreach (priv-frames, (GFunc) gst_video_codec_frame_unref, NULL);
+-  g_list_free (priv-frames);
+-  priv-frames = NULL;
+-
+   priv-bytes = 0;
+   priv-time = 0;
+ 
+@@ -392,6 +388,10 @@ gst_video_encoder_reset (GstVideoEncoder * encoder, 
gboolean hard)
+ encoder-priv-current_frame_events);
+   }
+ 
++  g_list_foreach (priv-frames, (GFunc) gst_video_codec_frame_unref, NULL);
++  g_list_free (priv-frames);
++  priv-frames = NULL;
++
+   GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
+ 
+   return ret;
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index 9c31391..8daf5af 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -14,6 +14,7 @@ SRC_URI += 
file://do-not-change-eos-event-to-gap-event-if.patch \
 file://0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch \
 file://0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch 
\
 
file://0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch \
+
file://videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v8 09/11] gstreamer1.0-plugins-base: Enhance SSA text lines parsing

2015-08-09 Thread Yuqing Zhu
Some parser will pass in the original ssa text line which starts with Dialog:
and there's are maybe multiple Dialog lines in one input buffer.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...3-ssaparse-enhance-SSA-text-lines-parsing.patch | 225 +
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |   1 +
 2 files changed, 226 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
new file mode 100644
index 000..9fbebd5
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
@@ -0,0 +1,225 @@
+From be6163cfa3a255493f9d75bad9541cbfe1723fee Mon Sep 17 00:00:00 2001
+From: Mingke Wang mingke.w...@freescale.com
+Date: Thu, 19 Mar 2015 14:17:10 +0800
+Subject: [PATCH 3/4] ssaparse: enhance SSA text lines parsing.
+
+some parser will pass in the original ssa text line which starts with Dialog:
+and there's are maybe multiple Dialog lines in one input buffer.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747496]
+
+Signed-off-by: Mingke Wang mingke.w...@freescale.com
+
+diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c
+old mode 100644
+new mode 100755
+index 06ecef9..0ab5dce
+--- a/gst/subparse/gstssaparse.c
 b/gst/subparse/gstssaparse.c
+@@ -260,6 +260,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, 
gchar * txt)
+  * gst_ssa_parse_push_line:
+  * @parse: caller element
+  * @txt: text to push
++ * @size: text size need to be parse
+  * @start: timestamp for the buffer
+  * @duration: duration for the buffer
+  *
+@@ -269,27 +270,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * 
parse, gchar * txt)
+  * Returns: result of the push of the created buffer
+  */
+ static GstFlowReturn
+-gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt,
++gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, gint size,
+ GstClockTime start, GstClockTime duration)
+ {
+   GstFlowReturn ret;
+   GstBuffer *buf;
+-  gchar *t, *escaped;
++  gchar *t, *text, *p, *escaped, *p_start, *p_end;
+   gint num, i, len;
++  GstClockTime start_time = G_MAXUINT64, end_time = 0;
+ 
+-  num = atoi (txt);
+-  GST_LOG_OBJECT (parse, Parsing line #%d at % GST_TIME_FORMAT,
+-  num, GST_TIME_ARGS (start));
+-
+-  /* skip all non-text fields before the actual text */
++  p = text = g_malloc(size + 1);
++  *p = '\0';
+   t = txt;
+-  for (i = 0; i  8; ++i) {
+-t = strchr (t, ',');
++
++  /* there are may have multiple dialogue lines at a time */
++  while (*t) {
++/* ignore leading white space characters */
++while (isspace(*t))
++  t++;
++
++/* ignore Format: and Style: lines */
++if (strncmp(t, Format:, 7) == 0 || strncmp(t, Style:, 6) == 0) {
++  while (*t != '\0'  *t != '\n') {
++t++;
++  }
++}
++
++if (*t == '\0')
++  break;
++
++/* continue with next line */
++if (*t == '\n') {
++  t++;
++  continue;
++}
++
++if(strncmp(t, Dialogue:, 9) != 0) {
++  /* not started with Dialogue:, it must be a line trimmed by demuxer */
++  num = atoi (t);
++  GST_LOG_OBJECT (parse, Parsing line #%d at % GST_TIME_FORMAT,
++  num, GST_TIME_ARGS (start));
++
++  /* skip all non-text fields before the actual text */
++  for (i = 0; i  8; ++i) {
++t = strchr (t, ',');
++if (t == NULL)
++  break;
++++t;
++  }
++} else {
++  /* started with Dialogue:, update timestamp and duration */
++  /* time format are like Dialog:Mark,0:00:01.02,0:00:03.04,xx,xxx,... */
++  guint hour, min, sec, msec, len;
++  GstClockTime tmp;
++  gchar t_str[12] = {0};
++
++  /* find the first ',' */
++  p_start = strchr (t, ',');
++  if (p_start)
++p_end = strchr (++p_start, ',');
++
++  if (p_start  p_end) {
++/* copy text between first ',' and second ',' */
++strncpy(t_str, p_start, p_end - p_start);
++if (sscanf (t_str, %u:%u:%u.%u, hour, min, sec, msec) == 4) {
++  tmp = ((hour*3600) + (min*60) + sec) * GST_SECOND + 
msec*GST_MSECOND;
++  GST_DEBUG_OBJECT (parse, Get start time:%02d:%02d:%02d:%03d\n,
++  hour, min, sec, msec);
++  if (start_time  tmp)
++start_time = tmp;
++} else {
++  GST_WARNING_OBJECT (parse,
++  failed to parse ssa start timestamp string :%s, t_str);
++}
++
++p_start = p_end;
++p_end = strchr (++p_start, ',');
++if (p_end) {
++  /* copy text between second ',' and third ',' */
++  strncpy(t_str, p_start, p_end - p_start

[OE-core] [poky][PATCH v8 07/11] gstreamer1.0-plugins-base: Make memory copy when video buffer's memory is read only

2015-08-09 Thread Yuqing Zhu
Detect the memory flag and use gst_buffer_copy_region with GST_BUFFER_COPY_DEEP
parameter to perform deep memory copy.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...rlay-make-memory-copy-when-video-buffer-s.patch | 129 +
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |   1 +
 2 files changed, 130 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch
new file mode 100644
index 000..03dca95
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch
@@ -0,0 +1,129 @@
+From 3781d40940d46d7e6a502092d24aac7997f6da5b Mon Sep 17 00:00:00 2001
+From: Mingke Wang mingke.w...@freescale.com
+Date: Thu, 5 Mar 2015 12:06:23 +0800
+Subject: [PATCH 1/4] basetextoverlay: make memory copy when video buffer's
+ memory is ready only
+
+1. since gst_buffer_make_writable just lookup the refcount to determine if
+   a buffer is writable, and it will use _gst_buffer_copy() which don't
+   perform a deep memory copy even if the flag of a memory is set to
+   GST_MEMORY_FLAG_READONLY. So, we detect the memory flag and use
+   gst_buffer_copy_region with GST_BUFFER_COPY_DEEP parameter to perform
+   deep memory copy. if the allocator of a memory don't support mem_copy
+   interface, the it will return NULL, if this case, we can use
+   gst_buffer_make_writable() to get a shared memory buffer or the orignal
+   buffer if the buffer's refcount is 1.
+2.  new feature is no added if caps has no feature during caps negotiation
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747495]
+
+Signed-off-by: Mingke Wang mingke.w...@freescale.com
+
+diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c
+index c919861..3c0a1d7 100755
+--- a/ext/pango/gstbasetextoverlay.c
 b/ext/pango/gstbasetextoverlay.c
+@@ -747,6 +747,7 @@ gst_base_text_overlay_negotiate (GstBaseTextOverlay * 
overlay, GstCaps * caps)
+ if (f == NULL) {
+   f = gst_caps_features_new
+   (GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, NULL);
++  gst_caps_set_features(overlay_caps, 0, f);
+ } else {
+   gst_caps_features_add (f,
+   GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
+@@ -1890,16 +1891,71 @@ gst_base_text_overlay_push_frame (GstBaseTextOverlay * 
overlay,
+   if (gst_pad_check_reconfigure (overlay-srcpad))
+ gst_base_text_overlay_negotiate (overlay, NULL);
+ 
+-  video_frame = gst_buffer_make_writable (video_frame);
+-
+   if (overlay-attach_compo_to_buffer) {
+ GST_DEBUG_OBJECT (overlay, Attaching text overlay image to video 
buffer);
++video_frame = gst_buffer_make_writable (video_frame);
+ gst_buffer_add_video_overlay_composition_meta (video_frame,
+ overlay-composition);
+ /* FIXME: emulate shaded background box if want_shading=true */
+ goto done;
+   }
+ 
++  gint m = gst_buffer_n_memory(video_frame);
++  gboolean mem_rdonly = FALSE;
++  GstMemory *mem;
++  GstBuffer *orig = video_frame;
++
++  while (--m=0) {
++mem = gst_buffer_get_memory(video_frame, m);
++if (GST_MEMORY_IS_READONLY(mem)) {
++  mem_rdonly = TRUE;
++  gst_memory_unref (mem);
++  break;
++}
++gst_memory_unref (mem);
++  }
++
++  if (mem_rdonly) {
++// since gst_buffer_make_writable just lookup the refcount to determine if
++// a buffer is writable, and it will use _gst_buffer_copy() which don't
++// perform a deep memory copy even if the flag of a memory is set to
++// GST_MEMORY_FLAG_READONLY. So, we detect the memory flag and use
++// gst_buffer_copy_region with GST_BUFFER_COPY_DEEP parameter to perform
++// deep memory copy. if the allocator of a memory don't support mem_copy
++// interface, the it will return NULL, if this case, we can use
++// gst_buffer_make_writable() to get a shared memory buffer or the orignal
++// buffer if the buffer's refcount is 1.
++GstBuffer *new_buf = gst_buffer_copy_region (video_frame,
++GST_BUFFER_COPY_ALL | GST_BUFFER_COPY_DEEP, 0, -1);
++
++GST_DEBUG_OBJECT (overlay, copy %s video frame buffer %p - %p,
++g_type_name (GST_MINI_OBJECT_TYPE (video_frame)), video_frame, 
new_buf);
++
++if (!new_buf) {
++  //maybe the allocator don't support mem_copy interface, the we just use
++  //gst_buffer_make_writable() to get a writable buffer.
++  video_frame = gst_buffer_make_writable (video_frame);
++} else {
++  gst_mini_object_unref (video_frame);
++  GST_BUFFER_FLAG_UNSET (new_buf, GST_BUFFER_FLAG_TAG_MEMORY);
++  video_frame

[OE-core] [poky][PATCH v8 03/11] gstreamer1.0-plugins-base: Update video alignment after video alignment

2015-08-09 Thread Yuqing Zhu
Video buffer pool will update video alignment to respect stride alignment
requirement. But haven't update it to video alignment in configure.
Which will cause user get wrong video alignment.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 .../videobuffer_updata_alignment_update.patch  | 53 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 54 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch
new file mode 100755
index 000..8cfda95
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch
@@ -0,0 +1,53 @@
+commit 88d253ea23b06289df40401160b606323f16c910
+Author: Song Bing b06...@freescale.com
+Date:   Mon Dec 15 09:34:35 2014 +0800
+
+videopool: update video alignment after video alignment
+
+Video buffer pool will update video alignment to respect stride alignment
+requirement. But haven't update it to video alignment in configure.
+Which will cause user get wrong video alignment.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=741501
+
+Upstream-Status: Backport [1.5.1]
+
+Signed-off-by: Song Bing b06...@freescale.com
+diff --git a/gst-libs/gst/video/gstvideopool.c 
b/gst-libs/gst/video/gstvideopool.c
+index 4475f45..acef594 100644
+--- a/gst-libs/gst/video/gstvideopool.c
 b/gst-libs/gst/video/gstvideopool.c
+@@ -167,6 +167,7 @@ video_buffer_pool_set_config (GstBufferPool * pool, 
GstStructure * config)
+ /* get an apply the alignment to the info */
+ gst_buffer_pool_config_get_video_alignment (config, priv-video_align);
+ gst_video_info_align (info, priv-video_align);
++gst_buffer_pool_config_set_video_alignment (config, priv-video_align);
+   }
+   priv-info = info;
+
+diff --git a/sys/ximage/ximagepool.c b/sys/ximage/ximagepool.c
+index 6cc2cfa..6a1cbc9 100644
+--- a/sys/ximage/ximagepool.c
 b/sys/ximage/ximagepool.c
+@@ -597,6 +597,8 @@ ximage_buffer_pool_set_config (GstBufferPool * pool, 
GstStructure * config)
+ /* do padding and alignment */
+ gst_video_info_align (info, priv-align);
+
++gst_buffer_pool_config_set_video_alignment (config, priv-align);
++
+ /* we need the video metadata too now */
+ priv-add_metavideo = TRUE;
+   } else {
+diff --git a/sys/xvimage/xvimagepool.c b/sys/xvimage/xvimagepool.c
+index 244a51a..34b1ab2 100644
+--- a/sys/xvimage/xvimagepool.c
 b/sys/xvimage/xvimagepool.c
+@@ -124,6 +124,8 @@ xvimage_buffer_pool_set_config (GstBufferPool * pool, 
GstStructure * config)
+ /* do padding and alignment */
+ gst_video_info_align (info, priv-align);
+
++gst_buffer_pool_config_set_video_alignment (config, priv-align);
++
+ /* we need the video metadata too now */
+ priv-add_metavideo = TRUE;
+   } else {
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index aa90179..88c3254 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -10,6 +10,7 @@ SRC_URI += 
file://do-not-change-eos-event-to-gap-event-if.patch \
 file://taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \
 file://fix-id3demux-utf16-to-utf8-issue.patch \
 file://handle-audio-video-decoder-error.patch \
+file://videobuffer_updata_alignment_update.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v8 00/11] gstreamer1.0-plugins-base: Add patches for Gstreamer 1.4.5 base

2015-08-09 Thread Yuqing Zhu
-Fix id3demux issue

-Handle audio/video decoder error

-Update video alignment after video alignment

-Gstvideofilter use new GST_VIDEO_FRAME_MAP_FLAG_NO_REF
 Add GST_VIDEO_FRAME_MAP_FLAG_NO_REF, keeping buffer writable
 Don't ref buffers twice when mapping

-Keep sticky events around when doing a soft reset

-gststreamsynchronizer: Sending EOS event instead of GAP event as GAP event has 
issue when A/V have
 different duration.
 Stop sending second track EOS event if sending the first track EOS return fail.

-basetextoverlay: Make memory copy when video buffer's memory is read only.

-gstplaysink: Don't set async of custom text-sink to false.

-ssaparse: Enhance SSA text lines parsing.

-subparse: Set need_segment after sink pad receive GST_EVENT_SEGMENT.

-encodebin: Need more buffers in output queue for better performance.

Yuqing Zhu (11):
  gstreamer1.0-plugins-base: Bug fix for id3demux issue
  gstreamer1.0-plugins-base: Handle audio/video decoder error
  gstreamer1.0-plugins-base: Update video alignment after video
alignment
  gstreamer1.0-plugins-base: Fix output buffer can't writable after
frame_map() issue
  gstreamer1.0-plugins-base: Keep sticky events around when doing a soft
reset
  gstreamer1.0-plugins-base: Do not change EOS event to GAP event
  gstreamer1.0-plugins-base: Make memory copy when video buffer's memory
is read only
  gstreamer1.0-plugins-base: Don't set async of custom text-sink to
false
  gstreamer1.0-plugins-base: Enhance SSA text lines parsing
  gstreamer1.0-plugins-base: Set need_segment after sink pad receive
GST_EVENT_SEGMENT
  gstreamer1.0-plugins-base: Need more buffers in output queue for
better performance

 ...rlay-make-memory-copy-when-video-buffer-s.patch | 129 
 ...rame-Don-t-ref-buffers-twice-when-mapping.patch |  26 +++
 ...-don-t-set-async-of-custom-text-sink-to-f.patch |  31 +++
 ...frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch |  87 
 ...3-ssaparse-enhance-SSA-text-lines-parsing.patch | 225 +
 ...r-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch |  69 +++
 ...t-need_segment-after-sink-pad-received-GS.patch |  69 +++
 .../do-not-change-eos-event-to-gap-event2.patch|  49 +
 .../do-not-change-eos-event-to-gap-event3.patch|  31 +++
 ...eed-more-buffers-in-output-queue-for-bett.patch |  32 +++
 .../fix-id3demux-utf16-to-utf8-issue.patch |  54 +
 .../handle-audio-video-decoder-error.patch |  64 ++
 .../videobuffer_updata_alignment_update.patch  |  53 +
 ...p-sticky-events-around-when-doing-a-soft-.patch |  46 +
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  14 ++
 15 files changed, 979 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v8 04/11] gstreamer1.0-plugins-base: Fix output buffer can't writable after frame_map() issue

2015-08-09 Thread Yuqing Zhu
-Add GST_VIDEO_FRAME_MAP_FLAG_NO_REF
 This makes sure that the buffer is not reffed another time when
 storing it in the GstVideoFrame, keeping it writable if it was writable.

-Use new GST_VIDEO_FRAME_MAP_FLAG_NO_REF to replace the old one because it's 
kind of ugly.

-Don't ref buffers twice when mapping

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...rame-Don-t-ref-buffers-twice-when-mapping.patch | 26 +++
 ...frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch | 87 ++
 ...r-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch | 69 +
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  3 +
 4 files changed, 185 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch
new file mode 100644
index 000..3db4724
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch
@@ -0,0 +1,26 @@
+From 269f642c45d85cfd630ed490478e6bd6b71a767f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= sebast...@centricular.com
+Date: Tue, 16 Sep 2014 01:07:18 +0300
+Subject: [PATCH] video-frame: Don't ref buffers twice when mapping
+
+Upstream-Status: Backport [1.5.1]
+---
+ gst-libs/gst/video/video-frame.c |2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gst-libs/gst/video/video-frame.c 
b/gst-libs/gst/video/video-frame.c
+index 01f23c0..8a9ae96 100644
+--- a/gst-libs/gst/video/video-frame.c
 b/gst-libs/gst/video/video-frame.c
+@@ -105,7 +105,7 @@ gst_video_frame_map_id (GstVideoFrame * frame, 
GstVideoInfo * info,
+   frame-data[i] = frame-map[0].data + info-offset[i];
+ }
+   }
+-  frame-buffer = gst_buffer_ref (buffer);
++  frame-buffer = buffer;
+   if ((flags  GST_VIDEO_FRAME_MAP_FLAG_NO_REF) == 0)
+ gst_buffer_ref (frame-buffer);
+ 
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
new file mode 100644
index 000..c465b5c
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
@@ -0,0 +1,87 @@
+From 40a293d44d1aeccf5eb8e86f23a0b13666111c5c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= sebast...@centricular.com
+Date: Fri, 12 Sep 2014 14:39:16 +0300
+Subject: [PATCH 2/3] video-frame: Add GST_VIDEO_FRAME_MAP_FLAG_NO_REF
+
+This makes sure that the buffer is not reffed another time when
+storing it in the GstVideoFrame, keeping it writable if it was
+writable.
+
+Upstream-Status: Backport [1.5.1]
+https://bugzilla.gnome.org/show_bug.cgi?id=736118
+---
+ gst-libs/gst/video/video-frame.c |9 -
+ gst-libs/gst/video/video-frame.h |   18 ++
+ 2 files changed, 26 insertions(+), 1 deletion(-)
+
+diff --git a/gst-libs/gst/video/video-frame.c 
b/gst-libs/gst/video/video-frame.c
+index 537cf70..01f23c0 100644
+--- a/gst-libs/gst/video/video-frame.c
 b/gst-libs/gst/video/video-frame.c
+@@ -106,6 +106,9 @@ gst_video_frame_map_id (GstVideoFrame * frame, 
GstVideoInfo * info,
+ }
+   }
+   frame-buffer = gst_buffer_ref (buffer);
++  if ((flags  GST_VIDEO_FRAME_MAP_FLAG_NO_REF) == 0)
++gst_buffer_ref (frame-buffer);
++
+   frame-meta = meta;
+ 
+   /* buffer flags enhance the frame flags */
+@@ -189,11 +192,13 @@ gst_video_frame_unmap (GstVideoFrame * frame)
+   GstBuffer *buffer;
+   GstVideoMeta *meta;
+   gint i;
++  GstMapFlags flags;
+ 
+   g_return_if_fail (frame != NULL);
+ 
+   buffer = frame-buffer;
+   meta = frame-meta;
++  flags = frame-map[0].flags;
+ 
+   if (meta) {
+ for (i = 0; i  frame-info.finfo-n_planes; i++) {
+@@ -202,7 +207,9 @@ gst_video_frame_unmap (GstVideoFrame * frame)
+   } else {
+ gst_buffer_unmap (buffer, frame-map[0]);
+   }
+-  gst_buffer_unref (buffer);
++
++  if ((flags  GST_VIDEO_FRAME_MAP_FLAG_NO_REF) == 0)
++gst_buffer_unref (frame-buffer);
+ }
+ 
+ /**
+diff --git a/gst-libs/gst/video/video-frame.h 
b/gst-libs/gst/video/video-frame.h
+index 627fab0..f8e6304 100644
+--- a/gst-libs/gst/video/video-frame.h
 b/gst-libs/gst/video/video-frame.h
+@@ -149,6 +149,24 @@ typedef enum {
+   GST_VIDEO_BUFFER_FLAG_LAST

[OE-core] [poky][PATCH v8 11/11] gstreamer1.0-plugins-base: Need more buffers in output queue for better performance

2015-08-09 Thread Yuqing Zhu
Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...eed-more-buffers-in-output-queue-for-bett.patch | 32 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
new file mode 100644
index 000..3256717
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
@@ -0,0 +1,32 @@
+From 540e02c92c75e08b90326863dc787fa5cadf9da6 Mon Sep 17 00:00:00 2001
+From: Song Bing b06...@freescale.com
+Date: Fri, 13 Mar 2015 18:04:31 +0800
+Subject: [PATCH] encodebin: Need more buffers in output queue for better
+ performance
+
+Need more buffers in output queue for better performance
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=744191]
+
+Signed-off-by: Song Bing b06...@freescale.com
+---
+ gst/encoding/gstencodebin.c |3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c
+index 6728e58..32daae4 100644
+--- a/gst/encoding/gstencodebin.c
 b/gst/encoding/gstencodebin.c
+@@ -1138,8 +1138,7 @@ _create_stream_group (GstEncodeBin * ebin, 
GstEncodingProfile * sprof,
+* We only use a 1buffer long queue here, the actual queueing will be done
+* in the input queue */
+   last = sgroup-outqueue = gst_element_factory_make (queue, NULL);
+-  g_object_set (sgroup-outqueue, max-size-buffers, (guint32) 1,
+-  max-size-bytes, (guint32) 0, max-size-time, (guint64) 0,
++  g_object_set (sgroup-outqueue, max-size-time, (guint64) 0,
+   silent, TRUE, NULL);
+ 
+   gst_bin_add (GST_BIN (ebin), sgroup-outqueue);
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index ba76bdd..b09c2cb 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -21,6 +21,7 @@ SRC_URI += 
file://do-not-change-eos-event-to-gap-event-if.patch \
 
file://0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch \
 file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
 
file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
+file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v8 08/11] gstreamer1.0-plugins-base: Don't set async of custom text-sink to false

2015-08-09 Thread Yuqing Zhu
Setting async to false will lead A/V sync problem when seeking.
The preroll need to use GAP event instead of setting async to false.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...-don-t-set-async-of-custom-text-sink-to-f.patch | 31 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch
new file mode 100644
index 000..39c146a
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch
@@ -0,0 +1,31 @@
+From 0a78555ea6c8c2f1ee27ee4707e8d7aa00ab7a66 Mon Sep 17 00:00:00 2001
+From: Mingke Wang mingke.w...@freescale.com
+Date: Thu, 19 Mar 2015 14:15:25 +0800
+Subject: [PATCH 2/4] gstplaysink: don't set async of custom text-sink to
+ false
+
+set async to false lead to A/V sync problem when seeking.
+the preroll need use GAP event instead of set async to false.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747499]
+
+Signed-off-by: Mingke Wang mingke.w...@freescale.com
+
+diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c
+old mode 100644
+new mode 100755
+index f5a2d42..fba0172
+--- a/gst/playback/gstplaysink.c
 b/gst/playback/gstplaysink.c
+@@ -2408,7 +2408,7 @@ gen_text_chain (GstPlaySink * playsink)
+   G_TYPE_BOOLEAN);
+   if (elem) {
+ /* make sure the sparse subtitles don't participate in the preroll */
+-g_object_set (elem, async, FALSE, NULL);
++//g_object_set (elem, async, FALSE, NULL);
+ GST_DEBUG_OBJECT (playsink, adding custom text sink);
+ gst_bin_add (bin, chain-sink);
+ /* NOTE streamsynchronizer needs streams decoupled */
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index 7aba40d..8d926f3 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -18,6 +18,7 @@ SRC_URI += 
file://do-not-change-eos-event-to-gap-event-if.patch \
 file://do-not-change-eos-event-to-gap-event2.patch \
 file://do-not-change-eos-event-to-gap-event3.patch \
 
file://0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch \
+
file://0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v7 07/11] gstreamer1.0-plugins-base: Add basetextoverlay related patch

2015-08-07 Thread Yuqing Zhu
Make memory copy when video buffer's memory is read only

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...rlay-make-memory-copy-when-video-buffer-s.patch | 129 +
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |   1 +
 2 files changed, 130 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch
new file mode 100644
index 000..03dca95
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch
@@ -0,0 +1,129 @@
+From 3781d40940d46d7e6a502092d24aac7997f6da5b Mon Sep 17 00:00:00 2001
+From: Mingke Wang mingke.w...@freescale.com
+Date: Thu, 5 Mar 2015 12:06:23 +0800
+Subject: [PATCH 1/4] basetextoverlay: make memory copy when video buffer's
+ memory is ready only
+
+1. since gst_buffer_make_writable just lookup the refcount to determine if
+   a buffer is writable, and it will use _gst_buffer_copy() which don't
+   perform a deep memory copy even if the flag of a memory is set to
+   GST_MEMORY_FLAG_READONLY. So, we detect the memory flag and use
+   gst_buffer_copy_region with GST_BUFFER_COPY_DEEP parameter to perform
+   deep memory copy. if the allocator of a memory don't support mem_copy
+   interface, the it will return NULL, if this case, we can use
+   gst_buffer_make_writable() to get a shared memory buffer or the orignal
+   buffer if the buffer's refcount is 1.
+2.  new feature is no added if caps has no feature during caps negotiation
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747495]
+
+Signed-off-by: Mingke Wang mingke.w...@freescale.com
+
+diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c
+index c919861..3c0a1d7 100755
+--- a/ext/pango/gstbasetextoverlay.c
 b/ext/pango/gstbasetextoverlay.c
+@@ -747,6 +747,7 @@ gst_base_text_overlay_negotiate (GstBaseTextOverlay * 
overlay, GstCaps * caps)
+ if (f == NULL) {
+   f = gst_caps_features_new
+   (GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, NULL);
++  gst_caps_set_features(overlay_caps, 0, f);
+ } else {
+   gst_caps_features_add (f,
+   GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
+@@ -1890,16 +1891,71 @@ gst_base_text_overlay_push_frame (GstBaseTextOverlay * 
overlay,
+   if (gst_pad_check_reconfigure (overlay-srcpad))
+ gst_base_text_overlay_negotiate (overlay, NULL);
+ 
+-  video_frame = gst_buffer_make_writable (video_frame);
+-
+   if (overlay-attach_compo_to_buffer) {
+ GST_DEBUG_OBJECT (overlay, Attaching text overlay image to video 
buffer);
++video_frame = gst_buffer_make_writable (video_frame);
+ gst_buffer_add_video_overlay_composition_meta (video_frame,
+ overlay-composition);
+ /* FIXME: emulate shaded background box if want_shading=true */
+ goto done;
+   }
+ 
++  gint m = gst_buffer_n_memory(video_frame);
++  gboolean mem_rdonly = FALSE;
++  GstMemory *mem;
++  GstBuffer *orig = video_frame;
++
++  while (--m=0) {
++mem = gst_buffer_get_memory(video_frame, m);
++if (GST_MEMORY_IS_READONLY(mem)) {
++  mem_rdonly = TRUE;
++  gst_memory_unref (mem);
++  break;
++}
++gst_memory_unref (mem);
++  }
++
++  if (mem_rdonly) {
++// since gst_buffer_make_writable just lookup the refcount to determine if
++// a buffer is writable, and it will use _gst_buffer_copy() which don't
++// perform a deep memory copy even if the flag of a memory is set to
++// GST_MEMORY_FLAG_READONLY. So, we detect the memory flag and use
++// gst_buffer_copy_region with GST_BUFFER_COPY_DEEP parameter to perform
++// deep memory copy. if the allocator of a memory don't support mem_copy
++// interface, the it will return NULL, if this case, we can use
++// gst_buffer_make_writable() to get a shared memory buffer or the orignal
++// buffer if the buffer's refcount is 1.
++GstBuffer *new_buf = gst_buffer_copy_region (video_frame,
++GST_BUFFER_COPY_ALL | GST_BUFFER_COPY_DEEP, 0, -1);
++
++GST_DEBUG_OBJECT (overlay, copy %s video frame buffer %p - %p,
++g_type_name (GST_MINI_OBJECT_TYPE (video_frame)), video_frame, 
new_buf);
++
++if (!new_buf) {
++  //maybe the allocator don't support mem_copy interface, the we just use
++  //gst_buffer_make_writable() to get a writable buffer.
++  video_frame = gst_buffer_make_writable (video_frame);
++} else {
++  gst_mini_object_unref (video_frame);
++  GST_BUFFER_FLAG_UNSET (new_buf, GST_BUFFER_FLAG_TAG_MEMORY);
++  video_frame = new_buf;
++}
++
++if (!video_frame

[OE-core] [poky][PATCH v7 04/11] gstreamer1.0-plugins-base: Add GST_VIDEO_FRAME_MAP_FLAG_NO_REF related patch

2015-08-07 Thread Yuqing Zhu
-Add GST_VIDEO_FRAME_MAP_FLAG_NO_REF
 This makes sure that the buffer is not reffed another time when
 storing it in the GstVideoFrame, keeping it writable if it was writable.

-Use new GST_VIDEO_FRAME_MAP_FLAG_NO_REF to replace the old one because it's 
kind of ugly.

-Don't ref buffers twice when mapping

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...rame-Don-t-ref-buffers-twice-when-mapping.patch | 26 +++
 ...frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch | 87 ++
 ...r-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch | 69 +
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  3 +
 4 files changed, 185 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch
new file mode 100644
index 000..3db4724
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch
@@ -0,0 +1,26 @@
+From 269f642c45d85cfd630ed490478e6bd6b71a767f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= sebast...@centricular.com
+Date: Tue, 16 Sep 2014 01:07:18 +0300
+Subject: [PATCH] video-frame: Don't ref buffers twice when mapping
+
+Upstream-Status: Backport [1.5.1]
+---
+ gst-libs/gst/video/video-frame.c |2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gst-libs/gst/video/video-frame.c 
b/gst-libs/gst/video/video-frame.c
+index 01f23c0..8a9ae96 100644
+--- a/gst-libs/gst/video/video-frame.c
 b/gst-libs/gst/video/video-frame.c
+@@ -105,7 +105,7 @@ gst_video_frame_map_id (GstVideoFrame * frame, 
GstVideoInfo * info,
+   frame-data[i] = frame-map[0].data + info-offset[i];
+ }
+   }
+-  frame-buffer = gst_buffer_ref (buffer);
++  frame-buffer = buffer;
+   if ((flags  GST_VIDEO_FRAME_MAP_FLAG_NO_REF) == 0)
+ gst_buffer_ref (frame-buffer);
+ 
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
new file mode 100644
index 000..c465b5c
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
@@ -0,0 +1,87 @@
+From 40a293d44d1aeccf5eb8e86f23a0b13666111c5c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= sebast...@centricular.com
+Date: Fri, 12 Sep 2014 14:39:16 +0300
+Subject: [PATCH 2/3] video-frame: Add GST_VIDEO_FRAME_MAP_FLAG_NO_REF
+
+This makes sure that the buffer is not reffed another time when
+storing it in the GstVideoFrame, keeping it writable if it was
+writable.
+
+Upstream-Status: Backport [1.5.1]
+https://bugzilla.gnome.org/show_bug.cgi?id=736118
+---
+ gst-libs/gst/video/video-frame.c |9 -
+ gst-libs/gst/video/video-frame.h |   18 ++
+ 2 files changed, 26 insertions(+), 1 deletion(-)
+
+diff --git a/gst-libs/gst/video/video-frame.c 
b/gst-libs/gst/video/video-frame.c
+index 537cf70..01f23c0 100644
+--- a/gst-libs/gst/video/video-frame.c
 b/gst-libs/gst/video/video-frame.c
+@@ -106,6 +106,9 @@ gst_video_frame_map_id (GstVideoFrame * frame, 
GstVideoInfo * info,
+ }
+   }
+   frame-buffer = gst_buffer_ref (buffer);
++  if ((flags  GST_VIDEO_FRAME_MAP_FLAG_NO_REF) == 0)
++gst_buffer_ref (frame-buffer);
++
+   frame-meta = meta;
+ 
+   /* buffer flags enhance the frame flags */
+@@ -189,11 +192,13 @@ gst_video_frame_unmap (GstVideoFrame * frame)
+   GstBuffer *buffer;
+   GstVideoMeta *meta;
+   gint i;
++  GstMapFlags flags;
+ 
+   g_return_if_fail (frame != NULL);
+ 
+   buffer = frame-buffer;
+   meta = frame-meta;
++  flags = frame-map[0].flags;
+ 
+   if (meta) {
+ for (i = 0; i  frame-info.finfo-n_planes; i++) {
+@@ -202,7 +207,9 @@ gst_video_frame_unmap (GstVideoFrame * frame)
+   } else {
+ gst_buffer_unmap (buffer, frame-map[0]);
+   }
+-  gst_buffer_unref (buffer);
++
++  if ((flags  GST_VIDEO_FRAME_MAP_FLAG_NO_REF) == 0)
++gst_buffer_unref (frame-buffer);
+ }
+ 
+ /**
+diff --git a/gst-libs/gst/video/video-frame.h 
b/gst-libs/gst/video/video-frame.h
+index 627fab0..f8e6304 100644
+--- a/gst-libs/gst/video/video-frame.h
 b/gst-libs/gst/video/video-frame.h
+@@ -149,6 +149,24 @@ typedef enum {
+   GST_VIDEO_BUFFER_FLAG_LAST

[OE-core] [poky][PATCH v7 10/11] gstreamer1.0-plugins-base: Add subparse related patch

2015-08-07 Thread Yuqing Zhu
Set need_segment after sink pad receive GST_EVENT_SEGMENT.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...t-need_segment-after-sink-pad-received-GS.patch | 69 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 70 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
new file mode 100644
index 000..7813915
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
@@ -0,0 +1,69 @@
+From ed09c8fd2c9c2b5384b72cc70af3728be6694e64 Mon Sep 17 00:00:00 2001
+From: Mingke Wang mingke.w...@freescale.com
+Date: Thu, 19 Mar 2015 14:20:26 +0800
+Subject: [PATCH 4/4] subparse: set need_segment after sink pad received
+ GST_EVENT_SEGMENT
+
+subparse works in push mode, chain funciton will be called once
+up stream element finished the seeking and flushing.
+if set need_segment flag in src pad event handler, the segment
+event will be pushed earlier, result in the subtitle text will
+be send out to down stream from the beginning.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747498]
+
+Signed-off-by: Mingke Wang mingke.w...@freescale.com
+
+diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c
+old mode 100644
+new mode 100755
+index b565e93..7741ccc
+--- a/gst/subparse/gstsubparse.c
 b/gst/subparse/gstsubparse.c
+@@ -266,22 +266,20 @@ gst_sub_parse_src_event (GstPad * pad, GstObject * 
parent, GstEvent * event)
+ goto beach;
+   }
+ 
++  /* Apply the seek to our segment */
++  gst_segment_do_seek (self-segment, rate, format, flags,
++  start_type, start, stop_type, stop, update);
++
++  GST_DEBUG_OBJECT (self, segment after seek: % GST_SEGMENT_FORMAT,
++  self-segment);
++
+   /* Convert that seek to a seeking in bytes at position 0,
+  FIXME: could use an index */
+   ret = gst_pad_push_event (self-sinkpad,
+   gst_event_new_seek (rate, GST_FORMAT_BYTES, flags,
+   GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, 0));
+ 
+-  if (ret) {
+-/* Apply the seek to our segment */
+-gst_segment_do_seek (self-segment, rate, format, flags,
+-start_type, start, stop_type, stop, update);
+-
+-GST_DEBUG_OBJECT (self, segment after seek: % GST_SEGMENT_FORMAT,
+-self-segment);
+-
+-self-need_segment = TRUE;
+-  } else {
++  if (!ret) {
+ GST_WARNING_OBJECT (self, seek to 0 bytes failed);
+   }
+ 
+@@ -1632,8 +1630,10 @@ gst_sub_parse_sink_event (GstPad * pad, GstObject * 
parent, GstEvent * event)
+   gst_event_parse_segment (event, s);
+   if (s-format == GST_FORMAT_TIME)
+ gst_event_copy_segment (event, self-segment);
+-  GST_DEBUG_OBJECT (self, newsegment (%s),
+-  gst_format_get_name (self-segment.format));
++  GST_DEBUG_OBJECT (self, newsegment (%s) % GST_SEGMENT_FORMAT,
++  gst_format_get_name (self-segment.format), self-segment);
++
++  self-need_segment = TRUE;
+ 
+   /* if not time format, we'll either start with a 0 timestamp anyway or
+* it's following a seek in which case we'll have saved the requested
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index 85e2ad6..ba76bdd 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -20,6 +20,7 @@ SRC_URI += 
file://do-not-change-eos-event-to-gap-event-if.patch \
 
file://0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch \
 
file://0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch \
 file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
+
file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v7 02/11] gstreamer1.0-plugins-base: handle audio/video decoder error

2015-08-07 Thread Yuqing Zhu
When there is input data and no output data to the end of the stream, it will
send GST_ELEMENT_ERROR and quit from playing.
The patch comments the GST_ELEMENT_ERROR() and just add GST_ERROR_OBJECT()
information instead.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 .../handle-audio-video-decoder-error.patch | 64 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 65 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch
new file mode 100755
index 000..833ce72
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch
@@ -0,0 +1,64 @@
+From bcb2b8b6f49e7c66124a4f5e07dea829d5ebfe59 Mon Sep 17 00:00:00 2001
+From: Lyon Wang lyon.w...@freescale.com
+Date: Mon, 15 Dec 2014 16:52:07 +0800
+Subject: [PATCH] handle audio/video decoder error
+
+When there is input data and no output data to the end of the stream, it will
+send GST_ELEMENT_ERROR, So the clips playing will quit.
+However, if only one of the tracks is corrupt, there is no need to quit other
+tracks playing.
+
+The patch comments the GST_ELEMENT_ERROR() and just add GST_ERROR_OBJECT()
+information instead.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=741542]
+
+Signed-off-by: Lyon Wang lyon.w...@freescale.com
+---
+ gst-libs/gst/audio/gstaudiodecoder.c |5 +++--
+ gst-libs/gst/video/gstvideodecoder.c |5 +++--
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+ mode change 100644 = 100755 gst-libs/gst/audio/gstaudiodecoder.c
+ mode change 100644 = 100755 gst-libs/gst/video/gstvideodecoder.c
+
+diff --git a/gst-libs/gst/audio/gstaudiodecoder.c 
b/gst-libs/gst/audio/gstaudiodecoder.c
+old mode 100644
+new mode 100755
+index c2e7a28..891df0a
+--- a/gst-libs/gst/audio/gstaudiodecoder.c
 b/gst-libs/gst/audio/gstaudiodecoder.c
+@@ -2123,9 +2123,10 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * 
dec, GstEvent * event)
+   GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
+ 
+   if (dec-priv-ctx.had_input_data  !dec-priv-ctx.had_output_data) {
+-GST_ELEMENT_ERROR (dec, STREAM, DECODE,
++/* GST_ELEMENT_ERROR (dec, STREAM, DECODE,
+ (No valid frames decoded before end of stream),
+-(no valid frames found));
++(no valid frames found)); */
++GST_ERROR_OBJECT(dec, No valid frames decoded before end of stream);
+   }
+ 
+   /* send taglist if no valid frame is decoded util EOS */
+diff --git a/gst-libs/gst/video/gstvideodecoder.c 
b/gst-libs/gst/video/gstvideodecoder.c
+old mode 100644
+new mode 100755
+index ac581e1..4278bcd
+--- a/gst-libs/gst/video/gstvideodecoder.c
 b/gst-libs/gst/video/gstvideodecoder.c
+@@ -1068,9 +1068,10 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * 
decoder,
+ 
+   /* Error out even if EOS was ok when we had input, but no output */
+   if (ret  priv-had_input_data  !priv-had_output_data) {
+-GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
++/* GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
+ (No valid frames decoded before end of stream),
+-(no valid frames found));
++(no valid frames found)); */
++GST_ERROR_OBJECT(decoder, No valid frames decoded before end of 
stream);
+   }
+ 
+   /* Forward EOS immediately. This is required because no
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index aaa1ecb..aa90179 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -9,6 +9,7 @@ SRC_URI += 
file://do-not-change-eos-event-to-gap-event-if.patch \
 file://get-caps-from-src-pad-when-query-caps.patch \
 file://taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \
 file://fix-id3demux-utf16-to-utf8-issue.patch \
+file://handle-audio-video-decoder-error.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v7 06/11] gstreamer1.0-plugins-base: Add gststreamsynchronizer related patch

2015-08-07 Thread Yuqing Zhu
-Sending EOS event instead of GAP event as GAP event has error if A/V have the 
different duration.

-Stop sending second track EOS event when returing failure after sending the 
first track EOS.
 Fixed by ignoring the return error.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 .../do-not-change-eos-event-to-gap-event2.patch| 49 ++
 .../do-not-change-eos-event-to-gap-event3.patch| 31 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  2 +
 3 files changed, 82 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
new file mode 100755
index 000..f24bc7c
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
@@ -0,0 +1,49 @@
+commit f9536544f5ad182b4f78d0143d1daa45dd64e624
+Author: Song Bing b06...@freescale.com
+Date:   Thu Oct 9 17:37:43 2014 +0800
+
+[gststreamsynchronizer] send EOS event insterd of GAP event as GAP
+event has issue when A/V have different duration.
+
+send EOS event insterd of GAP event as GAP event has issue when A/V have 
different duration.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=736655]
+
+Signed-off-by: Song Bing b06...@freescale.com
+
+diff --git a/gst/playback/gststreamsynchronizer.c 
b/gst/playback/gststreamsynchronizer.c
+index 3e17c55..ff42d72 100644
+--- a/gst/playback/gststreamsynchronizer.c
 b/gst/playback/gststreamsynchronizer.c
+@@ -488,19 +488,24 @@ gst_stream_synchronizer_sink_event (GstPad * pad, 
GstObject * parent,
+ }
+ g_slist_free (pads);
+   } else {
+-/* if EOS, but no data has passed, then send EOS event */
++/* if EOS, but no data has passed, then send something to replace EOS
++ * for preroll purposes */
+ if (!seen_data) {
+-  GstEvent *gap_event;
++  GstEvent *eos_event;
+ 
+-  gap_event = gst_event_new_eos ();
+-  ret = gst_pad_push_event (srcpad, gap_event);
++  /* FIXME: change to EOS event as GAP event has issue when A/V have
++   * different duration */
++  eos_event = gst_event_new_eos ();
++  ret = gst_pad_push_event (srcpad, eos_event);
+ } else {
+-  GstEvent *gap_event;
++  GstEvent *eos_event;
+ 
+   /* FIXME: Also send a GAP event to let audio sinks start their
+* clock in case they did not have enough data yet */
+-  gap_event = gst_event_new_gap (timestamp, GST_CLOCK_TIME_NONE);
+-  ret = gst_pad_push_event (srcpad, gap_event);
++  /* FIXME: change to EOS event as GAP event has issue when A/V have
++   * different duration */
++  eos_event = gst_event_new_eos ();
++  ret = gst_pad_push_event (srcpad, eos_event);
+ }
+   }
+   gst_object_unref (srcpad);
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch
new file mode 100755
index 000..731be68
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch
@@ -0,0 +1,31 @@
+commit 3f7052aac5e0118a9a9e09fff2f65091be448972
+Author: Song Bing b06...@freescale.com
+Date:   Thu Oct 23 13:35:13 2014 +0800
+
+[streamsynchronizer] One stream can finish playback.
+  
+As changed GAP event EOS event, so EOS will send more times, which will
+cause send function return error.
+Streamsynchronizer will don’t send second track EOS event if send the
+first track EOS return fail. Fixed by ignore the return error.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=736655]
+
+Signed-off-by: Song Bing b06...@freescale.com
+
+diff --git a/gst/playback/gststreamsynchronizer.c 
b/gst/playback/gststreamsynchronizer.c
+index ff42d72..d1732c3 100644
+--- a/gst/playback/gststreamsynchronizer.c
 b/gst/playback/gststreamsynchronizer.c
+@@ -482,7 +482,10 @@ gst_stream_synchronizer_sink_event (GstPad * pad, 
GstObject * parent,
+ while (epad) {
+   pad = epad-data;
+   GST_DEBUG_OBJECT (pad, Pushing EOS);
+-  ret = ret  gst_pad_push_event (pad, gst_event_new_eos ());
++  /* FIXME: remove error check as GAP changed to EOS will send EOS
++   * more times, which will cause return error and then don't send
++   * EOS event to following tracks. */
++  gst_pad_push_event (pad, gst_event_new_eos

[OE-core] [poky][PATCH v7 09/11] gstreamer1.0-plugins-base: Add ssaparse related patch

2015-08-07 Thread Yuqing Zhu
Enhance SSA text lines parsing.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...3-ssaparse-enhance-SSA-text-lines-parsing.patch | 225 +
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |   1 +
 2 files changed, 226 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
new file mode 100644
index 000..9fbebd5
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
@@ -0,0 +1,225 @@
+From be6163cfa3a255493f9d75bad9541cbfe1723fee Mon Sep 17 00:00:00 2001
+From: Mingke Wang mingke.w...@freescale.com
+Date: Thu, 19 Mar 2015 14:17:10 +0800
+Subject: [PATCH 3/4] ssaparse: enhance SSA text lines parsing.
+
+some parser will pass in the original ssa text line which starts with Dialog:
+and there's are maybe multiple Dialog lines in one input buffer.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747496]
+
+Signed-off-by: Mingke Wang mingke.w...@freescale.com
+
+diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c
+old mode 100644
+new mode 100755
+index 06ecef9..0ab5dce
+--- a/gst/subparse/gstssaparse.c
 b/gst/subparse/gstssaparse.c
+@@ -260,6 +260,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, 
gchar * txt)
+  * gst_ssa_parse_push_line:
+  * @parse: caller element
+  * @txt: text to push
++ * @size: text size need to be parse
+  * @start: timestamp for the buffer
+  * @duration: duration for the buffer
+  *
+@@ -269,27 +270,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * 
parse, gchar * txt)
+  * Returns: result of the push of the created buffer
+  */
+ static GstFlowReturn
+-gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt,
++gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, gint size,
+ GstClockTime start, GstClockTime duration)
+ {
+   GstFlowReturn ret;
+   GstBuffer *buf;
+-  gchar *t, *escaped;
++  gchar *t, *text, *p, *escaped, *p_start, *p_end;
+   gint num, i, len;
++  GstClockTime start_time = G_MAXUINT64, end_time = 0;
+ 
+-  num = atoi (txt);
+-  GST_LOG_OBJECT (parse, Parsing line #%d at % GST_TIME_FORMAT,
+-  num, GST_TIME_ARGS (start));
+-
+-  /* skip all non-text fields before the actual text */
++  p = text = g_malloc(size + 1);
++  *p = '\0';
+   t = txt;
+-  for (i = 0; i  8; ++i) {
+-t = strchr (t, ',');
++
++  /* there are may have multiple dialogue lines at a time */
++  while (*t) {
++/* ignore leading white space characters */
++while (isspace(*t))
++  t++;
++
++/* ignore Format: and Style: lines */
++if (strncmp(t, Format:, 7) == 0 || strncmp(t, Style:, 6) == 0) {
++  while (*t != '\0'  *t != '\n') {
++t++;
++  }
++}
++
++if (*t == '\0')
++  break;
++
++/* continue with next line */
++if (*t == '\n') {
++  t++;
++  continue;
++}
++
++if(strncmp(t, Dialogue:, 9) != 0) {
++  /* not started with Dialogue:, it must be a line trimmed by demuxer */
++  num = atoi (t);
++  GST_LOG_OBJECT (parse, Parsing line #%d at % GST_TIME_FORMAT,
++  num, GST_TIME_ARGS (start));
++
++  /* skip all non-text fields before the actual text */
++  for (i = 0; i  8; ++i) {
++t = strchr (t, ',');
++if (t == NULL)
++  break;
++++t;
++  }
++} else {
++  /* started with Dialogue:, update timestamp and duration */
++  /* time format are like Dialog:Mark,0:00:01.02,0:00:03.04,xx,xxx,... */
++  guint hour, min, sec, msec, len;
++  GstClockTime tmp;
++  gchar t_str[12] = {0};
++
++  /* find the first ',' */
++  p_start = strchr (t, ',');
++  if (p_start)
++p_end = strchr (++p_start, ',');
++
++  if (p_start  p_end) {
++/* copy text between first ',' and second ',' */
++strncpy(t_str, p_start, p_end - p_start);
++if (sscanf (t_str, %u:%u:%u.%u, hour, min, sec, msec) == 4) {
++  tmp = ((hour*3600) + (min*60) + sec) * GST_SECOND + 
msec*GST_MSECOND;
++  GST_DEBUG_OBJECT (parse, Get start time:%02d:%02d:%02d:%03d\n,
++  hour, min, sec, msec);
++  if (start_time  tmp)
++start_time = tmp;
++} else {
++  GST_WARNING_OBJECT (parse,
++  failed to parse ssa start timestamp string :%s, t_str);
++}
++
++p_start = p_end;
++p_end = strchr (++p_start, ',');
++if (p_end) {
++  /* copy text between second ',' and third ',' */
++  strncpy(t_str, p_start, p_end - p_start);
++  if (sscanf (t_str, %u:%u:%u.%u, hour, min, sec, msec) == 4) {
++tmp = ((hour*3600

[OE-core] [poky][PATCH v7 01/11] gstreamer1.0-plugins-base: Bug fix for id3demux issue

2015-08-07 Thread Yuqing Zhu
Use g_utf16_to_utf8() instead of g_convert to fix the issue that
id3 tags utf16 charaters cannot be extreacted in id3demux when try
to get the id3v2 tag such as TIT2, TALB etc.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 .../fix-id3demux-utf16-to-utf8-issue.patch | 54 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 55 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch
new file mode 100755
index 000..ef3f75f
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch
@@ -0,0 +1,54 @@
+Author: Lyon Wang b12...@freescale.com
+Date:   Thu Oct 9 17:37:43 2014 +0800
+
+[id3v2frames] Bug fix for id3demux issue
+
+Fix the issue that id3 tags utf16 charaters cannot be extreacted in id3demux
+when I tried to get the id3v2 tag such as TIT2, TALB etc. it will return extrac
+failed.
+
+Checked in id3v2frame.c,  When parse the UTF-16 streams, it used g_convert() to
+convert the buffer from UTF-16 to UTF-8, however it will return err that this
+conversion is not supported which cause the extraction failed with these UTF-16
+characters.
+
+In the patch, use g_utf16_to_utf8() instead of g_convert, which can convert the
+character format successfully.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=741144
+
+Upstream-Status: Backport [1.5.1]
+
+Signed-off-by: Lyon Wang b12...@freescale.com
+
+diff --git a/gst-libs/gst/tag/id3v2frames.c b/gst-libs/gst/tag/id3v2frames.c
+old mode 100644
+new mode 100755
+index 3785c2a..7b9d8ac
+--- a/gst-libs/gst/tag/id3v2frames.c
 b/gst-libs/gst/tag/id3v2frames.c
+@@ -1057,14 +1057,17 @@ parse_insert_string_field (guint8 encoding, gchar * 
data, gint data_size,
+ data_size -= 2;
+   }
+ 
+-  field = g_convert (data, data_size, UTF-8, in_encode, NULL, NULL, 
NULL);
+-
+-  if (field == NULL || g_utf8_validate (field, -1, NULL) == FALSE) {
+-/* As a fallback, try interpreting UTF-16 in the other endianness */
+-if (in_encode == utf16beenc)
+-  field = g_convert (data, data_size, UTF-8, utf16leenc,
+-  NULL, NULL, NULL);
++  if (in_encode == utf16beenc) {
++   gunichar2 *data_utf16;
++   guint i;
++   data_utf16 =  (gunichar2 *) data;
++  for (i=0; i(data_size1); i++) {
++data_utf16[i] = GUINT16_TO_LE (data_utf16[i]);
++  }
+   }
++  //field = g_convert (data, data_size, UTF-8, in_encode, NULL, NULL, 
NULL);
++   field = g_utf16_to_utf8((gunichar2 *)data, (glong)(data_size1), 
NULL, NULL, NULL);
++
+ }
+ 
+   break;
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index 11cf8b4..aaa1ecb 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = 
file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
 SRC_URI += file://do-not-change-eos-event-to-gap-event-if.patch \
 file://get-caps-from-src-pad-when-query-caps.patch \
 file://taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \
+file://fix-id3demux-utf16-to-utf8-issue.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v7 03/11] gstreamer1.0-plugins-base: update video alignment after video alignment

2015-08-07 Thread Yuqing Zhu
Video buffer pool will update video alignment to respect stride alignment
requirement. But haven't update it to video alignment in configure.
Which will cause user get wrong video alignment.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 .../videobuffer_updata_alignment_update.patch  | 53 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 54 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch
new file mode 100755
index 000..8cfda95
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch
@@ -0,0 +1,53 @@
+commit 88d253ea23b06289df40401160b606323f16c910
+Author: Song Bing b06...@freescale.com
+Date:   Mon Dec 15 09:34:35 2014 +0800
+
+videopool: update video alignment after video alignment
+
+Video buffer pool will update video alignment to respect stride alignment
+requirement. But haven't update it to video alignment in configure.
+Which will cause user get wrong video alignment.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=741501
+
+Upstream-Status: Backport [1.5.1]
+
+Signed-off-by: Song Bing b06...@freescale.com
+diff --git a/gst-libs/gst/video/gstvideopool.c 
b/gst-libs/gst/video/gstvideopool.c
+index 4475f45..acef594 100644
+--- a/gst-libs/gst/video/gstvideopool.c
 b/gst-libs/gst/video/gstvideopool.c
+@@ -167,6 +167,7 @@ video_buffer_pool_set_config (GstBufferPool * pool, 
GstStructure * config)
+ /* get an apply the alignment to the info */
+ gst_buffer_pool_config_get_video_alignment (config, priv-video_align);
+ gst_video_info_align (info, priv-video_align);
++gst_buffer_pool_config_set_video_alignment (config, priv-video_align);
+   }
+   priv-info = info;
+
+diff --git a/sys/ximage/ximagepool.c b/sys/ximage/ximagepool.c
+index 6cc2cfa..6a1cbc9 100644
+--- a/sys/ximage/ximagepool.c
 b/sys/ximage/ximagepool.c
+@@ -597,6 +597,8 @@ ximage_buffer_pool_set_config (GstBufferPool * pool, 
GstStructure * config)
+ /* do padding and alignment */
+ gst_video_info_align (info, priv-align);
+
++gst_buffer_pool_config_set_video_alignment (config, priv-align);
++
+ /* we need the video metadata too now */
+ priv-add_metavideo = TRUE;
+   } else {
+diff --git a/sys/xvimage/xvimagepool.c b/sys/xvimage/xvimagepool.c
+index 244a51a..34b1ab2 100644
+--- a/sys/xvimage/xvimagepool.c
 b/sys/xvimage/xvimagepool.c
+@@ -124,6 +124,8 @@ xvimage_buffer_pool_set_config (GstBufferPool * pool, 
GstStructure * config)
+ /* do padding and alignment */
+ gst_video_info_align (info, priv-align);
+
++gst_buffer_pool_config_set_video_alignment (config, priv-align);
++
+ /* we need the video metadata too now */
+ priv-add_metavideo = TRUE;
+   } else {
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index aa90179..88c3254 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -10,6 +10,7 @@ SRC_URI += 
file://do-not-change-eos-event-to-gap-event-if.patch \
 file://taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \
 file://fix-id3demux-utf16-to-utf8-issue.patch \
 file://handle-audio-video-decoder-error.patch \
+file://videobuffer_updata_alignment_update.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v7 05/11] gstreamer1.0-plugins-base: Add videoencoder related patch

2015-08-07 Thread Yuqing Zhu
Keep sticky events around when doing a soft reset.
The current code will first discard all frames, and then tries to copy
all sticky events from the (now discarded) frames. So change the order.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...p-sticky-events-around-when-doing-a-soft-.patch | 46 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch
new file mode 100644
index 000..b476969
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch
@@ -0,0 +1,46 @@
+From c3f7d36b992a3cbcee3386dea85720f3cb04e1ff Mon Sep 17 00:00:00 2001
+From: Song Bing b06...@freescale.com
+Date: Fri, 27 Mar 2015 13:39:43 +0800
+Subject: [PATCH] videoencoder: Keep sticky events around when doing a soft
+ reset
+
+The current code will first discard all frames, and then tries to copy
+all sticky events from the (now discarded) frames. Let's change the order.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=746865
+
+Upstream-Status: Accepted 
+
+---
+ gst-libs/gst/video/gstvideoencoder.c |8 
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gst-libs/gst/video/gstvideoencoder.c 
b/gst-libs/gst/video/gstvideoencoder.c
+index 614ba2d..4c5b111 100644
+--- a/gst-libs/gst/video/gstvideoencoder.c
 b/gst-libs/gst/video/gstvideoencoder.c
+@@ -340,10 +340,6 @@ gst_video_encoder_reset (GstVideoEncoder * encoder, 
gboolean hard)
+ 
+   priv-drained = TRUE;
+ 
+-  g_list_foreach (priv-frames, (GFunc) gst_video_codec_frame_unref, NULL);
+-  g_list_free (priv-frames);
+-  priv-frames = NULL;
+-
+   priv-bytes = 0;
+   priv-time = 0;
+ 
+@@ -392,6 +388,10 @@ gst_video_encoder_reset (GstVideoEncoder * encoder, 
gboolean hard)
+ encoder-priv-current_frame_events);
+   }
+ 
++  g_list_foreach (priv-frames, (GFunc) gst_video_codec_frame_unref, NULL);
++  g_list_free (priv-frames);
++  priv-frames = NULL;
++
+   GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
+ 
+   return ret;
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index 9c31391..8daf5af 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -14,6 +14,7 @@ SRC_URI += 
file://do-not-change-eos-event-to-gap-event-if.patch \
 file://0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch \
 file://0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch 
\
 
file://0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch \
+
file://videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v7 00/11] gstreamer1.0-plugins-base: Add patches for Gstreamer 1.4.5 base

2015-08-07 Thread Yuqing Zhu
-Fix id3demux issue

-Handle audio/video decoder error

-Update video alignment after video alignment

-Gstvideofilter use new GST_VIDEO_FRAME_MAP_FLAG_NO_REF
 Add GST_VIDEO_FRAME_MAP_FLAG_NO_REF, keeping buffer writable
 Don't ref buffers twice when mapping

-Keep sticky events around when doing a soft reset

-gststreamsynchronizer: Sending EOS event instead of GAP event as GAP event has 
issue when A/V have
 different duration.
 Stop sending second track EOS event if sending the first track EOS return fail.

-basetextoverlay: Make memory copy when video buffer's memory is read only.

-gstplaysink: Don't set async of custom text-sink to false.

-ssaparse: Enhance SSA text lines parsing.

-subparse: Set need_segment after sink pad receive GST_EVENT_SEGMENT.

-encodebin: Need more buffers in output queue for better performance.

Yuqing Zhu (11):
  gstreamer1.0-plugins-base: Bug fix for id3demux issue
  gstreamer1.0-plugins-base: handle audio/video decoder error
  gstreamer1.0-plugins-base: update video alignment after video
alignment
  gstreamer1.0-plugins-base: Add GST_VIDEO_FRAME_MAP_FLAG_NO_REF related
patch
  gstreamer1.0-plugins-base: Add videoencoder related patch
  gstreamer1.0-plugins-base: Add gststreamsynchronizer related patch
  gstreamer1.0-plugins-base: Add basetextoverlay related patch
  gstreamer1.0-plugins-base: Add gstplaysink related patch
  gstreamer1.0-plugins-base: Add ssaparse related patch
  gstreamer1.0-plugins-base: Add subparse related patch
  gstreamer1.0-plugins-base: Add encodebin related patch

 ...rlay-make-memory-copy-when-video-buffer-s.patch | 129 
 ...rame-Don-t-ref-buffers-twice-when-mapping.patch |  26 +++
 ...-don-t-set-async-of-custom-text-sink-to-f.patch |  31 +++
 ...frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch |  87 
 ...3-ssaparse-enhance-SSA-text-lines-parsing.patch | 225 +
 ...r-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch |  69 +++
 ...t-need_segment-after-sink-pad-received-GS.patch |  69 +++
 .../do-not-change-eos-event-to-gap-event2.patch|  49 +
 .../do-not-change-eos-event-to-gap-event3.patch|  31 +++
 ...eed-more-buffers-in-output-queue-for-bett.patch |  32 +++
 .../fix-id3demux-utf16-to-utf8-issue.patch |  54 +
 .../handle-audio-video-decoder-error.patch |  64 ++
 .../videobuffer_updata_alignment_update.patch  |  53 +
 ...p-sticky-events-around-when-doing-a-soft-.patch |  46 +
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  14 ++
 15 files changed, 979 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v7 08/11] gstreamer1.0-plugins-base: Add gstplaysink related patch

2015-08-07 Thread Yuqing Zhu
Don't set async of custom text-sink to false.
Setting async to false will lead A/V sync problem when seeking.
The preroll need to use GAP event instead of setting async to false.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...-don-t-set-async-of-custom-text-sink-to-f.patch | 31 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch
new file mode 100644
index 000..39c146a
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch
@@ -0,0 +1,31 @@
+From 0a78555ea6c8c2f1ee27ee4707e8d7aa00ab7a66 Mon Sep 17 00:00:00 2001
+From: Mingke Wang mingke.w...@freescale.com
+Date: Thu, 19 Mar 2015 14:15:25 +0800
+Subject: [PATCH 2/4] gstplaysink: don't set async of custom text-sink to
+ false
+
+set async to false lead to A/V sync problem when seeking.
+the preroll need use GAP event instead of set async to false.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747499]
+
+Signed-off-by: Mingke Wang mingke.w...@freescale.com
+
+diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c
+old mode 100644
+new mode 100755
+index f5a2d42..fba0172
+--- a/gst/playback/gstplaysink.c
 b/gst/playback/gstplaysink.c
+@@ -2408,7 +2408,7 @@ gen_text_chain (GstPlaySink * playsink)
+   G_TYPE_BOOLEAN);
+   if (elem) {
+ /* make sure the sparse subtitles don't participate in the preroll */
+-g_object_set (elem, async, FALSE, NULL);
++//g_object_set (elem, async, FALSE, NULL);
+ GST_DEBUG_OBJECT (playsink, adding custom text sink);
+ gst_bin_add (bin, chain-sink);
+ /* NOTE streamsynchronizer needs streams decoupled */
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index 7aba40d..8d926f3 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -18,6 +18,7 @@ SRC_URI += 
file://do-not-change-eos-event-to-gap-event-if.patch \
 file://do-not-change-eos-event-to-gap-event2.patch \
 file://do-not-change-eos-event-to-gap-event3.patch \
 
file://0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch \
+
file://0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v7 11/11] gstreamer1.0-plugins-base: Add encodebin related patch

2015-08-07 Thread Yuqing Zhu
Need more buffers in output queue for better performance.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...eed-more-buffers-in-output-queue-for-bett.patch | 32 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
new file mode 100644
index 000..3256717
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
@@ -0,0 +1,32 @@
+From 540e02c92c75e08b90326863dc787fa5cadf9da6 Mon Sep 17 00:00:00 2001
+From: Song Bing b06...@freescale.com
+Date: Fri, 13 Mar 2015 18:04:31 +0800
+Subject: [PATCH] encodebin: Need more buffers in output queue for better
+ performance
+
+Need more buffers in output queue for better performance
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=744191]
+
+Signed-off-by: Song Bing b06...@freescale.com
+---
+ gst/encoding/gstencodebin.c |3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c
+index 6728e58..32daae4 100644
+--- a/gst/encoding/gstencodebin.c
 b/gst/encoding/gstencodebin.c
+@@ -1138,8 +1138,7 @@ _create_stream_group (GstEncodeBin * ebin, 
GstEncodingProfile * sprof,
+* We only use a 1buffer long queue here, the actual queueing will be done
+* in the input queue */
+   last = sgroup-outqueue = gst_element_factory_make (queue, NULL);
+-  g_object_set (sgroup-outqueue, max-size-buffers, (guint32) 1,
+-  max-size-bytes, (guint32) 0, max-size-time, (guint64) 0,
++  g_object_set (sgroup-outqueue, max-size-time, (guint64) 0,
+   silent, TRUE, NULL);
+ 
+   gst_bin_add (GST_BIN (ebin), sgroup-outqueue);
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index ba76bdd..b09c2cb 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -21,6 +21,7 @@ SRC_URI += 
file://do-not-change-eos-event-to-gap-event-if.patch \
 
file://0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch \
 file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
 
file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
+file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v6 0/3] Add patches for Gstreamer 1.4.5 base

2015-08-06 Thread Yuqing Zhu
Fix issue about gstreamer1.0-plugins-base

-ssaparse: Enhance SSA text lines parsing.

-subparse: Set need_segment after sink pad receive GST_EVENT_SEGMENT.

-encodebin: Need more buffers in output queue for better performance.


Yuqing Zhu (3):
  gstreamer1.0-plugins-base: Add ssaparse related patch
  gstreamer1.0-plugins-base: Add subparse related patch
  gstreamer1.0-plugins-base: Add encodebin related patch

 ...3-ssaparse-enhance-SSA-text-lines-parsing.patch | 225 +
 ...t-need_segment-after-sink-pad-received-GS.patch |  69 +++
 ...eed-more-buffers-in-output-queue-for-bett.patch |  32 +++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |   3 +
 4 files changed, 329 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v6 2/3] gstreamer1.0-plugins-base: Add subparse related patch

2015-08-06 Thread Yuqing Zhu
Set need_segment after sink pad receive GST_EVENT_SEGMENT.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...t-need_segment-after-sink-pad-received-GS.patch | 69 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 70 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
new file mode 100644
index 000..7813915
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
@@ -0,0 +1,69 @@
+From ed09c8fd2c9c2b5384b72cc70af3728be6694e64 Mon Sep 17 00:00:00 2001
+From: Mingke Wang mingke.w...@freescale.com
+Date: Thu, 19 Mar 2015 14:20:26 +0800
+Subject: [PATCH 4/4] subparse: set need_segment after sink pad received
+ GST_EVENT_SEGMENT
+
+subparse works in push mode, chain funciton will be called once
+up stream element finished the seeking and flushing.
+if set need_segment flag in src pad event handler, the segment
+event will be pushed earlier, result in the subtitle text will
+be send out to down stream from the beginning.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747498]
+
+Signed-off-by: Mingke Wang mingke.w...@freescale.com
+
+diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c
+old mode 100644
+new mode 100755
+index b565e93..7741ccc
+--- a/gst/subparse/gstsubparse.c
 b/gst/subparse/gstsubparse.c
+@@ -266,22 +266,20 @@ gst_sub_parse_src_event (GstPad * pad, GstObject * 
parent, GstEvent * event)
+ goto beach;
+   }
+ 
++  /* Apply the seek to our segment */
++  gst_segment_do_seek (self-segment, rate, format, flags,
++  start_type, start, stop_type, stop, update);
++
++  GST_DEBUG_OBJECT (self, segment after seek: % GST_SEGMENT_FORMAT,
++  self-segment);
++
+   /* Convert that seek to a seeking in bytes at position 0,
+  FIXME: could use an index */
+   ret = gst_pad_push_event (self-sinkpad,
+   gst_event_new_seek (rate, GST_FORMAT_BYTES, flags,
+   GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, 0));
+ 
+-  if (ret) {
+-/* Apply the seek to our segment */
+-gst_segment_do_seek (self-segment, rate, format, flags,
+-start_type, start, stop_type, stop, update);
+-
+-GST_DEBUG_OBJECT (self, segment after seek: % GST_SEGMENT_FORMAT,
+-self-segment);
+-
+-self-need_segment = TRUE;
+-  } else {
++  if (!ret) {
+ GST_WARNING_OBJECT (self, seek to 0 bytes failed);
+   }
+ 
+@@ -1632,8 +1630,10 @@ gst_sub_parse_sink_event (GstPad * pad, GstObject * 
parent, GstEvent * event)
+   gst_event_parse_segment (event, s);
+   if (s-format == GST_FORMAT_TIME)
+ gst_event_copy_segment (event, self-segment);
+-  GST_DEBUG_OBJECT (self, newsegment (%s),
+-  gst_format_get_name (self-segment.format));
++  GST_DEBUG_OBJECT (self, newsegment (%s) % GST_SEGMENT_FORMAT,
++  gst_format_get_name (self-segment.format), self-segment);
++
++  self-need_segment = TRUE;
+ 
+   /* if not time format, we'll either start with a 0 timestamp anyway or
+* it's following a seek in which case we'll have saved the requested
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index 85e2ad6..ba76bdd 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -20,6 +20,7 @@ SRC_URI += 
file://do-not-change-eos-event-to-gap-event-if.patch \
 
file://0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch \
 
file://0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch \
 file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
+
file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v6 3/3] gstreamer1.0-plugins-base: Add encodebin related patch

2015-08-06 Thread Yuqing Zhu
Need more buffers in output queue for better performance.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...eed-more-buffers-in-output-queue-for-bett.patch | 32 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
new file mode 100644
index 000..3256717
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
@@ -0,0 +1,32 @@
+From 540e02c92c75e08b90326863dc787fa5cadf9da6 Mon Sep 17 00:00:00 2001
+From: Song Bing b06...@freescale.com
+Date: Fri, 13 Mar 2015 18:04:31 +0800
+Subject: [PATCH] encodebin: Need more buffers in output queue for better
+ performance
+
+Need more buffers in output queue for better performance
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=744191]
+
+Signed-off-by: Song Bing b06...@freescale.com
+---
+ gst/encoding/gstencodebin.c |3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c
+index 6728e58..32daae4 100644
+--- a/gst/encoding/gstencodebin.c
 b/gst/encoding/gstencodebin.c
+@@ -1138,8 +1138,7 @@ _create_stream_group (GstEncodeBin * ebin, 
GstEncodingProfile * sprof,
+* We only use a 1buffer long queue here, the actual queueing will be done
+* in the input queue */
+   last = sgroup-outqueue = gst_element_factory_make (queue, NULL);
+-  g_object_set (sgroup-outqueue, max-size-buffers, (guint32) 1,
+-  max-size-bytes, (guint32) 0, max-size-time, (guint64) 0,
++  g_object_set (sgroup-outqueue, max-size-time, (guint64) 0,
+   silent, TRUE, NULL);
+ 
+   gst_bin_add (GST_BIN (ebin), sgroup-outqueue);
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index ba76bdd..b09c2cb 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -21,6 +21,7 @@ SRC_URI += 
file://do-not-change-eos-event-to-gap-event-if.patch \
 
file://0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch \
 file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
 
file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
+file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v6 1/3] gstreamer1.0-plugins-base: Add ssaparse related patch

2015-08-06 Thread Yuqing Zhu
Enhance SSA text lines parsing.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...3-ssaparse-enhance-SSA-text-lines-parsing.patch | 225 +
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |   1 +
 2 files changed, 226 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
new file mode 100644
index 000..9fbebd5
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
@@ -0,0 +1,225 @@
+From be6163cfa3a255493f9d75bad9541cbfe1723fee Mon Sep 17 00:00:00 2001
+From: Mingke Wang mingke.w...@freescale.com
+Date: Thu, 19 Mar 2015 14:17:10 +0800
+Subject: [PATCH 3/4] ssaparse: enhance SSA text lines parsing.
+
+some parser will pass in the original ssa text line which starts with Dialog:
+and there's are maybe multiple Dialog lines in one input buffer.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747496]
+
+Signed-off-by: Mingke Wang mingke.w...@freescale.com
+
+diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c
+old mode 100644
+new mode 100755
+index 06ecef9..0ab5dce
+--- a/gst/subparse/gstssaparse.c
 b/gst/subparse/gstssaparse.c
+@@ -260,6 +260,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, 
gchar * txt)
+  * gst_ssa_parse_push_line:
+  * @parse: caller element
+  * @txt: text to push
++ * @size: text size need to be parse
+  * @start: timestamp for the buffer
+  * @duration: duration for the buffer
+  *
+@@ -269,27 +270,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * 
parse, gchar * txt)
+  * Returns: result of the push of the created buffer
+  */
+ static GstFlowReturn
+-gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt,
++gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, gint size,
+ GstClockTime start, GstClockTime duration)
+ {
+   GstFlowReturn ret;
+   GstBuffer *buf;
+-  gchar *t, *escaped;
++  gchar *t, *text, *p, *escaped, *p_start, *p_end;
+   gint num, i, len;
++  GstClockTime start_time = G_MAXUINT64, end_time = 0;
+ 
+-  num = atoi (txt);
+-  GST_LOG_OBJECT (parse, Parsing line #%d at % GST_TIME_FORMAT,
+-  num, GST_TIME_ARGS (start));
+-
+-  /* skip all non-text fields before the actual text */
++  p = text = g_malloc(size + 1);
++  *p = '\0';
+   t = txt;
+-  for (i = 0; i  8; ++i) {
+-t = strchr (t, ',');
++
++  /* there are may have multiple dialogue lines at a time */
++  while (*t) {
++/* ignore leading white space characters */
++while (isspace(*t))
++  t++;
++
++/* ignore Format: and Style: lines */
++if (strncmp(t, Format:, 7) == 0 || strncmp(t, Style:, 6) == 0) {
++  while (*t != '\0'  *t != '\n') {
++t++;
++  }
++}
++
++if (*t == '\0')
++  break;
++
++/* continue with next line */
++if (*t == '\n') {
++  t++;
++  continue;
++}
++
++if(strncmp(t, Dialogue:, 9) != 0) {
++  /* not started with Dialogue:, it must be a line trimmed by demuxer */
++  num = atoi (t);
++  GST_LOG_OBJECT (parse, Parsing line #%d at % GST_TIME_FORMAT,
++  num, GST_TIME_ARGS (start));
++
++  /* skip all non-text fields before the actual text */
++  for (i = 0; i  8; ++i) {
++t = strchr (t, ',');
++if (t == NULL)
++  break;
++++t;
++  }
++} else {
++  /* started with Dialogue:, update timestamp and duration */
++  /* time format are like Dialog:Mark,0:00:01.02,0:00:03.04,xx,xxx,... */
++  guint hour, min, sec, msec, len;
++  GstClockTime tmp;
++  gchar t_str[12] = {0};
++
++  /* find the first ',' */
++  p_start = strchr (t, ',');
++  if (p_start)
++p_end = strchr (++p_start, ',');
++
++  if (p_start  p_end) {
++/* copy text between first ',' and second ',' */
++strncpy(t_str, p_start, p_end - p_start);
++if (sscanf (t_str, %u:%u:%u.%u, hour, min, sec, msec) == 4) {
++  tmp = ((hour*3600) + (min*60) + sec) * GST_SECOND + 
msec*GST_MSECOND;
++  GST_DEBUG_OBJECT (parse, Get start time:%02d:%02d:%02d:%03d\n,
++  hour, min, sec, msec);
++  if (start_time  tmp)
++start_time = tmp;
++} else {
++  GST_WARNING_OBJECT (parse,
++  failed to parse ssa start timestamp string :%s, t_str);
++}
++
++p_start = p_end;
++p_end = strchr (++p_start, ',');
++if (p_end) {
++  /* copy text between second ',' and third ',' */
++  strncpy(t_str, p_start, p_end - p_start);
++  if (sscanf (t_str, %u:%u:%u.%u, hour, min, sec, msec) == 4) {
++tmp = ((hour*3600

[OE-core] [poky][PATCH v5] pulseaudio: Revert launch: Avoid specifically starting PA and rely on autospawn/socket activation

2015-07-30 Thread Yuqing Zhu
Pulseaudio is always started by autospawn, which is there is default process in 
system,
it will start the pulseaudio daemon and the session is always exist, so 
pulseaudio daemon will be closed.

But in yocto, pulseaudio only can be started by boot up script, there is no 
process to start the pulseaudio daemon.
But this patch remove the starting PA in script, then pulseaudio will be 
started in yocto.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...ch-Avoid-specifically-starting-PA-and-rel.patch | 31 ++
 .../pulseaudio/pulseaudio_6.0.bb   |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 
meta/recipes-multimedia/pulseaudio/pulseaudio/0002-Revert-launch-Avoid-specifically-starting-PA-and-rel.patch

diff --git 
a/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-Revert-launch-Avoid-specifically-starting-PA-and-rel.patch
 
b/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-Revert-launch-Avoid-specifically-starting-PA-and-rel.patch
new file mode 100644
index 000..669c355
--- /dev/null
+++ 
b/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-Revert-launch-Avoid-specifically-starting-PA-and-rel.patch
@@ -0,0 +1,31 @@
+From 5760c6b1a3c9b6dd8e70c9d1ea78fcf192250b4a Mon Sep 17 00:00:00 2001
+From: Shengjiu Wang shengjiu.w...@freescale.com
+Date: Mon, 16 Mar 2015 15:30:11 +0800
+Subject: [PATCH] Revert launch: Avoid specifically starting PA and rely on
+ autospawn/socket activation
+
+This reverts commit 42156d2b5ac797e5f28f8d0d38b691053f3f6fc7.
+
+Upstream-Status: Pending 
+
+Signed-off-by: shengjiu.wang b02...@freescale.com
+---
+ src/daemon/start-pulseaudio-x11.in |2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/daemon/start-pulseaudio-x11.in 
b/src/daemon/start-pulseaudio-x11.in
+index 16e46b1..e108645 100755
+--- a/src/daemon/start-pulseaudio-x11.in
 b/src/daemon/start-pulseaudio-x11.in
+@@ -17,6 +17,8 @@
+ 
+ set -e
+ 
++@PA_BINARY@ --start $@
++
+ if [ x$DISPLAY != x ] ; then
+ 
+ @PACTL_BINARY@ load-module module-x11-publish display=$DISPLAY  
/dev/null
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb 
b/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb
index 31e9096..10c3d7a 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb
@@ -6,6 +6,7 @@ SRC_URI = 
http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
file://0001-conf-parser-add-support-for-.d-directories.patch \
file://fix-git-version-gen.patch \
file://volatiles.04_pulse \
+   
file://0002-Revert-launch-Avoid-specifically-starting-PA-and-rel.patch \
 
 SRC_URI[md5sum] = b691e83b7434c678dffacfa3a027750e
 SRC_URI[sha256sum] = 
b50640e0b80b1607600accfad2e45aabb79d379bf6354c9671efa2065477f6f6
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v5 2/3] gstreamer1.0-plugins-base: Add basetextoverlay related patch

2015-07-30 Thread Yuqing Zhu
Make memory copy when video buffer's memory is read only

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...rlay-make-memory-copy-when-video-buffer-s.patch | 129 +
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |   1 +
 2 files changed, 130 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch
new file mode 100644
index 000..03dca95
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch
@@ -0,0 +1,129 @@
+From 3781d40940d46d7e6a502092d24aac7997f6da5b Mon Sep 17 00:00:00 2001
+From: Mingke Wang mingke.w...@freescale.com
+Date: Thu, 5 Mar 2015 12:06:23 +0800
+Subject: [PATCH 1/4] basetextoverlay: make memory copy when video buffer's
+ memory is ready only
+
+1. since gst_buffer_make_writable just lookup the refcount to determine if
+   a buffer is writable, and it will use _gst_buffer_copy() which don't
+   perform a deep memory copy even if the flag of a memory is set to
+   GST_MEMORY_FLAG_READONLY. So, we detect the memory flag and use
+   gst_buffer_copy_region with GST_BUFFER_COPY_DEEP parameter to perform
+   deep memory copy. if the allocator of a memory don't support mem_copy
+   interface, the it will return NULL, if this case, we can use
+   gst_buffer_make_writable() to get a shared memory buffer or the orignal
+   buffer if the buffer's refcount is 1.
+2.  new feature is no added if caps has no feature during caps negotiation
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747495]
+
+Signed-off-by: Mingke Wang mingke.w...@freescale.com
+
+diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c
+index c919861..3c0a1d7 100755
+--- a/ext/pango/gstbasetextoverlay.c
 b/ext/pango/gstbasetextoverlay.c
+@@ -747,6 +747,7 @@ gst_base_text_overlay_negotiate (GstBaseTextOverlay * 
overlay, GstCaps * caps)
+ if (f == NULL) {
+   f = gst_caps_features_new
+   (GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, NULL);
++  gst_caps_set_features(overlay_caps, 0, f);
+ } else {
+   gst_caps_features_add (f,
+   GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
+@@ -1890,16 +1891,71 @@ gst_base_text_overlay_push_frame (GstBaseTextOverlay * 
overlay,
+   if (gst_pad_check_reconfigure (overlay-srcpad))
+ gst_base_text_overlay_negotiate (overlay, NULL);
+ 
+-  video_frame = gst_buffer_make_writable (video_frame);
+-
+   if (overlay-attach_compo_to_buffer) {
+ GST_DEBUG_OBJECT (overlay, Attaching text overlay image to video 
buffer);
++video_frame = gst_buffer_make_writable (video_frame);
+ gst_buffer_add_video_overlay_composition_meta (video_frame,
+ overlay-composition);
+ /* FIXME: emulate shaded background box if want_shading=true */
+ goto done;
+   }
+ 
++  gint m = gst_buffer_n_memory(video_frame);
++  gboolean mem_rdonly = FALSE;
++  GstMemory *mem;
++  GstBuffer *orig = video_frame;
++
++  while (--m=0) {
++mem = gst_buffer_get_memory(video_frame, m);
++if (GST_MEMORY_IS_READONLY(mem)) {
++  mem_rdonly = TRUE;
++  gst_memory_unref (mem);
++  break;
++}
++gst_memory_unref (mem);
++  }
++
++  if (mem_rdonly) {
++// since gst_buffer_make_writable just lookup the refcount to determine if
++// a buffer is writable, and it will use _gst_buffer_copy() which don't
++// perform a deep memory copy even if the flag of a memory is set to
++// GST_MEMORY_FLAG_READONLY. So, we detect the memory flag and use
++// gst_buffer_copy_region with GST_BUFFER_COPY_DEEP parameter to perform
++// deep memory copy. if the allocator of a memory don't support mem_copy
++// interface, the it will return NULL, if this case, we can use
++// gst_buffer_make_writable() to get a shared memory buffer or the orignal
++// buffer if the buffer's refcount is 1.
++GstBuffer *new_buf = gst_buffer_copy_region (video_frame,
++GST_BUFFER_COPY_ALL | GST_BUFFER_COPY_DEEP, 0, -1);
++
++GST_DEBUG_OBJECT (overlay, copy %s video frame buffer %p - %p,
++g_type_name (GST_MINI_OBJECT_TYPE (video_frame)), video_frame, 
new_buf);
++
++if (!new_buf) {
++  //maybe the allocator don't support mem_copy interface, the we just use
++  //gst_buffer_make_writable() to get a writable buffer.
++  video_frame = gst_buffer_make_writable (video_frame);
++} else {
++  gst_mini_object_unref (video_frame);
++  GST_BUFFER_FLAG_UNSET (new_buf, GST_BUFFER_FLAG_TAG_MEMORY);
++  video_frame = new_buf;
++}
++
++if (!video_frame

[OE-core] [poky][PATCH v5 0/3] gstreamer1.0-plugins-base: Add patches for Gstreamer 1.4.5 base

2015-07-30 Thread Yuqing Zhu
Fix issue about gstreamer1.0-plugins-base

-gststreamsynchronizer: Sending EOS event instead of GAP event as GAP event has 
issue when A/V have
 different duration.
 Stop sending second track EOS event if sending the first track EOS return fail.

-basetextoverlay: Make memory copy when video buffer's memory is read only.

-gstplaysink: Don't set async of custom text-sink to false.

Yuqing Zhu (3):
  gstreamer1.0-plugins-base: Add gststreamsynchronizer related patch
  gstreamer1.0-plugins-base: Add basetextoverlay related patch
  gstreamer1.0-plugins-base: Add gstplaysink related patch

 ...rlay-make-memory-copy-when-video-buffer-s.patch | 129 +
 ...-don-t-set-async-of-custom-text-sink-to-f.patch |  31 +
 .../do-not-change-eos-event-to-gap-event2.patch|  49 
 .../do-not-change-eos-event-to-gap-event3.patch|  31 +
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |   4 +
 5 files changed, 244 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v5 1/3] gstreamer1.0-plugins-base: Add gststreamsynchronizer related patch

2015-07-30 Thread Yuqing Zhu
-Sending EOS event instead of GAP event as GAP event has error if A/V have the 
different duration.

-Stop sending second track EOS event when returing failure after sending the 
first track EOS.
 Fixed by ignoring the return error.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 .../do-not-change-eos-event-to-gap-event2.patch| 49 ++
 .../do-not-change-eos-event-to-gap-event3.patch| 31 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  2 +
 3 files changed, 82 insertions(+)
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
new file mode 100755
index 000..f24bc7c
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
@@ -0,0 +1,49 @@
+commit f9536544f5ad182b4f78d0143d1daa45dd64e624
+Author: Song Bing b06...@freescale.com
+Date:   Thu Oct 9 17:37:43 2014 +0800
+
+[gststreamsynchronizer] send EOS event insterd of GAP event as GAP
+event has issue when A/V have different duration.
+
+send EOS event insterd of GAP event as GAP event has issue when A/V have 
different duration.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=736655]
+
+Signed-off-by: Song Bing b06...@freescale.com
+
+diff --git a/gst/playback/gststreamsynchronizer.c 
b/gst/playback/gststreamsynchronizer.c
+index 3e17c55..ff42d72 100644
+--- a/gst/playback/gststreamsynchronizer.c
 b/gst/playback/gststreamsynchronizer.c
+@@ -488,19 +488,24 @@ gst_stream_synchronizer_sink_event (GstPad * pad, 
GstObject * parent,
+ }
+ g_slist_free (pads);
+   } else {
+-/* if EOS, but no data has passed, then send EOS event */
++/* if EOS, but no data has passed, then send something to replace EOS
++ * for preroll purposes */
+ if (!seen_data) {
+-  GstEvent *gap_event;
++  GstEvent *eos_event;
+ 
+-  gap_event = gst_event_new_eos ();
+-  ret = gst_pad_push_event (srcpad, gap_event);
++  /* FIXME: change to EOS event as GAP event has issue when A/V have
++   * different duration */
++  eos_event = gst_event_new_eos ();
++  ret = gst_pad_push_event (srcpad, eos_event);
+ } else {
+-  GstEvent *gap_event;
++  GstEvent *eos_event;
+ 
+   /* FIXME: Also send a GAP event to let audio sinks start their
+* clock in case they did not have enough data yet */
+-  gap_event = gst_event_new_gap (timestamp, GST_CLOCK_TIME_NONE);
+-  ret = gst_pad_push_event (srcpad, gap_event);
++  /* FIXME: change to EOS event as GAP event has issue when A/V have
++   * different duration */
++  eos_event = gst_event_new_eos ();
++  ret = gst_pad_push_event (srcpad, eos_event);
+ }
+   }
+   gst_object_unref (srcpad);
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch
new file mode 100755
index 000..731be68
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch
@@ -0,0 +1,31 @@
+commit 3f7052aac5e0118a9a9e09fff2f65091be448972
+Author: Song Bing b06...@freescale.com
+Date:   Thu Oct 23 13:35:13 2014 +0800
+
+[streamsynchronizer] One stream can finish playback.
+  
+As changed GAP event EOS event, so EOS will send more times, which will
+cause send function return error.
+Streamsynchronizer will don’t send second track EOS event if send the
+first track EOS return fail. Fixed by ignore the return error.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=736655]
+
+Signed-off-by: Song Bing b06...@freescale.com
+
+diff --git a/gst/playback/gststreamsynchronizer.c 
b/gst/playback/gststreamsynchronizer.c
+index ff42d72..d1732c3 100644
+--- a/gst/playback/gststreamsynchronizer.c
 b/gst/playback/gststreamsynchronizer.c
+@@ -482,7 +482,10 @@ gst_stream_synchronizer_sink_event (GstPad * pad, 
GstObject * parent,
+ while (epad) {
+   pad = epad-data;
+   GST_DEBUG_OBJECT (pad, Pushing EOS);
+-  ret = ret  gst_pad_push_event (pad, gst_event_new_eos ());
++  /* FIXME: remove error check as GAP changed to EOS will send EOS
++   * more times, which will cause return error and then don't send
++   * EOS event to following tracks. */
++  gst_pad_push_event (pad, gst_event_new_eos

[OE-core] [poky][PATCH v5 3/3] gstreamer1.0-plugins-base: Add gstplaysink related patch

2015-07-30 Thread Yuqing Zhu
Don't set async of custom text-sink to false.
Setting async to false will lead A/V sync problem when seeking.
The preroll need to use GAP event instead of setting async to false.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...-don-t-set-async-of-custom-text-sink-to-f.patch | 31 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch
new file mode 100644
index 000..39c146a
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch
@@ -0,0 +1,31 @@
+From 0a78555ea6c8c2f1ee27ee4707e8d7aa00ab7a66 Mon Sep 17 00:00:00 2001
+From: Mingke Wang mingke.w...@freescale.com
+Date: Thu, 19 Mar 2015 14:15:25 +0800
+Subject: [PATCH 2/4] gstplaysink: don't set async of custom text-sink to
+ false
+
+set async to false lead to A/V sync problem when seeking.
+the preroll need use GAP event instead of set async to false.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747499]
+
+Signed-off-by: Mingke Wang mingke.w...@freescale.com
+
+diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c
+old mode 100644
+new mode 100755
+index f5a2d42..fba0172
+--- a/gst/playback/gstplaysink.c
 b/gst/playback/gstplaysink.c
+@@ -2408,7 +2408,7 @@ gen_text_chain (GstPlaySink * playsink)
+   G_TYPE_BOOLEAN);
+   if (elem) {
+ /* make sure the sparse subtitles don't participate in the preroll */
+-g_object_set (elem, async, FALSE, NULL);
++//g_object_set (elem, async, FALSE, NULL);
+ GST_DEBUG_OBJECT (playsink, adding custom text sink);
+ gst_bin_add (bin, chain-sink);
+ /* NOTE streamsynchronizer needs streams decoupled */
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index 7aba40d..8d926f3 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -18,6 +18,7 @@ SRC_URI += 
file://do-not-change-eos-event-to-gap-event-if.patch \
 file://do-not-change-eos-event-to-gap-event2.patch \
 file://do-not-change-eos-event-to-gap-event3.patch \
 
file://0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch \
+
file://0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v5] pulseaudio

2015-07-30 Thread Yuqing Zhu
Remove the starting PA in script, then pulseaudio will be started in yocto.

Yuqing Zhu (1):
  pulseaudio: Revert launch: Avoid specifically starting PA and rely on
autospawn/socket activation

 ...ch-Avoid-specifically-starting-PA-and-rel.patch | 31 ++
 .../pulseaudio/pulseaudio_6.0.bb   |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 
meta/recipes-multimedia/pulseaudio/pulseaudio/0002-Revert-launch-Avoid-specifically-starting-PA-and-rel.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v4] pulseaudio

2015-07-29 Thread Yuqing Zhu
Fix no process to open pulseaudio in yocto. 

Yuqing Zhu (1):
  pulseaudio: revert commit 42156d2b5ac797e5f28f8d0d38b691053f3f6fc7

 ...ch-Avoid-specifically-starting-PA-and-rel.patch | 31 ++
 .../pulseaudio/pulseaudio_6.0.bb   |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 
meta/recipes-multimedia/pulseaudio/pulseaudio/0002-Revert-launch-Avoid-specifically-starting-PA-and-rel.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v4] pulseaudio: revert commit 42156d2b5ac797e5f28f8d0d38b691053f3f6fc7

2015-07-29 Thread Yuqing Zhu
Revert launch: Avoid specifically starting PA and rely on autospawn/socket 
activation
or the pulseaudio can't be opened in yocto.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...ch-Avoid-specifically-starting-PA-and-rel.patch | 31 ++
 .../pulseaudio/pulseaudio_6.0.bb   |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 
meta/recipes-multimedia/pulseaudio/pulseaudio/0002-Revert-launch-Avoid-specifically-starting-PA-and-rel.patch

diff --git 
a/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-Revert-launch-Avoid-specifically-starting-PA-and-rel.patch
 
b/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-Revert-launch-Avoid-specifically-starting-PA-and-rel.patch
new file mode 100644
index 000..669c355
--- /dev/null
+++ 
b/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-Revert-launch-Avoid-specifically-starting-PA-and-rel.patch
@@ -0,0 +1,31 @@
+From 5760c6b1a3c9b6dd8e70c9d1ea78fcf192250b4a Mon Sep 17 00:00:00 2001
+From: Shengjiu Wang shengjiu.w...@freescale.com
+Date: Mon, 16 Mar 2015 15:30:11 +0800
+Subject: [PATCH] Revert launch: Avoid specifically starting PA and rely on
+ autospawn/socket activation
+
+This reverts commit 42156d2b5ac797e5f28f8d0d38b691053f3f6fc7.
+
+Upstream-Status: Pending 
+
+Signed-off-by: shengjiu.wang b02...@freescale.com
+---
+ src/daemon/start-pulseaudio-x11.in |2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/daemon/start-pulseaudio-x11.in 
b/src/daemon/start-pulseaudio-x11.in
+index 16e46b1..e108645 100755
+--- a/src/daemon/start-pulseaudio-x11.in
 b/src/daemon/start-pulseaudio-x11.in
+@@ -17,6 +17,8 @@
+ 
+ set -e
+ 
++@PA_BINARY@ --start $@
++
+ if [ x$DISPLAY != x ] ; then
+ 
+ @PACTL_BINARY@ load-module module-x11-publish display=$DISPLAY  
/dev/null
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb 
b/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb
index 31e9096..10c3d7a 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb
@@ -6,6 +6,7 @@ SRC_URI = 
http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
file://0001-conf-parser-add-support-for-.d-directories.patch \
file://fix-git-version-gen.patch \
file://volatiles.04_pulse \
+   
file://0002-Revert-launch-Avoid-specifically-starting-PA-and-rel.patch \
 
 SRC_URI[md5sum] = b691e83b7434c678dffacfa3a027750e
 SRC_URI[sha256sum] = 
b50640e0b80b1607600accfad2e45aabb79d379bf6354c9671efa2065477f6f6
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v4 5/5] gstreamer1.0-plugins-base: Add videoencoder related patch

2015-07-29 Thread Yuqing Zhu
Keep sticky events around when doing a soft reset.
The current code will first discard all frames, and then tries to copy
all sticky events from the (now discarded) frames. So change the order.

Signed-off-by: Yuqing Zhu b54...@freescale.com
---
 ...p-sticky-events-around-when-doing-a-soft-.patch | 46 ++
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch

diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch
 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch
new file mode 100644
index 000..b476969
--- /dev/null
+++ 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch
@@ -0,0 +1,46 @@
+From c3f7d36b992a3cbcee3386dea85720f3cb04e1ff Mon Sep 17 00:00:00 2001
+From: Song Bing b06...@freescale.com
+Date: Fri, 27 Mar 2015 13:39:43 +0800
+Subject: [PATCH] videoencoder: Keep sticky events around when doing a soft
+ reset
+
+The current code will first discard all frames, and then tries to copy
+all sticky events from the (now discarded) frames. Let's change the order.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=746865
+
+Upstream-Status: Backport [1.5.1] 
+
+---
+ gst-libs/gst/video/gstvideoencoder.c |8 
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gst-libs/gst/video/gstvideoencoder.c 
b/gst-libs/gst/video/gstvideoencoder.c
+index 614ba2d..4c5b111 100644
+--- a/gst-libs/gst/video/gstvideoencoder.c
 b/gst-libs/gst/video/gstvideoencoder.c
+@@ -340,10 +340,6 @@ gst_video_encoder_reset (GstVideoEncoder * encoder, 
gboolean hard)
+ 
+   priv-drained = TRUE;
+ 
+-  g_list_foreach (priv-frames, (GFunc) gst_video_codec_frame_unref, NULL);
+-  g_list_free (priv-frames);
+-  priv-frames = NULL;
+-
+   priv-bytes = 0;
+   priv-time = 0;
+ 
+@@ -392,6 +388,10 @@ gst_video_encoder_reset (GstVideoEncoder * encoder, 
gboolean hard)
+ encoder-priv-current_frame_events);
+   }
+ 
++  g_list_foreach (priv-frames, (GFunc) gst_video_codec_frame_unref, NULL);
++  g_list_free (priv-frames);
++  priv-frames = NULL;
++
+   GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
+ 
+   return ret;
+-- 
+1.7.9.5
+
diff --git 
a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index 9c31391..8daf5af 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -14,6 +14,7 @@ SRC_URI += 
file://do-not-change-eos-event-to-gap-event-if.patch \
 file://0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch \
 file://0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch 
\
 
file://0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch \
+
file://videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch \
 
 
 SRC_URI[md5sum] = 357165af625c0ca353ab47c5d843920e
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [poky][PATCH v4 0/5] gstreamer1.0-plugins-base: Add patches for Gstreamer 1.4.5 base

2015-07-29 Thread Yuqing Zhu
Fix id3demux issue

Handle audio/video decoder error

Update video alignment after video alignment

Gstvideofilter use new GST_VIDEO_FRAME_MAP_FLAG_NO_REF
Add GST_VIDEO_FRAME_MAP_FLAG_NO_REF, keeping buffer writable
Don't ref buffers twice when mapping

Keep sticky events around when doing a soft reset

Yuqing Zhu (5):
  gstreamer1.0-plugins-base: Bug fix for id3demux issue
  gstreamer1.0-plugins-base: handle audio/video decoder error
  gstreamer1.0-plugins-base: update video alignment after video
alignment
  gstreamer1.0-plugins-base: Add GST_VIDEO_FRAME_MAP_FLAG_NO_REF related
patch
  gstreamer1.0-plugins-base: Add videoencoder related patch

 ...rame-Don-t-ref-buffers-twice-when-mapping.patch | 26 +++
 ...frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch | 87 ++
 ...r-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch | 69 +
 .../fix-id3demux-utf16-to-utf8-issue.patch | 54 ++
 .../handle-audio-video-decoder-error.patch | 64 
 .../videobuffer_updata_alignment_update.patch  | 53 +
 ...p-sticky-events-around-when-doing-a-soft-.patch | 46 
 .../gstreamer/gstreamer1.0-plugins-base_1.4.5.bb   |  7 ++
 8 files changed, 406 insertions(+)
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch
 create mode 100755 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


  1   2   >