summaryrefslogtreecommitdiffstats
path: root/autobuild/linux
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-09 17:05:58 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-10-15 18:22:47 +0200
commit6b5c7b7a60042c36e55b7dbe57b9aa8655ded27a (patch)
tree07177eb559db4a54619e389db9263e99d3187a51 /autobuild/linux
parent6933df5ae5029bb1a672b65334c5124e2159d6dd (diff)
Format
Change-Id: Ia3fd8c0c03782664a7f0fbc6bc2bb2a5f747d136 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'autobuild/linux')
0 files changed, 0 insertions, 0 deletions
Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
From a3dc6aa0c57e1fa00efdf0e68d3a4b8645519b9d Mon Sep 17 00:00:00 2001
From: Kazunori Kobayashi <kkobayas@igel.co.jp>
Date: Wed, 18 Jul 2012 19:30:34 +0900
Subject: [PATCH 09/31] avidemux: set frame start code to VC-1 advanced
 profile stream

VC-1 advanced profile constrains the bitstream format to pair
the frame data with the frame start code.
This patch pulls frame data from previous plugin with extra field
for containing a start code and inserts the start code before the
frame data if the stream doesn't has the start code.
---
 gst/avi/gstavidemux.c |   51 ++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 48 insertions(+), 3 deletions(-)

diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c
index b6c065f..385aa30 100644
--- a/gst/avi/gstavidemux.c
+++ b/gst/avi/gstavidemux.c
@@ -4689,6 +4689,10 @@ gst_avi_demux_loop_data (GstAviDemux * avi)
   guint64 out_offset, out_offset_end;
   gboolean keyframe;
   GstAviIndexEntry *entry;
+  guint8 *data;
+  GstStructure *structure;
+  guint32 fourcc;
+  gboolean need_st_code;
 
   do {
     stream_num = gst_avi_demux_find_next (avi, avi->segment.rate);
@@ -4740,12 +4744,53 @@ gst_avi_demux_loop_data (GstAviDemux * avi)
         G_GUINT64_FORMAT " (0x%" G_GINT64_MODIFIER "x), kf %d", size,
         stream_num, offset, offset, keyframe);
 
+    structure = gst_caps_get_structure (GST_PAD_CAPS (stream->pad), 0);
+    if (gst_structure_get_fourcc (structure, "format", &fourcc)) {
+      /* set start code for VC-1 advanced profile if fourcc is 'WVC1' */
+      if (fourcc == GST_MAKE_FOURCC ('W', 'V', 'C', '1'))
+        need_st_code = TRUE;
+      else
+        need_st_code = FALSE;
+    } else
+      need_st_code = FALSE;
+
     /* FIXME, check large chunks and cut them up */
 
     /* pull in the data */
-    ret = gst_pad_pull_range (avi->sinkpad, offset, size, &buf);
-    if (ret != GST_FLOW_OK)
-      goto pull_failed;
+    if (need_st_code) {
+      if (offset < 4)
+        /* This branch isn't passed through because offset is definitely
+           more than 4 owing to container's header presented before
+           frame data. */
+        goto pull_failed;
+
+      ret = gst_pad_pull_range (avi->sinkpad, offset - 4, size + 4, &buf);
+      if (ret != GST_FLOW_OK)
+        goto pull_failed;
+
+      data = GST_BUFFER_DATA (buf);
+      /* check if this stream has a start code */
+      if (data[4] == 0x00 && data[5] == 0x00 && data[6] == 0x01 &&
+          data[7] == 0x0d) {
+        GstBuffer *sub_buf;
+
+        sub_buf = gst_buffer_create_sub (buf, 4, size);
+        if (sub_buf == NULL)
+          goto pull_failed;
+
+        gst_buffer_unref (buf);
+        buf = sub_buf;
+      } else {
+        data[0] = 0x00;
+        data[1] = 0x00;
+        data[2] = 0x01;
+        data[3] = 0x0d;
+      }
+    } else {
+      ret = gst_pad_pull_range (avi->sinkpad, offset, size, &buf);
+      if (ret != GST_FLOW_OK)
+        goto pull_failed;
+    }
 
     /* check for short buffers, this is EOS as well */
     if (GST_BUFFER_SIZE (buf) < size)
-- 
1.7.9.5