mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
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
This commit is contained in:
parent
5bbf7109ec
commit
fd8434fc74
1 changed files with 8 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue