diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2011-08-17 18:38:39 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-08-18 11:16:19 +0200 |
commit | fd8434fc7450dc3bdc057d2d89a875be9b683181 (patch) | |
tree | 8aac689c0babcc4db6304f5fb38a69ad5e04ca85 /ext | |
parent | 5bbf7109ec681fecdedbe9e48c8045bb9525e87f (diff) |
oggmux: use oggstream to decide which BOS packets to place first
Ogg recommends video BOS packets to be first.
Use the "is_video" flag in oggstream to select those, rather than
check for known mime types.
https://bugzilla.gnome.org/show_bug.cgi?id=656775
Diffstat (limited to 'ext')
-rw-r--r-- | ext/ogg/gstoggmux.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index 0ac844259..d24e4bb28 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -1232,25 +1232,23 @@ gst_ogg_mux_send_headers (GstOggMux * mux) GST_LOG_OBJECT (mux, "swapped out page with mime type %s", gst_structure_get_name (structure)); - /* quick hack: put Theora, VP8 and Dirac video pages at the front. + /* quick hack: put video pages at the front. * Ideally, we would have a settable enum for which Ogg * profile we work with, and order based on that. * (FIXME: if there is more than one video stream, shouldn't we only put * one's BOS into the first page, followed by an audio stream's BOS, and * only then followed by the remaining video and audio streams?) */ - if (gst_structure_has_name (structure, "video/x-theora")) { - GST_DEBUG_OBJECT (thepad, "putting %s page at the front", "Theora"); - hbufs = g_list_prepend (hbufs, hbuf); - } else if (gst_structure_has_name (structure, "video/x-dirac")) { - GST_DEBUG_OBJECT (thepad, "putting %s page at the front", "Dirac"); - hbufs = g_list_prepend (hbufs, hbuf); - pad->always_flush_page = TRUE; - } else if (gst_structure_has_name (structure, "video/x-vp8")) { - GST_DEBUG_OBJECT (thepad, "putting %s page at the front", "VP8"); + if (pad->map.is_video) { + GST_DEBUG_OBJECT (thepad, "putting %s page at the front", + gst_structure_get_name (structure)); hbufs = g_list_prepend (hbufs, hbuf); } else { hbufs = g_list_append (hbufs, hbuf); } + + if (gst_structure_has_name (structure, "video/x-dirac")) { + pad->always_flush_page = TRUE; + } gst_caps_unref (caps); } |