All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuqing Zhu <b54851@freescale.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [poky][PATCH v2 5/7] gstreamer1.0-plugins-bad: Add detecting picture coding type when drain
Date: Wed, 20 Jan 2016 17:51:39 +0800	[thread overview]
Message-ID: <1453283501-3982-6-git-send-email-b54851@freescale.com> (raw)
In-Reply-To: <1453283501-3982-1-git-send-email-b54851@freescale.com>

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



  parent reply	other threads:[~2016-01-20  9:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Yuqing Zhu [this message]
2016-01-20  9:51 ` [poky][PATCH v2 6/7] gstreamer1.0-plugins-bad: Add detecting picture coding type when drain 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453283501-3982-6-git-send-email-b54851@freescale.com \
    --to=b54851@freescale.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.