mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
transcoder: Minor refactoring to output better debug logs
This commit is contained in:
parent
f1cf5d0683
commit
9d890c152e
1 changed files with 17 additions and 13 deletions
|
@ -487,11 +487,16 @@ tick_cb (gpointer user_data)
|
||||||
GstTranscoder *self = GST_TRANSCODER (user_data);
|
GstTranscoder *self = GST_TRANSCODER (user_data);
|
||||||
gint64 position;
|
gint64 position;
|
||||||
|
|
||||||
if (self->target_state >= GST_STATE_PAUSED
|
if (self->target_state < GST_STATE_PAUSED)
|
||||||
&& gst_element_query_position (self->transcodebin, GST_FORMAT_TIME,
|
return G_SOURCE_CONTINUE;
|
||||||
|
|
||||||
|
if (!gst_element_query_position (self->transcodebin, GST_FORMAT_TIME,
|
||||||
&position)) {
|
&position)) {
|
||||||
GST_LOG_OBJECT (self, "Position %" GST_TIME_FORMAT,
|
GST_LOG_OBJECT (self, "Could not query position");
|
||||||
GST_TIME_ARGS (position));
|
return G_SOURCE_CONTINUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
GST_LOG_OBJECT (self, "Position %" GST_TIME_FORMAT, GST_TIME_ARGS (position));
|
||||||
|
|
||||||
if (g_signal_handler_find (self, G_SIGNAL_MATCH_ID,
|
if (g_signal_handler_find (self, G_SIGNAL_MATCH_ID,
|
||||||
signals[SIGNAL_POSITION_UPDATED], 0, NULL, NULL, NULL) != 0) {
|
signals[SIGNAL_POSITION_UPDATED], 0, NULL, NULL, NULL) != 0) {
|
||||||
|
@ -503,7 +508,6 @@ tick_cb (gpointer user_data)
|
||||||
position_updated_dispatch, data,
|
position_updated_dispatch, data,
|
||||||
(GDestroyNotify) position_updated_signal_data_free);
|
(GDestroyNotify) position_updated_signal_data_free);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return G_SOURCE_CONTINUE;
|
return G_SOURCE_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue