diff options
author | Sebastian Pölsterl <sebp@k-d-w.org> | 2009-11-21 01:17:25 +0100 |
---|---|---|
committer | Sebastian Pölsterl <sebp@k-d-w.org> | 2009-11-21 19:20:39 +0100 |
commit | 3d7610b03303efcf241b458c34d647eb60d8c849 (patch) | |
tree | ac2a64d77a7084bd729029f93d2ab9d44bf6f4fe | |
parent | 6d227be7a9143ab41d0c56bb6c85f7edb4ed7e03 (diff) |
client: dump rtsp message only if debug threshold is higher than GST_LEVEL_LOGsebp
-rw-r--r-- | gst/rtsp-server/rtsp-client.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c index 22477b2..c8f75dc 100644 --- a/gst/rtsp-server/rtsp-client.c +++ b/gst/rtsp-server/rtsp-client.c @@ -23,8 +23,6 @@ #include "rtsp-sdp.h" #include "rtsp-params.h" -#define DEBUG - static GMutex *tunnels_lock; static GHashTable *tunnels; @@ -191,9 +189,10 @@ send_response (GstRTSPClient * client, GstRTSPSession * session, gst_rtsp_message_take_header (response, GST_RTSP_HDR_SESSION, str); } -#ifdef DEBUG - gst_rtsp_message_dump (response); -#endif + + if (gst_debug_category_get_threshold (rtsp_client_debug) >= GST_LEVEL_LOG) { + gst_rtsp_message_dump (response); + } gst_rtsp_watch_send_message (client->watch, response, NULL); gst_rtsp_message_unset (response); @@ -1064,9 +1063,9 @@ handle_request (GstRTSPClient * client, GstRTSPMessage * request) GstRTSPSession *session; gchar *sessid; -#ifdef DEBUG - gst_rtsp_message_dump (request); -#endif + if (gst_debug_category_get_threshold (rtsp_client_debug) >= GST_LEVEL_LOG) { + gst_rtsp_message_dump (request); + } GST_INFO ("client %p: received a request", client); |