summaryrefslogtreecommitdiffstats
path: root/common/recipes-multimedia/gstreamer/gstreamer1.0-omx/0009-omxwmvdec-support-VC-1-advanced-profile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-multimedia/gstreamer/gstreamer1.0-omx/0009-omxwmvdec-support-VC-1-advanced-profile.patch')
-rw-r--r--common/recipes-multimedia/gstreamer/gstreamer1.0-omx/0009-omxwmvdec-support-VC-1-advanced-profile.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/common/recipes-multimedia/gstreamer/gstreamer1.0-omx/0009-omxwmvdec-support-VC-1-advanced-profile.patch b/common/recipes-multimedia/gstreamer/gstreamer1.0-omx/0009-omxwmvdec-support-VC-1-advanced-profile.patch
new file mode 100644
index 0000000..3d31b1c
--- /dev/null
+++ b/common/recipes-multimedia/gstreamer/gstreamer1.0-omx/0009-omxwmvdec-support-VC-1-advanced-profile.patch
@@ -0,0 +1,56 @@
+From 5ad42791ad2d93bd694bf5faa466ccaffee7d23b Mon Sep 17 00:00:00 2001
+From: Kazunori Kobayashi <kkobayas@igel.co.jp>
+Date: Wed, 19 Jun 2013 16:03:02 +0900
+Subject: [PATCH 09/14] omxwmvdec: support VC-1 advanced profile
+
+If VC-1 advanced profile stream is demuxed, codec_data has a sequence
+header and a entry point header. At the beginning of playback,
+this patch pushes a buffer which is the concatenation of sequence header,
+entry point header and first frame data to decode the advanced profile
+stream.
+---
+ omx/gstomxwmvdec.c | 28 +++++++++++++++++++++++++++-
+ 1 file changed, 27 insertions(+), 1 deletion(-)
+
+diff --git a/omx/gstomxwmvdec.c b/omx/gstomxwmvdec.c
+index 0f8f2db..a3bd3c5 100644
+--- a/omx/gstomxwmvdec.c
++++ b/omx/gstomxwmvdec.c
+@@ -107,7 +107,33 @@ static GstFlowReturn
+ gst_omx_wmv_dec_prepare_frame (GstOMXVideoDec * self,
+ GstVideoCodecFrame * frame)
+ {
+- if (self->codec_data) {
++ GstCaps *caps;
++ gboolean is_ap = FALSE;
++ GstStructure *structure;
++ const gchar *fourcc;
++
++ if (self->codec_data == NULL)
++ return GST_FLOW_OK;
++
++ caps = gst_pad_get_current_caps (GST_VIDEO_DECODER_SINK_PAD (self));
++ structure = gst_caps_get_structure (caps, 0);
++ fourcc = gst_structure_get_string (structure, "format");
++ if (fourcc) {
++ if (strncmp (fourcc, "WVC1", strlen ("WVC1")) == 0) {
++ GST_INFO_OBJECT (self, "stream type is Advanced Profile");
++ is_ap = TRUE;
++ } else {
++ GST_INFO_OBJECT (self, "stream type is Simple/Main Profile");
++ is_ap = FALSE;
++ }
++ }
++ gst_caps_unref (caps);
++
++ if (is_ap) {
++ frame->input_buffer =
++ gst_buffer_append (self->codec_data, frame->input_buffer);
++ self->codec_data = NULL;
++ } else {
+ OMX_PARAM_PORTDEFINITIONTYPE port_def;
+ guint32 *SeqHdrBuf;
+ guint8 *u8ptr;
+--
+1.8.1.2
+