mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
debug fixes
Original commit message from CVS: debug fixes
This commit is contained in:
parent
1feeaffc7f
commit
574cabacba
2 changed files with 18 additions and 0 deletions
|
@ -787,6 +787,7 @@ gst_base_sink_event (GstPad * pad, GstEvent * event)
|
||||||
|
|
||||||
GST_PREROLL_LOCK (pad);
|
GST_PREROLL_LOCK (pad);
|
||||||
/* we need preroll after the flush */
|
/* we need preroll after the flush */
|
||||||
|
GST_DEBUG_OBJECT (basesink, "flushing, need preroll after flush");
|
||||||
basesink->need_preroll = TRUE;
|
basesink->need_preroll = TRUE;
|
||||||
/* unlock from a possible state change/preroll */
|
/* unlock from a possible state change/preroll */
|
||||||
gst_base_sink_preroll_queue_flush (basesink, pad);
|
gst_base_sink_preroll_queue_flush (basesink, pad);
|
||||||
|
@ -1143,6 +1144,8 @@ gst_base_sink_deactivate (GstBaseSink * basesink, GstPad * pad)
|
||||||
bclass->unlock (basesink);
|
bclass->unlock (basesink);
|
||||||
|
|
||||||
/* flush out the data thread if it's locked in finish_preroll */
|
/* flush out the data thread if it's locked in finish_preroll */
|
||||||
|
GST_DEBUG_OBJECT (basesink,
|
||||||
|
"flushing out data thread, need preroll to FALSE");
|
||||||
basesink->need_preroll = FALSE;
|
basesink->need_preroll = FALSE;
|
||||||
gst_base_sink_preroll_queue_flush (basesink, pad);
|
gst_base_sink_preroll_queue_flush (basesink, pad);
|
||||||
GST_PREROLL_SIGNAL (pad);
|
GST_PREROLL_SIGNAL (pad);
|
||||||
|
@ -1295,6 +1298,7 @@ gst_base_sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
basesink->offset = 0;
|
basesink->offset = 0;
|
||||||
GST_PREROLL_LOCK (basesink->sinkpad);
|
GST_PREROLL_LOCK (basesink->sinkpad);
|
||||||
basesink->have_preroll = FALSE;
|
basesink->have_preroll = FALSE;
|
||||||
|
GST_DEBUG_OBJECT (basesink, "READY to PAUSED, need preroll to FALSE");
|
||||||
basesink->need_preroll = TRUE;
|
basesink->need_preroll = TRUE;
|
||||||
GST_PREROLL_UNLOCK (basesink->sinkpad);
|
GST_PREROLL_UNLOCK (basesink->sinkpad);
|
||||||
basesink->have_newsegment = FALSE;
|
basesink->have_newsegment = FALSE;
|
||||||
|
@ -1315,6 +1319,8 @@ gst_base_sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
gst_base_sink_preroll_queue_empty (basesink, basesink->sinkpad);
|
gst_base_sink_preroll_queue_empty (basesink, basesink->sinkpad);
|
||||||
} else if (!basesink->have_preroll) {
|
} else if (!basesink->have_preroll) {
|
||||||
/* don't need preroll, but do queue a commit_state */
|
/* don't need preroll, but do queue a commit_state */
|
||||||
|
GST_DEBUG_OBJECT (basesink,
|
||||||
|
"PAUSED to PLAYING, !eos, !have_preroll, need preroll to FALSE");
|
||||||
basesink->need_preroll = FALSE;
|
basesink->need_preroll = FALSE;
|
||||||
basesink->playing_async = TRUE;
|
basesink->playing_async = TRUE;
|
||||||
ret = GST_STATE_CHANGE_ASYNC;
|
ret = GST_STATE_CHANGE_ASYNC;
|
||||||
|
@ -1322,6 +1328,8 @@ gst_base_sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
} else {
|
} else {
|
||||||
/* don't need the preroll anymore */
|
/* don't need the preroll anymore */
|
||||||
basesink->need_preroll = FALSE;
|
basesink->need_preroll = FALSE;
|
||||||
|
GST_DEBUG_OBJECT (basesink,
|
||||||
|
"PAUSED to PLAYING, !eos, have_preroll, need preroll to FALSE");
|
||||||
/* now let it play */
|
/* now let it play */
|
||||||
GST_PREROLL_SIGNAL (basesink->sinkpad);
|
GST_PREROLL_SIGNAL (basesink->sinkpad);
|
||||||
}
|
}
|
||||||
|
@ -1367,6 +1375,7 @@ gst_base_sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
GST_DEBUG_OBJECT (basesink, "have_preroll: %d, EOS: %d",
|
GST_DEBUG_OBJECT (basesink, "have_preroll: %d, EOS: %d",
|
||||||
basesink->have_preroll, basesink->eos);
|
basesink->have_preroll, basesink->eos);
|
||||||
if (!basesink->have_preroll && !basesink->eos) {
|
if (!basesink->have_preroll && !basesink->eos) {
|
||||||
|
GST_DEBUG_OBJECT (basesink, "PLAYING to PAUSED, need preroll to TRUE");
|
||||||
basesink->need_preroll = TRUE;
|
basesink->need_preroll = TRUE;
|
||||||
ret = GST_STATE_CHANGE_ASYNC;
|
ret = GST_STATE_CHANGE_ASYNC;
|
||||||
}
|
}
|
||||||
|
|
|
@ -787,6 +787,7 @@ gst_base_sink_event (GstPad * pad, GstEvent * event)
|
||||||
|
|
||||||
GST_PREROLL_LOCK (pad);
|
GST_PREROLL_LOCK (pad);
|
||||||
/* we need preroll after the flush */
|
/* we need preroll after the flush */
|
||||||
|
GST_DEBUG_OBJECT (basesink, "flushing, need preroll after flush");
|
||||||
basesink->need_preroll = TRUE;
|
basesink->need_preroll = TRUE;
|
||||||
/* unlock from a possible state change/preroll */
|
/* unlock from a possible state change/preroll */
|
||||||
gst_base_sink_preroll_queue_flush (basesink, pad);
|
gst_base_sink_preroll_queue_flush (basesink, pad);
|
||||||
|
@ -1143,6 +1144,8 @@ gst_base_sink_deactivate (GstBaseSink * basesink, GstPad * pad)
|
||||||
bclass->unlock (basesink);
|
bclass->unlock (basesink);
|
||||||
|
|
||||||
/* flush out the data thread if it's locked in finish_preroll */
|
/* flush out the data thread if it's locked in finish_preroll */
|
||||||
|
GST_DEBUG_OBJECT (basesink,
|
||||||
|
"flushing out data thread, need preroll to FALSE");
|
||||||
basesink->need_preroll = FALSE;
|
basesink->need_preroll = FALSE;
|
||||||
gst_base_sink_preroll_queue_flush (basesink, pad);
|
gst_base_sink_preroll_queue_flush (basesink, pad);
|
||||||
GST_PREROLL_SIGNAL (pad);
|
GST_PREROLL_SIGNAL (pad);
|
||||||
|
@ -1295,6 +1298,7 @@ gst_base_sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
basesink->offset = 0;
|
basesink->offset = 0;
|
||||||
GST_PREROLL_LOCK (basesink->sinkpad);
|
GST_PREROLL_LOCK (basesink->sinkpad);
|
||||||
basesink->have_preroll = FALSE;
|
basesink->have_preroll = FALSE;
|
||||||
|
GST_DEBUG_OBJECT (basesink, "READY to PAUSED, need preroll to FALSE");
|
||||||
basesink->need_preroll = TRUE;
|
basesink->need_preroll = TRUE;
|
||||||
GST_PREROLL_UNLOCK (basesink->sinkpad);
|
GST_PREROLL_UNLOCK (basesink->sinkpad);
|
||||||
basesink->have_newsegment = FALSE;
|
basesink->have_newsegment = FALSE;
|
||||||
|
@ -1315,6 +1319,8 @@ gst_base_sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
gst_base_sink_preroll_queue_empty (basesink, basesink->sinkpad);
|
gst_base_sink_preroll_queue_empty (basesink, basesink->sinkpad);
|
||||||
} else if (!basesink->have_preroll) {
|
} else if (!basesink->have_preroll) {
|
||||||
/* don't need preroll, but do queue a commit_state */
|
/* don't need preroll, but do queue a commit_state */
|
||||||
|
GST_DEBUG_OBJECT (basesink,
|
||||||
|
"PAUSED to PLAYING, !eos, !have_preroll, need preroll to FALSE");
|
||||||
basesink->need_preroll = FALSE;
|
basesink->need_preroll = FALSE;
|
||||||
basesink->playing_async = TRUE;
|
basesink->playing_async = TRUE;
|
||||||
ret = GST_STATE_CHANGE_ASYNC;
|
ret = GST_STATE_CHANGE_ASYNC;
|
||||||
|
@ -1322,6 +1328,8 @@ gst_base_sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
} else {
|
} else {
|
||||||
/* don't need the preroll anymore */
|
/* don't need the preroll anymore */
|
||||||
basesink->need_preroll = FALSE;
|
basesink->need_preroll = FALSE;
|
||||||
|
GST_DEBUG_OBJECT (basesink,
|
||||||
|
"PAUSED to PLAYING, !eos, have_preroll, need preroll to FALSE");
|
||||||
/* now let it play */
|
/* now let it play */
|
||||||
GST_PREROLL_SIGNAL (basesink->sinkpad);
|
GST_PREROLL_SIGNAL (basesink->sinkpad);
|
||||||
}
|
}
|
||||||
|
@ -1367,6 +1375,7 @@ gst_base_sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
GST_DEBUG_OBJECT (basesink, "have_preroll: %d, EOS: %d",
|
GST_DEBUG_OBJECT (basesink, "have_preroll: %d, EOS: %d",
|
||||||
basesink->have_preroll, basesink->eos);
|
basesink->have_preroll, basesink->eos);
|
||||||
if (!basesink->have_preroll && !basesink->eos) {
|
if (!basesink->have_preroll && !basesink->eos) {
|
||||||
|
GST_DEBUG_OBJECT (basesink, "PLAYING to PAUSED, need preroll to TRUE");
|
||||||
basesink->need_preroll = TRUE;
|
basesink->need_preroll = TRUE;
|
||||||
ret = GST_STATE_CHANGE_ASYNC;
|
ret = GST_STATE_CHANGE_ASYNC;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue