[gst-cvs] gst-plugins-bad: qtmux: Actually use new caps info on renegotiation
Thiago Sousa Santos
thiagoss at kemper.freedesktop.org
Thu Jan 14 14:13:18 PST 2010
Module: gst-plugins-bad
Branch: master
Commit: 774b7b33cc9bf552075ed104285245b630e26b08
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=774b7b33cc9bf552075ed104285245b630e26b08
Author: Thiago Santos <thiago.sousa.santos at collabora.co.uk>
Date: Thu Jan 14 08:09:03 2010 -0300
qtmux: Actually use new caps info on renegotiation
Following the previous qtmux commit, this patch tries
to use the new info added to the caps to fill the 'trak'
atom's fields and children atoms. This way qtmux will
use the late added 'codec_data' when h264parse adds
it in the following pipeline:
videotestsrc num-buffers=200 ! x264enc byte-stream=true ! \
h264parse output-format=0 ! qtmux ! \
filesink location=test.mov
---
gst/qtmux/atoms.c | 14 ++++++++++++--
gst/qtmux/gstqtmux.c | 2 --
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/gst/qtmux/atoms.c b/gst/qtmux/atoms.c
index 3d7c10f..1c3811b 100644
--- a/gst/qtmux/atoms.c
+++ b/gst/qtmux/atoms.c
@@ -460,14 +460,14 @@ atom_stsd_init (AtomSTSD * stsd)
atom_full_init (&stsd->header, FOURCC_stsd, 0, 0, 0, flags);
stsd->entries = NULL;
+ stsd->n_entries = 0;
}
static void
-atom_stsd_clear (AtomSTSD * stsd)
+atom_stsd_remove_entries (AtomSTSD * stsd)
{
GList *walker;
- atom_full_clear (&stsd->header);
walker = stsd->entries;
while (walker) {
GList *aux = walker;
@@ -489,6 +489,14 @@ atom_stsd_clear (AtomSTSD * stsd)
}
g_list_free (aux);
}
+ stsd->n_entries = 0;
+}
+
+static void
+atom_stsd_clear (AtomSTSD * stsd)
+{
+ atom_stsd_remove_entries (stsd);
+ atom_full_clear (&stsd->header);
}
static void
@@ -3015,6 +3023,7 @@ atom_trak_set_audio_type (AtomTRAK * trak, AtomsContext * context,
SampleTableEntryMP4A *ste;
atom_trak_set_audio_commons (trak, context, scale);
+ atom_stsd_remove_entries (&trak->mdia.minf.stbl.stsd);
ste = atom_trak_add_audio_entry (trak, context, entry->fourcc);
trak->is_video = FALSE;
@@ -3088,6 +3097,7 @@ atom_trak_set_video_type (AtomTRAK * trak, AtomsContext * context,
}
atom_trak_set_video_commons (trak, context, scale, dwidth, dheight);
+ atom_stsd_remove_entries (&trak->mdia.minf.stbl.stsd);
ste = atom_trak_add_video_entry (trak, context, entry->fourcc);
trak->is_video = TRUE;
diff --git a/gst/qtmux/gstqtmux.c b/gst/qtmux/gstqtmux.c
index aaba67b..5cb9bca 100644
--- a/gst/qtmux/gstqtmux.c
+++ b/gst/qtmux/gstqtmux.c
@@ -1759,7 +1759,6 @@ gst_qt_mux_audio_sink_set_caps (GstPad * pad, GstCaps * caps)
GST_DEBUG_OBJECT (qtmux,
"pad %s accepted renegotiation to %" GST_PTR_FORMAT " from %"
GST_PTR_FORMAT, GST_PAD_NAME (pad), caps, GST_PAD_CAPS (pad));
- return TRUE;
}
GST_DEBUG_OBJECT (qtmux, "%s:%s, caps=%" GST_PTR_FORMAT,
@@ -2038,7 +2037,6 @@ gst_qt_mux_video_sink_set_caps (GstPad * pad, GstCaps * caps)
GST_DEBUG_OBJECT (qtmux,
"pad %s accepted renegotiation to %" GST_PTR_FORMAT " from %"
GST_PTR_FORMAT, GST_PAD_NAME (pad), caps, GST_PAD_CAPS (pad));
- return TRUE;
}
GST_DEBUG_OBJECT (qtmux, "%s:%s, caps=%" GST_PTR_FORMAT,
More information about the Gstreamer-commits
mailing list