mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
rtpdtmfsrc: minor logging clean-up
Only serialise event structure for debug logging purposes if logging is actually enabled. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7060>
This commit is contained in:
parent
62047a9f8d
commit
8d845d4a02
1 changed files with 6 additions and 7 deletions
|
@ -352,9 +352,7 @@ gst_rtp_dtmf_src_handle_custom_upstream (GstRTPDTMFSrc * dtmfsrc,
|
|||
GstEvent * event)
|
||||
{
|
||||
gboolean result = FALSE;
|
||||
gchar *struct_str;
|
||||
const GstStructure *structure;
|
||||
|
||||
GstState state;
|
||||
GstStateChangeReturn ret;
|
||||
|
||||
|
@ -364,11 +362,10 @@ gst_rtp_dtmf_src_handle_custom_upstream (GstRTPDTMFSrc * dtmfsrc,
|
|||
goto ret;
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (dtmfsrc, "Received event is of our interest");
|
||||
structure = gst_event_get_structure (event);
|
||||
struct_str = gst_structure_to_string (structure);
|
||||
GST_DEBUG_OBJECT (dtmfsrc, "Event has structure %s", struct_str);
|
||||
g_free (struct_str);
|
||||
|
||||
GST_DEBUG_OBJECT (dtmfsrc, "Received event: %" GST_PTR_FORMAT, structure);
|
||||
|
||||
if (structure && gst_structure_has_name (structure, "dtmf-event"))
|
||||
result = gst_rtp_dtmf_src_handle_dtmf_event (dtmfsrc, structure);
|
||||
|
||||
|
@ -384,7 +381,9 @@ gst_rtp_dtmf_src_handle_event (GstBaseSrc * basesrc, GstEvent * event)
|
|||
|
||||
dtmfsrc = GST_RTP_DTMF_SRC (basesrc);
|
||||
|
||||
GST_DEBUG_OBJECT (dtmfsrc, "Received an event on the src pad");
|
||||
GST_DEBUG_OBJECT (dtmfsrc, "Received %s event on the src pad",
|
||||
GST_EVENT_TYPE_NAME (event));
|
||||
|
||||
if (GST_EVENT_TYPE (event) == GST_EVENT_CUSTOM_UPSTREAM) {
|
||||
result = gst_rtp_dtmf_src_handle_custom_upstream (dtmfsrc, event);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue