splitmuxsink: Improve debug output
Make the debug output less confusing by not mentioning a src pad when doing calculations on the sink pad side. Improve debug around why a GOP is considered overflowing a fragment
This commit is contained in:
parent
5ae55a4633
commit
18a7c10d4e
@ -1151,6 +1151,8 @@ complete_or_wait_on_out (GstSplitMuxSink * splitmux, MqStreamCtx * ctx)
|
|||||||
case SPLITMUX_OUTPUT_STATE_STOPPED:
|
case SPLITMUX_OUTPUT_STATE_STOPPED:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
GST_LOG_OBJECT (ctx->srcpad, "Not yet ready for output");
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INFO_OBJECT (ctx->srcpad,
|
GST_INFO_OBJECT (ctx->srcpad,
|
||||||
@ -1743,6 +1745,7 @@ start_next_fragment (GstSplitMuxSink * splitmux, MqStreamCtx * ctx)
|
|||||||
send_fragment_opened_closed_msg (splitmux, TRUE, sink);
|
send_fragment_opened_closed_msg (splitmux, TRUE, sink);
|
||||||
|
|
||||||
/* FIXME: Is this always the correct next state? */
|
/* FIXME: Is this always the correct next state? */
|
||||||
|
GST_LOG_OBJECT (splitmux, "Resetting state to AWAITING_COMMAND");
|
||||||
splitmux->output_state = SPLITMUX_OUTPUT_STATE_AWAITING_COMMAND;
|
splitmux->output_state = SPLITMUX_OUTPUT_STATE_AWAITING_COMMAND;
|
||||||
GST_SPLITMUX_BROADCAST_OUTPUT (splitmux);
|
GST_SPLITMUX_BROADCAST_OUTPUT (splitmux);
|
||||||
return;
|
return;
|
||||||
@ -1908,8 +1911,10 @@ need_new_fragment (GstSplitMuxSink * splitmux,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* User told us to split now */
|
/* User told us to split now */
|
||||||
if (g_atomic_int_get (&(splitmux->do_split_next_gop)) == TRUE)
|
if (g_atomic_int_get (&(splitmux->do_split_next_gop)) == TRUE) {
|
||||||
|
GST_TRACE_OBJECT (splitmux, "Forcing because split_next_gop is set");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/* User told us to split at this running time */
|
/* User told us to split at this running time */
|
||||||
if (splitmux->reference_ctx->in_running_time > time_to_split) {
|
if (splitmux->reference_ctx->in_running_time > time_to_split) {
|
||||||
@ -1930,19 +1935,28 @@ need_new_fragment (GstSplitMuxSink * splitmux,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thresh_bytes > 0 && queued_bytes > thresh_bytes)
|
if (thresh_bytes > 0 && queued_bytes > thresh_bytes) {
|
||||||
|
GST_TRACE_OBJECT (splitmux,
|
||||||
|
"queued bytes %" G_GUINT64_FORMAT " overruns byte limit", queued_bytes);
|
||||||
return TRUE; /* Would overrun byte limit */
|
return TRUE; /* Would overrun byte limit */
|
||||||
|
}
|
||||||
|
|
||||||
if (thresh_time > 0 && queued_time > thresh_time)
|
if (thresh_time > 0 && queued_time > thresh_time) {
|
||||||
return TRUE; /* Would overrun byte limit */
|
GST_TRACE_OBJECT (splitmux,
|
||||||
|
"queued time %" GST_STIME_FORMAT " overruns time limit",
|
||||||
|
GST_STIME_ARGS (queued_time));
|
||||||
|
return TRUE; /* Would overrun time limit */
|
||||||
|
}
|
||||||
|
|
||||||
/* Timecode-based threshold accounts for possible rounding errors:
|
/* Timecode-based threshold accounts for possible rounding errors:
|
||||||
* 5us should be bigger than all possible rounding errors but nowhere near
|
* 5us should be bigger than all possible rounding errors but nowhere near
|
||||||
* big enough to skip to another frame */
|
* big enough to skip to another frame */
|
||||||
if (splitmux->next_max_tc_time != GST_CLOCK_TIME_NONE &&
|
if (splitmux->next_max_tc_time != GST_CLOCK_TIME_NONE &&
|
||||||
splitmux->reference_ctx->in_running_time >
|
splitmux->reference_ctx->in_running_time >
|
||||||
splitmux->next_max_tc_time + 5 * GST_USECOND)
|
splitmux->next_max_tc_time + 5 * GST_USECOND) {
|
||||||
|
GST_TRACE_OBJECT (splitmux, "Splitting at timecode mark");
|
||||||
return TRUE; /* Timecode threshold */
|
return TRUE; /* Timecode threshold */
|
||||||
|
}
|
||||||
|
|
||||||
if (check_robust_muxing) {
|
if (check_robust_muxing) {
|
||||||
GstClockTime mux_reserved_remain;
|
GstClockTime mux_reserved_remain;
|
||||||
@ -2143,16 +2157,16 @@ check_completed_gop (GstSplitMuxSink * splitmux, MqStreamCtx * ctx)
|
|||||||
MqStreamCtx *tmpctx = (MqStreamCtx *) (cur->data);
|
MqStreamCtx *tmpctx = (MqStreamCtx *) (cur->data);
|
||||||
|
|
||||||
GST_LOG_OBJECT (splitmux,
|
GST_LOG_OBJECT (splitmux,
|
||||||
"Context %p (src pad %" GST_PTR_FORMAT ") TS %" GST_STIME_FORMAT
|
"Context %p sink pad %" GST_PTR_FORMAT " @ TS %" GST_STIME_FORMAT
|
||||||
" EOS %d", tmpctx, tmpctx->srcpad,
|
" EOS %d", tmpctx, tmpctx->sinkpad,
|
||||||
GST_STIME_ARGS (tmpctx->in_running_time), tmpctx->in_eos);
|
GST_STIME_ARGS (tmpctx->in_running_time), tmpctx->in_eos);
|
||||||
|
|
||||||
if (splitmux->max_in_running_time != GST_CLOCK_STIME_NONE &&
|
if (splitmux->max_in_running_time != GST_CLOCK_STIME_NONE &&
|
||||||
tmpctx->in_running_time < splitmux->max_in_running_time &&
|
tmpctx->in_running_time < splitmux->max_in_running_time &&
|
||||||
!tmpctx->in_eos) {
|
!tmpctx->in_eos) {
|
||||||
GST_LOG_OBJECT (splitmux,
|
GST_LOG_OBJECT (splitmux,
|
||||||
"Context %p (src pad %" GST_PTR_FORMAT ") not ready. We'll sleep",
|
"Context %p sink pad %" GST_PTR_FORMAT " not ready. We'll sleep",
|
||||||
tmpctx, tmpctx->srcpad);
|
tmpctx, tmpctx->sinkpad);
|
||||||
ready = FALSE;
|
ready = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user