mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
resindvd: Change the audiomunge debug output.
Make sure we always show information about the segment events passing through, even when pre-roll audio buffers aren't going to be needed.
This commit is contained in:
parent
ad1f7e6ed3
commit
79f653fde8
1 changed files with 26 additions and 23 deletions
|
@ -288,15 +288,12 @@ rsn_audiomunge_sink_event (GstPad * pad, GstEvent * event)
|
|||
gst_segment_set_newsegment_full (segment, update,
|
||||
rate, arate, format, start, stop, time);
|
||||
|
||||
if (munge->have_audio) {
|
||||
ret = gst_pad_push_event (munge->srcpad, event);
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME:
|
||||
* If the accum >= threshold or we're in a still frame and there's been
|
||||
* no audio received, then we need to generate some audio data.
|
||||
* If this is a segment update and accum >= threshold,
|
||||
* or we're in a still frame and there's been no audio received,
|
||||
* then we need to generate some audio data.
|
||||
*
|
||||
* If caused by a segment start update (time advancing in a gap) adjust
|
||||
* the new-segment and send the buffer.
|
||||
*
|
||||
|
@ -304,17 +301,21 @@ rsn_audiomunge_sink_event (GstPad * pad, GstEvent * event)
|
|||
* in the closing segment.
|
||||
*/
|
||||
if (!update) {
|
||||
GST_DEBUG_OBJECT (munge, "Sending newsegment: start %" GST_TIME_FORMAT
|
||||
" stop %" GST_TIME_FORMAT " accum now %" GST_TIME_FORMAT,
|
||||
GST_DEBUG_OBJECT (munge,
|
||||
"Sending newsegment: update %d start %" GST_TIME_FORMAT " stop %"
|
||||
GST_TIME_FORMAT " accum now %" GST_TIME_FORMAT, update,
|
||||
GST_TIME_ARGS (start), GST_TIME_ARGS (stop),
|
||||
GST_TIME_ARGS (segment->accum));
|
||||
|
||||
ret = gst_pad_push_event (munge->srcpad, event);
|
||||
}
|
||||
|
||||
if (segment->accum >= AUDIO_FILL_THRESHOLD || munge->in_still) {
|
||||
if (!munge->have_audio) {
|
||||
if ((update && segment->accum >= AUDIO_FILL_THRESHOLD)
|
||||
|| munge->in_still) {
|
||||
GST_DEBUG_OBJECT (munge,
|
||||
"Sending audio fill: accum = %" GST_TIME_FORMAT " still-state=%d",
|
||||
"Sending audio fill with ts %" GST_TIME_FORMAT ": accum = %"
|
||||
GST_TIME_FORMAT " still-state=%d", GST_TIME_ARGS (segment->start),
|
||||
GST_TIME_ARGS (segment->accum), munge->in_still);
|
||||
|
||||
/* Just generate a 100ms silence buffer for now. FIXME: Fill the gap */
|
||||
|
@ -323,13 +324,15 @@ rsn_audiomunge_sink_event (GstPad * pad, GstEvent * event)
|
|||
munge->have_audio = TRUE;
|
||||
} else {
|
||||
GST_LOG_OBJECT (munge, "Not sending audio fill buffer: "
|
||||
"segment accum below thresh: accum = %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (segment->accum));
|
||||
"Not segment update, or segment accum below thresh: accum = %"
|
||||
GST_TIME_FORMAT, GST_TIME_ARGS (segment->accum));
|
||||
}
|
||||
}
|
||||
|
||||
if (update) {
|
||||
GST_DEBUG_OBJECT (munge, "Sending newsegment: start %" GST_TIME_FORMAT
|
||||
" stop %" GST_TIME_FORMAT " accum now %" GST_TIME_FORMAT,
|
||||
GST_DEBUG_OBJECT (munge,
|
||||
"Sending newsegment: update %d start %" GST_TIME_FORMAT " stop %"
|
||||
GST_TIME_FORMAT " accum now %" GST_TIME_FORMAT, update,
|
||||
GST_TIME_ARGS (start), GST_TIME_ARGS (stop),
|
||||
GST_TIME_ARGS (segment->accum));
|
||||
|
||||
|
|
Loading…
Reference in a new issue