mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-02 16:52:42 +00:00
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:
parent
7f937c99d4
commit
3d894ebe84
3 changed files with 12 additions and 1 deletions
|
@ -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>
|
2008-11-24 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* gst-libs/gst/audio/gstbaseaudiosink.c:
|
* gst-libs/gst/audio/gstbaseaudiosink.c:
|
||||||
|
|
|
@ -876,6 +876,7 @@ gst_ogg_mux_get_headers (GstOggPad * pad)
|
||||||
res = g_list_append (res, pad->buffer);
|
res = g_list_append (res, pad->buffer);
|
||||||
pad->buffer = pad->next_buffer;
|
pad->buffer = pad->next_buffer;
|
||||||
pad->next_buffer = NULL;
|
pad->next_buffer = NULL;
|
||||||
|
pad->always_flush_page = TRUE;
|
||||||
} else {
|
} else {
|
||||||
GST_LOG_OBJECT (thepad, "caps don't have streamheader");
|
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")) {
|
if (gst_structure_has_name (structure, "video/x-theora")) {
|
||||||
GST_DEBUG_OBJECT (thepad, "putting %s page at the front", "Theora");
|
GST_DEBUG_OBJECT (thepad, "putting %s page at the front", "Theora");
|
||||||
hbufs = g_list_prepend (hbufs, hbuf);
|
hbufs = g_list_prepend (hbufs, hbuf);
|
||||||
|
pad->always_flush_page = TRUE;
|
||||||
} else if (gst_structure_has_name (structure, "video/x-dirac")) {
|
} else if (gst_structure_has_name (structure, "video/x-dirac")) {
|
||||||
GST_DEBUG_OBJECT (thepad, "putting %s page at the front", "Dirac");
|
GST_DEBUG_OBJECT (thepad, "putting %s page at the front", "Dirac");
|
||||||
hbufs = g_list_prepend (hbufs, hbuf);
|
hbufs = g_list_prepend (hbufs, hbuf);
|
||||||
|
pad->always_flush_page = TRUE;
|
||||||
} else {
|
} else {
|
||||||
hbufs = g_list_append (hbufs, hbuf);
|
hbufs = g_list_append (hbufs, hbuf);
|
||||||
}
|
}
|
||||||
|
@ -1279,7 +1282,7 @@ gst_ogg_mux_process_best_pad (GstOggMux * ogg_mux, GstOggPad * best)
|
||||||
tmpbuf = NULL;
|
tmpbuf = NULL;
|
||||||
|
|
||||||
/* we flush when we see a new keyframe */
|
/* 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) {
|
if (duration != -1) {
|
||||||
pad->duration += duration;
|
pad->duration += duration;
|
||||||
/* if page duration exceeds max, flush page */
|
/* if page duration exceeds max, flush page */
|
||||||
|
|
|
@ -79,6 +79,8 @@ typedef struct
|
||||||
gboolean prev_delta; /* was the previous buffer a delta frame */
|
gboolean prev_delta; /* was the previous buffer a delta frame */
|
||||||
|
|
||||||
GstPadEventFunction collect_event;
|
GstPadEventFunction collect_event;
|
||||||
|
|
||||||
|
gboolean always_flush_page;
|
||||||
}
|
}
|
||||||
GstOggPad;
|
GstOggPad;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue