rtp: fec: fix build with gstreamer debug log system disabled
diff --git a/gst/rtp/gstrtpreddec.c b/gst/rtp/gstrtpreddec.c
index e9412db..6a22972 100644
--- a/gst/rtp/gstrtpreddec.c
+++ b/gst/rtp/gstrtpreddec.c
@@ -51,7 +51,7 @@
#define DEFAULT_PT UNDEF_PT
GST_DEBUG_CATEGORY_STATIC (gst_rtp_red_dec_debug);
-#define GST_CAT_DEFAULT (gst_rtp_red_dec_debug)
+#define GST_CAT_DEFAULT gst_rtp_red_dec_debug
G_DEFINE_TYPE (GstRtpRedDec, gst_rtp_red_dec, GST_TYPE_ELEMENT);
@@ -432,13 +432,6 @@
{
GstRtpRedDec *self = GST_RTP_RED_DEC (object);
- if (GST_LEVEL_LOG <= gst_debug_category_get_threshold (GST_CAT_DEFAULT)) {
- gchar *val_str = gst_value_serialize (value);
- GST_LOG_OBJECT (object, "Setting property \"%s\" to %s", pspec->name,
- val_str);
- g_free (val_str);
- }
-
switch (prop_id) {
case PROP_PT:
self->pt = g_value_get_int (value);
@@ -465,13 +458,6 @@
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
-
- if (GST_LEVEL_LOG <= gst_debug_category_get_threshold (GST_CAT_DEFAULT)) {
- gchar *val_str = gst_value_serialize (value);
- GST_LOG_OBJECT (object, "Returning property \"%s\" %s", pspec->name,
- val_str);
- g_free (val_str);
- }
}
static void
diff --git a/gst/rtp/gstrtpstorage.c b/gst/rtp/gstrtpstorage.c
index 9c0db93..d35b3de 100644
--- a/gst/rtp/gstrtpstorage.c
+++ b/gst/rtp/gstrtpstorage.c
@@ -65,13 +65,6 @@
{
GstRtpStorage *self = GST_RTP_STORAGE (object);
- if (GST_LEVEL_DEBUG <= gst_debug_category_get_threshold (GST_CAT_DEFAULT)) {
- gchar *val_str = gst_value_serialize (value);
- GST_DEBUG_OBJECT (object, "Setting property \"%s\" to %s", pspec->name,
- val_str);
- g_free (val_str);
- }
-
switch (prop_id) {
case PROP_SIZE_TIME:
rtp_storage_set_size (self->storage, g_value_get_uint64 (value));
@@ -100,13 +93,6 @@
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
-
- if (GST_LEVEL_LOG <= gst_debug_category_get_threshold (GST_CAT_DEFAULT)) {
- gchar *val_str = gst_value_serialize (value);
- GST_LOG_OBJECT (object, "Returning property \"%s\" %s", pspec->name,
- val_str);
- g_free (val_str);
- }
}
static void
diff --git a/gst/rtp/gstrtpulpfecdec.c b/gst/rtp/gstrtpulpfecdec.c
index 7f0f910..c9be119 100644
--- a/gst/rtp/gstrtpulpfecdec.c
+++ b/gst/rtp/gstrtpulpfecdec.c
@@ -506,13 +506,6 @@
{
GstRtpUlpFecDec *self = GST_RTP_ULPFEC_DEC (object);
- if (GST_LEVEL_LOG <= gst_debug_category_get_threshold (GST_CAT_DEFAULT)) {
- gchar *val_str = gst_value_serialize (value);
- GST_LOG_OBJECT (object, "Setting property \"%s\" to %s", pspec->name,
- val_str);
- g_free (val_str);
- }
-
switch (prop_id) {
case PROP_PT:
self->fec_pt = g_value_get_uint (value);
@@ -553,13 +546,6 @@
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
-
- if (GST_LEVEL_LOG <= gst_debug_category_get_threshold (GST_CAT_DEFAULT)) {
- gchar *val_str = gst_value_serialize (value);
- GST_LOG_OBJECT (object, "Returning property \"%s\" %s", pspec->name,
- val_str);
- g_free (val_str);
- }
}
static void
diff --git a/gst/rtp/gstrtpulpfecenc.c b/gst/rtp/gstrtpulpfecenc.c
index f4e5641..43a735d 100644
--- a/gst/rtp/gstrtpulpfecenc.c
+++ b/gst/rtp/gstrtpulpfecenc.c
@@ -524,13 +524,6 @@
{
GstRtpUlpFecEnc *fec = GST_RTP_ULPFEC_ENC (object);
- if (GST_LEVEL_LOG <= gst_debug_category_get_threshold (GST_CAT_DEFAULT)) {
- gchar *val_str = gst_value_serialize (value);
- GST_LOG_OBJECT (object, "Setting property \"%s\" to %s", pspec->name,
- val_str);
- g_free (val_str);
- }
-
switch (prop_id) {
case PROP_PT:
fec->pt = g_value_get_uint (value);
@@ -592,13 +585,6 @@
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
-
- if (GST_LEVEL_LOG <= gst_debug_category_get_threshold (GST_CAT_DEFAULT)) {
- gchar *val_str = gst_value_serialize (value);
- GST_LOG_OBJECT (object, "Returning property \"%s\" %s", pspec->name,
- val_str);
- g_free (val_str);
- }
}
static void
diff --git a/gst/rtp/rtpulpfeccommon.c b/gst/rtp/rtpulpfeccommon.c
index 1960404..9bca5df 100644
--- a/gst/rtp/rtpulpfeccommon.c
+++ b/gst/rtp/rtpulpfeccommon.c
@@ -369,6 +369,7 @@
}
}
+#ifndef GST_DISABLE_GST_DEBUG
void
rtp_ulpfec_log_rtppacket (GstDebugCategory * cat, GstDebugLevel level,
gpointer object, const gchar * name, GstRTPBuffer * rtp)
@@ -398,7 +399,9 @@
gst_rtp_buffer_get_packet_len (rtp) - MIN_RTP_HEADER_LEN,
gst_rtp_buffer_get_payload_len (rtp));
}
+#endif /* GST_DISABLE_GST_DEBUG */
+#ifndef GST_DISABLE_GST_DEBUG
void
rtp_ulpfec_log_fec_packet (GstDebugCategory * cat, GstDebugLevel level,
gpointer object, GstRTPBuffer * fecrtp)
@@ -432,3 +435,4 @@
g_ntohs (fec_level_hdr->protection_len),
fec_level_hdr_get_mask (fec_level_hdr, fec_hdr->L));
}
+#endif /* GST_DISABLE_GST_DEBUG */
diff --git a/gst/rtp/rtpulpfeccommon.h b/gst/rtp/rtpulpfeccommon.h
index 496bc5f..6735831 100644
--- a/gst/rtp/rtpulpfeccommon.h
+++ b/gst/rtp/rtpulpfeccommon.h
@@ -21,7 +21,8 @@
#ifndef __RTP_ULPFEC_COMMON_H__
#define __RTP_ULPFEC_COMMON_H__
-#include <gst/rtp/gstrtpbuffer.h>
+#include <gst/gst.h>
+#include <gst/rtp/rtp.h>
G_BEGIN_DECLS
@@ -120,11 +121,19 @@
GstBuffer * rtp_ulpfec_bitstring_to_fec_rtp_buffer (GArray *arr, guint16 seq_base, gboolean fec_mask_long,
guint64 fec_mask, gboolean marker, guint8 pt, guint16 seq,
guint32 timestamp, guint32 ssrc);
+
+#ifndef GST_DISABLE_GST_DEBUG
void rtp_ulpfec_log_rtppacket (GstDebugCategory * cat, GstDebugLevel level,
gpointer object, const gchar *name,
GstRTPBuffer *rtp);
+
void rtp_ulpfec_log_fec_packet (GstDebugCategory * cat, GstDebugLevel level,
gpointer object, GstRTPBuffer *fecrtp);
+#else
+#define rtp_ulpfec_log_rtppacket(cat,level,obj,name,rtp) /* NOOP */
+#define rtp_ulpfec_log_fec_packet(cat,level,obj,fecrtp) /* NOOP */
+#endif
+
RtpUlpFecHeader * rtp_ulpfec_buffer_get_fechdr (GstRTPBuffer *rtp);
guint rtp_ulpfec_get_headers_len (gboolean fec_mask_long);
guint16 rtp_ulpfec_hdr_get_protection_len (RtpUlpFecHeader const *fec_hdr);