All of lore.kernel.org
 help / color / mirror / Atom feed
* [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4
@ 2017-05-15  8:52 Yuqing Zhu
  2017-05-15  8:52 ` [poky][PATCH 1/6] gstreamer1.0-plugins-bad: Add some enhancements for qmlglsrc Yuqing Zhu
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Yuqing Zhu @ 2017-05-15  8:52 UTC (permalink / raw)
  To: openembedded-core; +Cc: 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



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [poky][PATCH 1/6] gstreamer1.0-plugins-bad: Add some enhancements for qmlglsrc
  2017-05-15  8:52 [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4 Yuqing Zhu
@ 2017-05-15  8:52 ` Yuqing Zhu
  2017-05-15  8:52 ` [poky][PATCH 2/6] gstreamer1.0-plugins-bad: Add configuration for enabling accurate seeks Yuqing Zhu
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Yuqing Zhu @ 2017-05-15  8:52 UTC (permalink / raw)
  To: openembedded-core; +Cc: 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.zhu@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 0000000..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.hu@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.hu@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, &frames_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 <QtCore/QDateTime>
+ #include <QtCore/QRunnable>
+ #include <QtGui/QGuiApplication>
+ #include <QtQuick/QQuickWindow>
+@@ -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 (&this->priv->lock);
+ 
++  static volatile gsize once = 0;
++  if (g_once_init_enter(&once)) {
++    this->priv->start = QDateTime::currentDateTime().toMSecsSinceEpoch();
++    g_once_init_leave(&once,1);
++  }
++
+   if (!fbo && !this->priv->useDefaultFbo) {
+ 
+     width = source->width();
+@@ -157,6 +166,10 @@ QtGLWindow::beforeRendering()
+           QOpenGLFramebufferObject::NoAttachment, GL_TEXTURE_2D, GL_RGBA));
+ 
+     source->setRenderTarget(fbo.data());
++  } else if (this->priv->useDefaultFbo) {
++    GST_DEBUG ("use default fbo for renderTargetId");
++    fbo.reset(NULL);
++    source->setRenderTarget(NULL);
+   }
+ 
+   g_mutex_unlock (&this->priv->lock);
+@@ -256,9 +269,14 @@ QtGLWindow::aboutToQuit()
+   this->priv->quit = TRUE;
+   g_cond_signal (&this->priv->update_cond);
+ 
+-  g_mutex_unlock (&this->priv->lock);
++  this->priv->stop = QDateTime::currentDateTime().toMSecsSinceEpoch();
++  qint64 duration = this->priv->stop - this->priv->start;
++  float fps = ((float)this->priv->frames_rendered / duration * 1000);
++
++  GST_DEBUG("about to quit, total refresh frames (%lld) in (%0.3f) seconds, fps: %0.3f",
++      this->priv->frames_rendered, (float)duration / 1000, fps);
+ 
+-  GST_DEBUG("about to quit");
++  g_mutex_unlock (&this->priv->lock);
+ }
+ 
+ void
+@@ -410,15 +428,3 @@ qt_window_use_default_fbo (QtGLWindow * qt_window, gboolean useDefaultFbo)
+ 
+   g_mutex_unlock (&qt_window->priv->lock);
+ }
+-
+-void
+-qt_window_get_total_frames (QtGLWindow * qt_window, guint64 *frames)
+-{
+-  g_return_if_fail (qt_window != NULL);
+-
+-  g_mutex_lock (&qt_window->priv->lock);
+-
+-  *frames = qt_window->priv->frames_rendered;
+-
+-  g_mutex_unlock (&qt_window->priv->lock);
+-}
+diff --git a/ext/qt/qtwindow.h b/ext/qt/qtwindow.h
+index 8cb5a2c..697f389 100644
+--- a/ext/qt/qtwindow.h
++++ b/ext/qt/qtwindow.h
+@@ -65,7 +65,6 @@ GstGLContext *  qt_window_get_qt_context (QtGLWindow * qt_window);
+ GstGLDisplay *  qt_window_get_display (QtGLWindow * qt_window);
+ gboolean        qt_window_is_scenegraph_initialized (QtGLWindow * qt_window);
+ void            qt_window_use_default_fbo (QtGLWindow * qt_window, gboolean useDefaultFbo);
+-void            qt_window_get_total_frames (QtGLWindow * qt_window, guint64 *frames);
+ }
+ 
+ #endif /* __QT_WINDOW_H__ */
+-- 
+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 0bb4053..a5fc913 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
@@ -18,6 +18,7 @@ SRC_URI = " \
     file://0001-smoothstreaming-implement-adaptivedemux-s-get_live_s.patch \
     file://0001-smoothstreaming-use-the-duration-from-the-list-of-fr.patch \
     file://0001-mssdemux-improved-live-playback-support.patch \
+    file://0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch \
 "
 SRC_URI[md5sum] = "2757103e57a096a1a05b3ab85b8381af"
 SRC_URI[sha256sum] = "23ddae506b3a223b94869a0d3eea3e9a12e847f94d2d0e0b97102ce13ecd6966"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [poky][PATCH 2/6] gstreamer1.0-plugins-bad: Add configuration for enabling accurate seeks
  2017-05-15  8:52 [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4 Yuqing Zhu
  2017-05-15  8:52 ` [poky][PATCH 1/6] gstreamer1.0-plugins-bad: Add some enhancements for qmlglsrc Yuqing Zhu
@ 2017-05-15  8:52 ` Yuqing Zhu
  2017-05-15  8:52 ` [poky][PATCH 3/6] gstreamer1.0-plugins-bad: Add get track number media info API Yuqing Zhu
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Yuqing Zhu @ 2017-05-15  8:52 UTC (permalink / raw)
  To: openembedded-core; +Cc: Yuqing Zhu

Signed-off-by: Yuqing Zhu <carol.zhu@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 0000000..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.wang@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
++
+ <SUBSECTION Standard>
+ 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, &accurate, NULL);
++
++  return accurate;
++}
+diff --git a/gst-libs/gst/player/gstplayer.h b/gst-libs/gst/player/gstplayer.h
+index 0ac66be..8426be5 100644
+--- a/gst-libs/gst/player/gstplayer.h
++++ b/gst-libs/gst/player/gstplayer.h
+@@ -202,6 +202,9 @@ void           gst_player_config_set_position_update_interval  (GstStructure * c
+                                                                 guint          interval);
+ guint          gst_player_config_get_position_update_interval  (const GstStructure * config);
+ 
++void           gst_player_config_set_seek_accurate (GstPlayer * player, gboolean accurate);
++gboolean       gst_player_config_get_seek_accurate (const GstStructure * config);
++
+ G_END_DECLS
+ 
+ #endif /* __GST_PLAYER_H__ */
+-- 
+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 a5fc913..6655a86 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
@@ -19,6 +19,7 @@ SRC_URI = " \
     file://0001-smoothstreaming-use-the-duration-from-the-list-of-fr.patch \
     file://0001-mssdemux-improved-live-playback-support.patch \
     file://0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch \
+    file://0003-player-Add-configuration-for-enabling-accurate-seeks.patch \
 "
 SRC_URI[md5sum] = "2757103e57a096a1a05b3ab85b8381af"
 SRC_URI[sha256sum] = "23ddae506b3a223b94869a0d3eea3e9a12e847f94d2d0e0b97102ce13ecd6966"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [poky][PATCH 3/6] gstreamer1.0-plugins-bad: Add get track number media info API
  2017-05-15  8:52 [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4 Yuqing Zhu
  2017-05-15  8:52 ` [poky][PATCH 1/6] gstreamer1.0-plugins-bad: Add some enhancements for qmlglsrc Yuqing Zhu
  2017-05-15  8:52 ` [poky][PATCH 2/6] gstreamer1.0-plugins-bad: Add configuration for enabling accurate seeks Yuqing Zhu
@ 2017-05-15  8:52 ` Yuqing Zhu
  2017-05-15  8:52 ` [poky][PATCH 4/6] gstreamer1.0-plugins-bad: Add overlayvideorenderer video sink Yuqing Zhu
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Yuqing Zhu @ 2017-05-15  8:52 UTC (permalink / raw)
  To: openembedded-core; +Cc: Yuqing Zhu

Signed-off-by: Yuqing Zhu <carol.zhu@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 0000000..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 573142bb46ea5ffff78bf0672923553877c9726c Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.wang@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_player_get_subtitle_streams
+                 (const GstPlayerMediaInfo *info);
++guint         gst_player_media_info_get_number_of_subtitle_streams
++                (const GstPlayerMediaInfo *info);
+ GstTagList*   gst_player_media_info_get_tags
+                 (const GstPlayerMediaInfo *info);
+ const gchar*  gst_player_media_info_get_title
+-- 
+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 6655a86..732fc2d 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
@@ -20,6 +20,7 @@ SRC_URI = " \
     file://0001-mssdemux-improved-live-playback-support.patch \
     file://0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch \
     file://0003-player-Add-configuration-for-enabling-accurate-seeks.patch \
+    file://0004-player-Add-get-track-number-media-info-API.patch \
 "
 SRC_URI[md5sum] = "2757103e57a096a1a05b3ab85b8381af"
 SRC_URI[sha256sum] = "23ddae506b3a223b94869a0d3eea3e9a12e847f94d2d0e0b97102ce13ecd6966"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [poky][PATCH 4/6] gstreamer1.0-plugins-bad: Add overlayvideorenderer video sink
  2017-05-15  8:52 [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4 Yuqing Zhu
                   ` (2 preceding siblings ...)
  2017-05-15  8:52 ` [poky][PATCH 3/6] gstreamer1.0-plugins-bad: Add get track number media info API Yuqing Zhu
@ 2017-05-15  8:52 ` Yuqing Zhu
  2017-05-15  8:52 ` [poky][PATCH 5/6] gstreamer1.0-plugins-bad: Fix gst-player failed to load external subtitle uri Yuqing Zhu
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Yuqing Zhu @ 2017-05-15  8:52 UTC (permalink / raw)
  To: openembedded-core; +Cc: 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.zhu@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 0000000..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.wang@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.wang@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 (self->video_overlay, self->x,
+         self->y, self->width, self->height);
+ 
+-  return NULL;
++  return self->video_sink;
+ }
+ 
+ static void
+@@ -193,6 +212,23 @@ gst_player_video_overlay_video_renderer_new (gpointer window_handle)
+ }
+ 
+ /**
++ * gst_player_video_overlay_video_renderer_new_with_sink:
++ * @window_handle: (allow-none): Window handle to use or %NULL
++ * @video_sink:  the custom video_sink to be set for the video renderer
++ *
++ * Returns: (transfer full):
++ *
++ * Since 1.12
++ */
++GstPlayerVideoRenderer *
++gst_player_video_overlay_video_renderer_new_with_sink (gpointer window_handle,
++    GstElement * video_sink)
++{
++  return g_object_new (GST_TYPE_PLAYER_VIDEO_OVERLAY_VIDEO_RENDERER,
++      "window-handle", window_handle, "video-sink", video_sink, NULL);
++}
++
++/**
+  * gst_player_video_overlay_video_renderer_set_window_handle:
+  * @self: #GstPlayerVideoRenderer instance
+  * @window_handle: handle referencing to the platform specific window
+diff --git a/gst-libs/gst/player/gstplayer-video-overlay-video-renderer.h b/gst-libs/gst/player/gstplayer-video-overlay-video-renderer.h
+index be09113..8a96e84 100644
+--- a/gst-libs/gst/player/gstplayer-video-overlay-video-renderer.h
++++ b/gst-libs/gst/player/gstplayer-video-overlay-video-renderer.h
+@@ -41,6 +41,7 @@ typedef struct _GstPlayerVideoOverlayVideoRendererClass
+ 
+ GType gst_player_video_overlay_video_renderer_get_type (void);
+ GstPlayerVideoRenderer * gst_player_video_overlay_video_renderer_new (gpointer window_handle);
++GstPlayerVideoRenderer * gst_player_video_overlay_video_renderer_new_with_sink (gpointer window_handle, GstElement * video_sink);
+ void gst_player_video_overlay_video_renderer_set_window_handle (GstPlayerVideoOverlayVideoRenderer * self, gpointer window_handle);
+ gpointer gst_player_video_overlay_video_renderer_get_window_handle (GstPlayerVideoOverlayVideoRenderer * self);
+ 
+-- 
+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 732fc2d..82cd91c 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
@@ -21,6 +21,7 @@ SRC_URI = " \
     file://0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch \
     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 \
 "
 SRC_URI[md5sum] = "2757103e57a096a1a05b3ab85b8381af"
 SRC_URI[sha256sum] = "23ddae506b3a223b94869a0d3eea3e9a12e847f94d2d0e0b97102ce13ecd6966"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [poky][PATCH 5/6] gstreamer1.0-plugins-bad: Fix gst-player failed to load external subtitle uri
  2017-05-15  8:52 [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4 Yuqing Zhu
                   ` (3 preceding siblings ...)
  2017-05-15  8:52 ` [poky][PATCH 4/6] gstreamer1.0-plugins-bad: Add overlayvideorenderer video sink Yuqing Zhu
@ 2017-05-15  8:52 ` Yuqing Zhu
  2017-05-15  8:52 ` [poky][PATCH 6/6] gstreamer1.0-plugins-bad: Fix memory leak when use a GValue in glupload Yuqing Zhu
  2017-05-15 11:37 ` [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4 Jussi Kukkonen
  6 siblings, 0 replies; 12+ messages in thread
From: Yuqing Zhu @ 2017-05-15  8:52 UTC (permalink / raw)
  To: openembedded-core; +Cc: 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.zhu@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 0000000..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.hu@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.hu@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 (&self->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 (&self->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



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [poky][PATCH 6/6] gstreamer1.0-plugins-bad: Fix memory leak when use a GValue in glupload
  2017-05-15  8:52 [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4 Yuqing Zhu
                   ` (4 preceding siblings ...)
  2017-05-15  8:52 ` [poky][PATCH 5/6] gstreamer1.0-plugins-bad: Fix gst-player failed to load external subtitle uri Yuqing Zhu
@ 2017-05-15  8:52 ` Yuqing Zhu
  2017-05-15 11:37 ` [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4 Jussi Kukkonen
  6 siblings, 0 replies; 12+ messages in thread
From: Yuqing Zhu @ 2017-05-15  8:52 UTC (permalink / raw)
  To: openembedded-core; +Cc: Yuqing Zhu

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

Signed-off-by: Yuqing Zhu <carol.zhu@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 0000000..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.hu@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 (&targets, target_mask);
+   gst_caps_set_value (target, "texture-target", &targets);
++  g_value_unset(&targets);
+ 
+   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



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4
  2017-05-15  8:52 [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4 Yuqing Zhu
                   ` (5 preceding siblings ...)
  2017-05-15  8:52 ` [poky][PATCH 6/6] gstreamer1.0-plugins-bad: Fix memory leak when use a GValue in glupload Yuqing Zhu
@ 2017-05-15 11:37 ` Jussi Kukkonen
  2017-05-15 11:42   ` Alexander Kanavin
  2017-05-16  7:13   ` Carol Zhu
  6 siblings, 2 replies; 12+ messages in thread
From: Jussi Kukkonen @ 2017-05-15 11:37 UTC (permalink / raw)
  To: Yuqing Zhu; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 689 bytes --]

On 15 May 2017 at 11:52, Yuqing Zhu <carol.zhu@nxp.com> wrote:

> -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
>

These all seem to be backports from 1.12 or earlier. Maxin is currently
working on upgrading the GStreamer stack to to 1.12 so these probably do
not make sense for master.

The patches could be considered for Pyro (not too fond of backported new
features though -- I don't think oe-core should normally do that).

Jussi

[-- Attachment #2: Type: text/html, Size: 1077 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4
  2017-05-15 11:37 ` [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4 Jussi Kukkonen
@ 2017-05-15 11:42   ` Alexander Kanavin
  2017-05-22 10:13     ` Carol Zhu
  2017-05-16  7:13   ` Carol Zhu
  1 sibling, 1 reply; 12+ messages in thread
From: Alexander Kanavin @ 2017-05-15 11:42 UTC (permalink / raw)
  To: Yuqing Zhu; +Cc: Patches and discussions about the oe-core layer

On 05/15/2017 02:37 PM, Jussi Kukkonen wrote:

> The patches could be considered for Pyro (not too fond of backported new
> features though -- I don't think oe-core should normally do that).

Yes; you do need to explain why these are useful to oe-core users in 
general.

There's a ton of gstreamer bugfixes that can be backported in a similar 
way, so why these and not the others?


Alex


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4
  2017-05-15 11:37 ` [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4 Jussi Kukkonen
  2017-05-15 11:42   ` Alexander Kanavin
@ 2017-05-16  7:13   ` Carol Zhu
  1 sibling, 0 replies; 12+ messages in thread
From: Carol Zhu @ 2017-05-16  7:13 UTC (permalink / raw)
  To: Jussi Kukkonen; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1799 bytes --]

Hi Jussi,

Thanks for your reply.

These six patches are all backports.
And they are just some enhancements and bug fix.

- 0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch
   Add enhancement for qmlglsrc.

- 0003-player-Add-configuration-for-enabling-accurate-seeks.patch
- 0004-player-Add-get-track-number-media-info-API.patch
- 0005-player-Add-overlayvideorenderer-video-sink.patch
- 0006-gst-player-fix-gst-player-failed-to-load-external-su.patch
  And enhancement and bug fix for gst-player.

   - 0007-glupload-fix-memory-leak-when-use-a-GVal.patch
      Bug fix.

   Now that Maxin is working on upgrading the GStreamer stack to V1.12 in master, Could you please help to review them and put them into Pyro if they are qualified?
   Thanks~



B.R.
Carol

From: Jussi Kukkonen [mailto:jussi.kukkonen@intel.com]
Sent: Monday, May 15, 2017 7:38 PM
To: Carol Zhu <carol.zhu@nxp.com>
Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4

On 15 May 2017 at 11:52, Yuqing Zhu <carol.zhu@nxp.com<mailto:carol.zhu@nxp.com>> wrote:
-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

These all seem to be backports from 1.12 or earlier. Maxin is currently working on upgrading the GStreamer stack to to 1.12 so these probably do not make sense for master.

The patches could be considered for Pyro (not too fond of backported new features though -- I don't think oe-core should normally do that).

Jussi


[-- Attachment #2: Type: text/html, Size: 13413 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4
  2017-05-15 11:42   ` Alexander Kanavin
@ 2017-05-22 10:13     ` Carol Zhu
  2017-05-22 13:15       ` Alexander Kanavin
  0 siblings, 1 reply; 12+ messages in thread
From: Carol Zhu @ 2017-05-22 10:13 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Patches and discussions about the oe-core layer

Hi Alex,

Here are some explanations.

- 0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch
  Two 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.
  It adds some common features for qmlglsrc to make app development much easier.

- 0003-player-Add-configuration-for-enabling-accurate-seeks.patch
- 0004-player-Add-get-track-number-media-info-API.patch
- 0005-player-Add-overlayvideorenderer-video-sink.patch
- 0006-gst-player-fix-gst-player-failed-to-load-external-su.patch
  These are gstplayer related patches.
  And by above gstplayer backport patches, we enhanced some API to make it much easier to use for users. 
  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.

- 0007-glupload-fix-memory-leak-when-use-a-GVal.patch
  This patch fixes a memory leak issue in glupload, which is common.



B.R.
Carol


-----Original Message-----
From: Alexander Kanavin [mailto:alexander.kanavin@linux.intel.com] 
Sent: Monday, May 15, 2017 7:42 PM
To: Carol Zhu <carol.zhu@nxp.com>
Cc: Jussi Kukkonen <jussi.kukkonen@intel.com>; Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4

On 05/15/2017 02:37 PM, Jussi Kukkonen wrote:

> The patches could be considered for Pyro (not too fond of backported 
> new features though -- I don't think oe-core should normally do that).

Yes; you do need to explain why these are useful to oe-core users in general.

There's a ton of gstreamer bugfixes that can be backported in a similar way, so why these and not the others?


Alex


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4
  2017-05-22 10:13     ` Carol Zhu
@ 2017-05-22 13:15       ` Alexander Kanavin
  0 siblings, 0 replies; 12+ messages in thread
From: Alexander Kanavin @ 2017-05-22 13:15 UTC (permalink / raw)
  To: Carol Zhu; +Cc: Patches and discussions about the oe-core layer

On 05/22/2017 01:13 PM, Carol Zhu wrote:
> - 0002-qmlglsrc-some-enhancements-for-qmlglsrc.patch
>   Two 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.
>   It adds some common features for qmlglsrc to make app development much easier.
>
> - 0003-player-Add-configuration-for-enabling-accurate-seeks.patch
> - 0004-player-Add-get-track-number-media-info-API.patch
> - 0005-player-Add-overlayvideorenderer-video-sink.patch
> - 0006-gst-player-fix-gst-player-failed-to-load-external-su.patch
>   These are gstplayer related patches.
>   And by above gstplayer backport patches, we enhanced some API to make it much easier to use for users.
>   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.
>
> - 0007-glupload-fix-memory-leak-when-use-a-GVal.patch
>   This patch fixes a memory leak issue in glupload, which is common.

Can you please include these explanations into the commit messages, 
rebase the patches on top of the pyro branch, and send them again 
indicating in the subject that they are for pyro only?

Thanks,
Alex



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-05-22 13:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-15  8:52 [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4 Yuqing Zhu
2017-05-15  8:52 ` [poky][PATCH 1/6] gstreamer1.0-plugins-bad: Add some enhancements for qmlglsrc Yuqing Zhu
2017-05-15  8:52 ` [poky][PATCH 2/6] gstreamer1.0-plugins-bad: Add configuration for enabling accurate seeks Yuqing Zhu
2017-05-15  8:52 ` [poky][PATCH 3/6] gstreamer1.0-plugins-bad: Add get track number media info API Yuqing Zhu
2017-05-15  8:52 ` [poky][PATCH 4/6] gstreamer1.0-plugins-bad: Add overlayvideorenderer video sink Yuqing Zhu
2017-05-15  8:52 ` [poky][PATCH 5/6] gstreamer1.0-plugins-bad: Fix gst-player failed to load external subtitle uri Yuqing Zhu
2017-05-15  8:52 ` [poky][PATCH 6/6] gstreamer1.0-plugins-bad: Fix memory leak when use a GValue in glupload Yuqing Zhu
2017-05-15 11:37 ` [poky][PATCH 0/6] Add patches for gstreamer1.0-plugins-bad V1.10.4 Jussi Kukkonen
2017-05-15 11:42   ` Alexander Kanavin
2017-05-22 10:13     ` Carol Zhu
2017-05-22 13:15       ` Alexander Kanavin
2017-05-16  7:13   ` Carol Zhu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.