mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 01:28:34 +00:00
rtpjitterbuffer: improve debug
This commit is contained in:
parent
041946423a
commit
4a31aec513
1 changed files with 14 additions and 10 deletions
|
@ -162,25 +162,33 @@ enum
|
||||||
#define JBUF_UNLOCK(priv) (g_mutex_unlock (&(priv)->jbuf_lock))
|
#define JBUF_UNLOCK(priv) (g_mutex_unlock (&(priv)->jbuf_lock))
|
||||||
|
|
||||||
#define JBUF_WAIT_TIMER(priv) G_STMT_START { \
|
#define JBUF_WAIT_TIMER(priv) G_STMT_START { \
|
||||||
|
GST_DEBUG ("waiting timer"); \
|
||||||
(priv)->waiting_timer = TRUE; \
|
(priv)->waiting_timer = TRUE; \
|
||||||
g_cond_wait (&(priv)->jbuf_timer, &(priv)->jbuf_lock); \
|
g_cond_wait (&(priv)->jbuf_timer, &(priv)->jbuf_lock); \
|
||||||
(priv)->waiting_timer = FALSE; \
|
(priv)->waiting_timer = FALSE; \
|
||||||
|
GST_DEBUG ("waiting timer done"); \
|
||||||
} G_STMT_END
|
} G_STMT_END
|
||||||
#define JBUF_SIGNAL_TIMER(priv) G_STMT_START { \
|
#define JBUF_SIGNAL_TIMER(priv) G_STMT_START { \
|
||||||
if (G_UNLIKELY ((priv)->waiting_timer)) \
|
if (G_UNLIKELY ((priv)->waiting_timer)) { \
|
||||||
|
GST_DEBUG ("signal timer"); \
|
||||||
g_cond_signal (&(priv)->jbuf_timer); \
|
g_cond_signal (&(priv)->jbuf_timer); \
|
||||||
|
} \
|
||||||
} G_STMT_END
|
} G_STMT_END
|
||||||
|
|
||||||
#define JBUF_WAIT_EVENT(priv,label) G_STMT_START { \
|
#define JBUF_WAIT_EVENT(priv,label) G_STMT_START { \
|
||||||
|
GST_DEBUG ("waiting event"); \
|
||||||
(priv)->waiting_event = TRUE; \
|
(priv)->waiting_event = TRUE; \
|
||||||
g_cond_wait (&(priv)->jbuf_event, &(priv)->jbuf_lock); \
|
g_cond_wait (&(priv)->jbuf_event, &(priv)->jbuf_lock); \
|
||||||
(priv)->waiting_event = FALSE; \
|
(priv)->waiting_event = FALSE; \
|
||||||
|
GST_DEBUG ("waiting event done"); \
|
||||||
if (G_UNLIKELY (priv->srcresult != GST_FLOW_OK)) \
|
if (G_UNLIKELY (priv->srcresult != GST_FLOW_OK)) \
|
||||||
goto label; \
|
goto label; \
|
||||||
} G_STMT_END
|
} G_STMT_END
|
||||||
#define JBUF_SIGNAL_EVENT(priv) G_STMT_START { \
|
#define JBUF_SIGNAL_EVENT(priv) G_STMT_START { \
|
||||||
if (G_UNLIKELY ((priv)->waiting_event)) \
|
if (G_UNLIKELY ((priv)->waiting_event)) { \
|
||||||
|
GST_DEBUG ("signal timer"); \
|
||||||
g_cond_signal (&(priv)->jbuf_event); \
|
g_cond_signal (&(priv)->jbuf_event); \
|
||||||
|
} \
|
||||||
} G_STMT_END
|
} G_STMT_END
|
||||||
|
|
||||||
struct _GstRtpJitterBufferPrivate
|
struct _GstRtpJitterBufferPrivate
|
||||||
|
@ -2693,9 +2701,7 @@ wait_next_timeout (GstRtpJitterBuffer * jitterbuffer)
|
||||||
priv->clock_id = NULL;
|
priv->clock_id = NULL;
|
||||||
} else {
|
} else {
|
||||||
/* no timers, wait for activity */
|
/* no timers, wait for activity */
|
||||||
GST_DEBUG_OBJECT (jitterbuffer, "waiting");
|
|
||||||
JBUF_WAIT_TIMER (priv);
|
JBUF_WAIT_TIMER (priv);
|
||||||
GST_DEBUG_OBJECT (jitterbuffer, "waiting done");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
JBUF_UNLOCK (priv);
|
JBUF_UNLOCK (priv);
|
||||||
|
@ -2722,10 +2728,8 @@ gst_rtp_jitter_buffer_loop (GstRtpJitterBuffer * jitterbuffer)
|
||||||
do {
|
do {
|
||||||
result = handle_next_buffer (jitterbuffer);
|
result = handle_next_buffer (jitterbuffer);
|
||||||
if (G_LIKELY (result == GST_FLOW_WAIT)) {
|
if (G_LIKELY (result == GST_FLOW_WAIT)) {
|
||||||
GST_DEBUG_OBJECT (jitterbuffer, "waiting for event");
|
|
||||||
/* now wait for the next event */
|
/* now wait for the next event */
|
||||||
JBUF_WAIT_EVENT (priv, flushing);
|
JBUF_WAIT_EVENT (priv, flushing);
|
||||||
GST_DEBUG_OBJECT (jitterbuffer, "waiting for event done");
|
|
||||||
result = GST_FLOW_OK;
|
result = GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue