All of lore.kernel.org
 help / color / mirror / Atom feed
* [poky][PATCH v2 0/7] Add patches for gstreamer 1.6
@ 2016-01-20  9:51 Yuqing Zhu
  2016-01-20  9:51 ` [poky][PATCH v2 1/7] gstreamer1.0: [baseparse] unset FLAG_DISCONT when push to adapter Yuqing Zhu
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Yuqing Zhu @ 2016-01-20  9:51 UTC (permalink / raw)
  To: openembedded-core

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



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

* [poky][PATCH v2 1/7] gstreamer1.0: [baseparse] unset FLAG_DISCONT when push to adapter
  2016-01-20  9:51 [poky][PATCH v2 0/7] Add patches for gstreamer 1.6 Yuqing Zhu
@ 2016-01-20  9:51 ` Yuqing Zhu
  2016-01-20  9:51 ` [poky][PATCH v2 2/7] gstreamer1.0-plugins-base: Fix taglist not being sent to down stream if all the frame corrupted Yuqing Zhu
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Yuqing Zhu @ 2016-01-20  9:51 UTC (permalink / raw)
  To: openembedded-core

Since DISCONT flag will be handled by priv->discont flag,
there is no need to copy DISCONT flag to adapter.
Otherwise, the DISCONT flag will always be set on each frame
for the first chain in buffer.

Signed-off-by: Yuqing Zhu <b54851@freescale.com>
---
 ...e-unset-FLAG_DISCONT-when-push-to-adapter.patch | 33 ++++++++++++++++++++++
 .../gstreamer/gstreamer1.0_1.6.2.bb                |  1 +
 2 files changed, 34 insertions(+)
 create mode 100755 meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-baseparse-unset-FLAG_DISCONT-when-push-to-adapter.patch

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-baseparse-unset-FLAG_DISCONT-when-push-to-adapter.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-baseparse-unset-FLAG_DISCONT-when-push-to-adapter.patch
new file mode 100755
index 0000000..3612dbf
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-baseparse-unset-FLAG_DISCONT-when-push-to-adapter.patch
@@ -0,0 +1,33 @@
+From 90254a34f57278930bbcb3bd80cfef607157b03f Mon Sep 17 00:00:00 2001
+From: Lyon Wang <lyon.wang@freescale.com>
+Date: Wed, 4 Nov 2015 18:16:52 +0800
+Subject: [PATCH] [baseparse] unset FLAG_DISCONT when push to adapter
+
+Since DISCONT flag will be handled by priv->discont flag.
+There is no need to copy DISCONT flag to adapter.
+Otherwise, the DISCONT flag will alwasys been set on each frame,
+for the first chain in buffer.
+
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=757575]
+
+Signed-off-by: Lyon Wang <lyon.wang@freescale.com>
+---
+ libs/gst/base/gstbaseparse.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c
+index 51d159d..184fafe 100644
+--- a/libs/gst/base/gstbaseparse.c
++++ b/libs/gst/base/gstbaseparse.c
+@@ -3026,6 +3026,7 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
+         parse->priv->discont = TRUE;
+       }
+     }
++    GST_BUFFER_FLAG_UNSET(buffer, GST_BUFFER_FLAG_DISCONT);
+     gst_adapter_push (parse->priv->adapter, buffer);
+   }
+ 
+-- 
+1.9.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.6.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.6.2.bb
index ba46c77..ef1e88c 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.6.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.6.2.bb
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
 SRC_URI = " \
     http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
     file://0001-Fix-crash-with-gst-inspect.patch \
+    file://0002-baseparse-unset-FLAG_DISCONT-when-push-to-adapter.patch \
 "
 SRC_URI[md5sum] = "5e610b5a94c209487310739b39b6c464"
 SRC_URI[sha256sum] = "5896716bd8e089dba452932a2eff2bb6f6c9d58ff64a96635d157f1ffaf8feb2"
-- 
1.9.1



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

* [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  9:51 [poky][PATCH v2 0/7] Add patches for gstreamer 1.6 Yuqing Zhu
  2016-01-20  9:51 ` [poky][PATCH v2 1/7] gstreamer1.0: [baseparse] unset FLAG_DISCONT when push to adapter Yuqing Zhu
@ 2016-01-20  9:51 ` Yuqing Zhu
  2016-01-20  9:51 ` [poky][PATCH v2 3/7] gstreamer1.0-plugins-base: Add video crop supporting when convert frame Yuqing Zhu
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Yuqing Zhu @ 2016-01-20  9:51 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Yuqing Zhu <b54851@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 0000000..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.wang@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.sh@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



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

* [poky][PATCH v2 3/7] gstreamer1.0-plugins-base: Add video crop supporting when convert frame
  2016-01-20  9:51 [poky][PATCH v2 0/7] Add patches for gstreamer 1.6 Yuqing Zhu
  2016-01-20  9:51 ` [poky][PATCH v2 1/7] gstreamer1.0: [baseparse] unset FLAG_DISCONT when push to adapter Yuqing Zhu
  2016-01-20  9:51 ` [poky][PATCH v2 2/7] gstreamer1.0-plugins-base: Fix taglist not being sent to down stream if all the frame corrupted Yuqing Zhu
@ 2016-01-20  9:51 ` Yuqing Zhu
  2016-01-20  9:51 ` [poky][PATCH v2 4/7] gstreamer1.0-plugins-bad: Need to set right pid if pid is 0 when create streams Yuqing Zhu
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Yuqing Zhu @ 2016-01-20  9:51 UTC (permalink / raw)
  To: openembedded-core

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 <b54851@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 0000000..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 <b06498@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", &vcrop, &error)) {
++      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", &csp2, &error))
++        goto no_elements;
++    }
++  }
++
+   /* videoscale is here to correct for the pixel-aspect-ratio for us */
+   GST_DEBUG ("creating elements");
+   if (!create_element ("appsrc", &src, &error) ||
+@@ -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 (&info, 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 (&info) - cmeta->width,
++        NULL);
++    g_object_set (vcrop, "bottom",
++        GST_VIDEO_INFO_HEIGHT (&info) - 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", vscale, "sink",
+@@ -193,8 +231,12 @@ no_elements:
+   {
+     if (src)
+       gst_object_unref (src);
++    if (vcrop)
++      gst_object_unref (vcrop);
+     if (csp)
+       gst_object_unref (csp);
++    if (csp2)
++      gst_object_unref (csp2);
+     if (vscale)
+       gst_object_unref (vscale);
+     if (sink)
+@@ -209,7 +251,11 @@ no_elements:
+ no_pipeline:
+   {
+     gst_object_unref (src);
++    if (vcrop)
++      gst_object_unref (vcrop);
+     gst_object_unref (csp);
++    if (csp2)
++      gst_object_unref (csp2);
+     gst_object_unref (vscale);
+     gst_object_unref (sink);
+ 
+@@ -282,7 +328,8 @@ gst_video_convert_sample (GstSample * sample, const GstCaps * to_caps,
+   }
+ 
+   pipeline =
+-      build_convert_frame_pipeline (&src, &sink, from_caps, to_caps_copy, &err);
++      build_convert_frame_pipeline (&src, &sink, from_caps,
++      gst_buffer_get_video_crop_meta (buf), to_caps_copy, &err);
+   if (!pipeline)
+     goto no_pipeline;
+ 
+@@ -646,8 +693,8 @@ gst_video_convert_sample_async (GstSample * sample,
+   }
+ 
+   pipeline =
+-      build_convert_frame_pipeline (&src, &sink, from_caps, to_caps_copy,
+-      &error);
++      build_convert_frame_pipeline (&src, &sink, from_caps,
++      gst_buffer_get_video_crop_meta (buf), to_caps_copy, &error);
+   if (!pipeline)
+     goto no_pipeline;
+ 
+-- 
+2.5.0
+
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..6b2ab0e 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-convertframe-Support-video-crop-when-convert-frame.patch \
 "
 
 SRC_URI[md5sum] = "f530fbbe287edce79c55a37bd1a39fe2"
-- 
1.9.1



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

* [poky][PATCH v2 4/7] gstreamer1.0-plugins-bad: Need to set right pid if pid is 0 when create streams
  2016-01-20  9:51 [poky][PATCH v2 0/7] Add patches for gstreamer 1.6 Yuqing Zhu
                   ` (2 preceding siblings ...)
  2016-01-20  9:51 ` [poky][PATCH v2 3/7] gstreamer1.0-plugins-base: Add video crop supporting when convert frame Yuqing Zhu
@ 2016-01-20  9:51 ` Yuqing Zhu
  2016-01-20  9:51 ` [poky][PATCH v2 5/7] gstreamer1.0-plugins-bad: Add detecting picture coding type when drain Yuqing Zhu
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Yuqing Zhu @ 2016-01-20  9:51 UTC (permalink / raw)
  To: openembedded-core

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 <b54851@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 0000000..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 <b06498@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", &pid) == 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] = "7c73bec1d389f0e184ebbbbb9e9f883d"
 SRC_URI[sha256sum] = "650855e39ff56a8bb6cb0c192109c5926ce12f536d06e19ebf829de71ef396fe"
-- 
1.9.1



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

* [poky][PATCH v2 5/7] gstreamer1.0-plugins-bad: Add detecting picture coding type when drain
  2016-01-20  9:51 [poky][PATCH v2 0/7] Add patches for gstreamer 1.6 Yuqing Zhu
                   ` (3 preceding siblings ...)
  2016-01-20  9:51 ` [poky][PATCH v2 4/7] gstreamer1.0-plugins-bad: Need to set right pid if pid is 0 when create streams Yuqing Zhu
@ 2016-01-20  9:51 ` Yuqing Zhu
  2016-01-20  9:51 ` [poky][PATCH v2 6/7] " Yuqing Zhu
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Yuqing Zhu @ 2016-01-20  9:51 UTC (permalink / raw)
  To: openembedded-core

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 <b54851@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 0000000..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 <b06498@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] = "7c73bec1d389f0e184ebbbbb9e9f883d"
-- 
1.9.1



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

* [poky][PATCH v2 6/7] gstreamer1.0-plugins-bad: Add detecting picture coding type when drain
  2016-01-20  9:51 [poky][PATCH v2 0/7] Add patches for gstreamer 1.6 Yuqing Zhu
                   ` (4 preceding siblings ...)
  2016-01-20  9:51 ` [poky][PATCH v2 5/7] gstreamer1.0-plugins-bad: Add detecting picture coding type when drain Yuqing Zhu
@ 2016-01-20  9:51 ` Yuqing Zhu
  2016-01-20  9:51 ` [poky][PATCH v2 7/7] gstreamer1.0-plugins-bad: Fix memory leak of navigation thread Yuqing Zhu
  2016-01-21 14:39 ` [poky][PATCH v2 0/7] Add patches for gstreamer 1.6 Richard Purdie
  7 siblings, 0 replies; 9+ messages in thread
From: Yuqing Zhu @ 2016-01-20  9:51 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Yuqing Zhu <b54851@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 0000000..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 <b06498@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 (&header, &mpvparse->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] = "7c73bec1d389f0e184ebbbbb9e9f883d"
-- 
1.9.1



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

* [poky][PATCH v2 7/7] gstreamer1.0-plugins-bad: Fix memory leak of navigation thread
  2016-01-20  9:51 [poky][PATCH v2 0/7] Add patches for gstreamer 1.6 Yuqing Zhu
                   ` (5 preceding siblings ...)
  2016-01-20  9:51 ` [poky][PATCH v2 6/7] " Yuqing Zhu
@ 2016-01-20  9:51 ` Yuqing Zhu
  2016-01-21 14:39 ` [poky][PATCH v2 0/7] Add patches for gstreamer 1.6 Richard Purdie
  7 siblings, 0 replies; 9+ messages in thread
From: Yuqing Zhu @ 2016-01-20  9:51 UTC (permalink / raw)
  To: openembedded-core

When exit navigation thread, call g_thread_join() to release
the resource hold by it.

Signed-off-by: Yuqing Zhu <b54851@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 0000000..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 <b55597@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 <b55597@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 (&window->nav_destroy_cond, &window->nav_lock);
+     }
++    /* release resource hold by navigation thread */
++    g_thread_join(window->priv->navigation_thread);
++    window->priv->navigation_thread = NULL;
+     g_mutex_unlock (&window->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] = "7c73bec1d389f0e184ebbbbb9e9f883d"
-- 
1.9.1



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

* Re: [poky][PATCH v2 0/7] Add patches for gstreamer 1.6
  2016-01-20  9:51 [poky][PATCH v2 0/7] Add patches for gstreamer 1.6 Yuqing Zhu
                   ` (6 preceding siblings ...)
  2016-01-20  9:51 ` [poky][PATCH v2 7/7] gstreamer1.0-plugins-bad: Fix memory leak of navigation thread Yuqing Zhu
@ 2016-01-21 14:39 ` Richard Purdie
  7 siblings, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2016-01-21 14:39 UTC (permalink / raw)
  To: Yuqing Zhu, openembedded-core

On Wed, 2016-01-20 at 17:51 +0800, Yuqing Zhu wrote:
> ---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.

The questions asked about the original patches still stand. Why this
particular set of patches rather than some of the other fixes in the
gstreamer master branch? 

Would we be better off with a git recipe for gstreamer that some BSPs
could use?

This does look like the result of some particular product focused work
and looks more BSP focused than OE-Core specific. Backports might be ok
but I particularly worry about patches that have not been accepted
upstream.

I think we need more explanation about the intent here, currently there
has been none.

Cheers,

Richard


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

end of thread, other threads:[~2016-01-21 14:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-20  9:51 [poky][PATCH v2 0/7] Add patches for gstreamer 1.6 Yuqing Zhu
2016-01-20  9:51 ` [poky][PATCH v2 1/7] gstreamer1.0: [baseparse] unset FLAG_DISCONT when push to adapter Yuqing Zhu
2016-01-20  9:51 ` [poky][PATCH v2 2/7] gstreamer1.0-plugins-base: Fix taglist not being sent to down stream if all the frame corrupted Yuqing Zhu
2016-01-20  9:51 ` [poky][PATCH v2 3/7] gstreamer1.0-plugins-base: Add video crop supporting when convert frame Yuqing Zhu
2016-01-20  9:51 ` [poky][PATCH v2 4/7] gstreamer1.0-plugins-bad: Need to set right pid if pid is 0 when create streams Yuqing Zhu
2016-01-20  9:51 ` [poky][PATCH v2 5/7] gstreamer1.0-plugins-bad: Add detecting picture coding type when drain Yuqing Zhu
2016-01-20  9:51 ` [poky][PATCH v2 6/7] " Yuqing Zhu
2016-01-20  9:51 ` [poky][PATCH v2 7/7] gstreamer1.0-plugins-bad: Fix memory leak of navigation thread Yuqing Zhu
2016-01-21 14:39 ` [poky][PATCH v2 0/7] Add patches for gstreamer 1.6 Richard Purdie

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.