From 03ae66062ba936ac8e83a3ab5fa906c221639212 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 27 May 2009 11:15:22 +0200 Subject: [PATCH] media: fix message Fix a debug message Make dumping RTCP stats configurable --- gst/rtsp-server/rtsp-media.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/gst/rtsp-server/rtsp-media.c b/gst/rtsp-server/rtsp-media.c index db6f23f..3328b27 100644 --- a/gst/rtsp-server/rtsp-media.c +++ b/gst/rtsp-server/rtsp-media.c @@ -27,6 +27,9 @@ #define DEFAULT_SHARED FALSE #define DEFAULT_REUSABLE FALSE +/* define to dump received RTCP packets */ +#undef DUMP_STATS + enum { PROP_0, @@ -792,10 +795,21 @@ on_ssrc_active (GObject *session, GObject *source, GstRTSPMediaStream *stream) trans = g_object_get_qdata (source, ssrc_stream_map_key); - g_message ("%p: source %p in transport %p is active", stream, trans, source); + g_message ("%p: source %p in transport %p is active", stream, source, trans); if (trans && trans->keep_alive) trans->keep_alive (trans->ka_user_data); + +#ifdef DUMP_STATS + { + GstStructure *stats; + g_object_get (source, "stats", &stats, NULL); + if (stats) { + dump_structure (stats); + gst_structure_free (stats); + } + } +#endif } static void -- 2.7.4