ext/ogg/gstoggmux.*: If we're muxing a dirac stream, flush the page after every picture.

Original commit message from CVS:
* ext/ogg/gstoggmux.c:
* ext/ogg/gstoggmux.h:
If we're muxing a dirac stream, flush the page after every picture.
This commit is contained in:
David Schleef 2008-11-24 19:18:59 +00:00
parent 7f937c99d4
commit 3d894ebe84
3 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2008-11-24 David Schleef <ds@schleef.org>
* ext/ogg/gstoggmux.c:
* ext/ogg/gstoggmux.h:
If we're muxing a dirac stream, flush the page after every picture.
2008-11-24 Stefan Kost <ensonic@users.sf.net>
* gst-libs/gst/audio/gstbaseaudiosink.c:

View file

@ -876,6 +876,7 @@ gst_ogg_mux_get_headers (GstOggPad * pad)
res = g_list_append (res, pad->buffer);
pad->buffer = pad->next_buffer;
pad->next_buffer = NULL;
pad->always_flush_page = TRUE;
} else {
GST_LOG_OBJECT (thepad, "caps don't have streamheader");
}
@ -1040,9 +1041,11 @@ gst_ogg_mux_send_headers (GstOggMux * mux)
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);
pad->always_flush_page = TRUE;
} 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 {
hbufs = g_list_append (hbufs, hbuf);
}
@ -1279,7 +1282,7 @@ gst_ogg_mux_process_best_pad (GstOggMux * ogg_mux, GstOggPad * best)
tmpbuf = NULL;
/* we flush when we see a new keyframe */
force_flush = (pad->prev_delta && !delta_unit);
force_flush = (pad->prev_delta && !delta_unit) || pad->always_flush_page;
if (duration != -1) {
pad->duration += duration;
/* if page duration exceeds max, flush page */

View file

@ -79,6 +79,8 @@ typedef struct
gboolean prev_delta; /* was the previous buffer a delta frame */
GstPadEventFunction collect_event;
gboolean always_flush_page;
}
GstOggPad;