From 7f27b81e05e7b56eaee7bae7bfa90184063a1f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 13 Jan 2015 17:00:51 +0100 Subject: [PATCH] inter: Use a #define for the default value of the channel property --- gst/inter/gstinteraudiosink.c | 6 ++++-- gst/inter/gstinteraudiosrc.c | 6 ++++-- gst/inter/gstintersubsink.c | 6 ++++-- gst/inter/gstintersubsrc.c | 6 ++++-- gst/inter/gstintervideosink.c | 6 ++++-- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/gst/inter/gstinteraudiosink.c b/gst/inter/gstinteraudiosink.c index 22ab7ed05a..d8e34ea77a 100644 --- a/gst/inter/gstinteraudiosink.c +++ b/gst/inter/gstinteraudiosink.c @@ -76,6 +76,8 @@ enum PROP_CHANNEL }; +#define DEFAULT_CHANNEL ("default") + /* pad templates */ static GstStaticPadTemplate gst_inter_audio_sink_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", @@ -121,13 +123,13 @@ gst_inter_audio_sink_class_init (GstInterAudioSinkClass * klass) g_object_class_install_property (gobject_class, PROP_CHANNEL, g_param_spec_string ("channel", "Channel", "Channel name to match inter src and sink elements", - "default", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + DEFAULT_CHANNEL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); } static void gst_inter_audio_sink_init (GstInterAudioSink * interaudiosink) { - interaudiosink->channel = g_strdup ("default"); + interaudiosink->channel = g_strdup (DEFAULT_CHANNEL); interaudiosink->input_adapter = gst_adapter_new (); } diff --git a/gst/inter/gstinteraudiosrc.c b/gst/inter/gstinteraudiosrc.c index 9ee416de43..01522f27a0 100644 --- a/gst/inter/gstinteraudiosrc.c +++ b/gst/inter/gstinteraudiosrc.c @@ -80,6 +80,8 @@ enum PROP_PERIOD_TIME }; +#define DEFAULT_CHANNEL ("default") + /* pad templates */ static GstStaticPadTemplate gst_inter_audio_src_src_template = GST_STATIC_PAD_TEMPLATE ("src", @@ -128,7 +130,7 @@ gst_inter_audio_src_class_init (GstInterAudioSrcClass * klass) g_object_class_install_property (gobject_class, PROP_CHANNEL, g_param_spec_string ("channel", "Channel", "Channel name to match inter src and sink elements", - "default", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + DEFAULT_CHANNEL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_BUFFER_TIME, g_param_spec_uint64 ("buffer-time", "Buffer Time", @@ -155,7 +157,7 @@ gst_inter_audio_src_init (GstInterAudioSrc * interaudiosrc) gst_base_src_set_live (GST_BASE_SRC (interaudiosrc), TRUE); gst_base_src_set_blocksize (GST_BASE_SRC (interaudiosrc), -1); - interaudiosrc->channel = g_strdup ("default"); + interaudiosrc->channel = g_strdup (DEFAULT_CHANNEL); interaudiosrc->buffer_time = DEFAULT_AUDIO_BUFFER_TIME; interaudiosrc->latency_time = DEFAULT_AUDIO_LATENCY_TIME; interaudiosrc->period_time = DEFAULT_AUDIO_PERIOD_TIME; diff --git a/gst/inter/gstintersubsink.c b/gst/inter/gstintersubsink.c index c6428967a7..b907c0a28b 100644 --- a/gst/inter/gstintersubsink.c +++ b/gst/inter/gstintersubsink.c @@ -66,6 +66,8 @@ enum PROP_CHANNEL }; +#define DEFAULT_CHANNEL ("default") + /* pad templates */ static GstStaticPadTemplate gst_inter_sub_sink_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", @@ -109,13 +111,13 @@ gst_inter_sub_sink_class_init (GstInterSubSinkClass * klass) g_object_class_install_property (gobject_class, PROP_CHANNEL, g_param_spec_string ("channel", "Channel", "Channel name to match inter src and sink elements", - "default", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + DEFAULT_CHANNEL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); } static void gst_inter_sub_sink_init (GstInterSubSink * intersubsink) { - intersubsink->channel = g_strdup ("default"); + intersubsink->channel = g_strdup (DEFAULT_CHANNEL); intersubsink->fps_n = 1; intersubsink->fps_d = 1; diff --git a/gst/inter/gstintersubsrc.c b/gst/inter/gstintersubsrc.c index d47c7e3d4d..24efc9ff39 100644 --- a/gst/inter/gstintersubsrc.c +++ b/gst/inter/gstintersubsrc.c @@ -69,6 +69,8 @@ enum PROP_CHANNEL }; +#define DEFAULT_CHANNEL ("default") + /* pad templates */ static GstStaticPadTemplate gst_inter_sub_src_src_template = GST_STATIC_PAD_TEMPLATE ("src", @@ -111,7 +113,7 @@ gst_inter_sub_src_class_init (GstInterSubSrcClass * klass) g_object_class_install_property (gobject_class, PROP_CHANNEL, g_param_spec_string ("channel", "Channel", "Channel name to match inter src and sink elements", - "default", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + DEFAULT_CHANNEL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); } static void @@ -120,7 +122,7 @@ gst_inter_sub_src_init (GstInterSubSrc * intersubsrc) gst_base_src_set_format (GST_BASE_SRC (intersubsrc), GST_FORMAT_TIME); gst_base_src_set_live (GST_BASE_SRC (intersubsrc), TRUE); - intersubsrc->channel = g_strdup ("default"); + intersubsrc->channel = g_strdup (DEFAULT_CHANNEL); } void diff --git a/gst/inter/gstintervideosink.c b/gst/inter/gstintervideosink.c index be6e22d317..589150260b 100644 --- a/gst/inter/gstintervideosink.c +++ b/gst/inter/gstintervideosink.c @@ -72,6 +72,8 @@ enum PROP_CHANNEL }; +#define DEFAULT_CHANNEL ("default") + /* pad templates */ static GstStaticPadTemplate gst_inter_video_sink_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", @@ -116,13 +118,13 @@ gst_inter_video_sink_class_init (GstInterVideoSinkClass * klass) g_object_class_install_property (gobject_class, PROP_CHANNEL, g_param_spec_string ("channel", "Channel", "Channel name to match inter src and sink elements", - "default", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + DEFAULT_CHANNEL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); } static void gst_inter_video_sink_init (GstInterVideoSink * intervideosink) { - intervideosink->channel = g_strdup ("default"); + intervideosink->channel = g_strdup (DEFAULT_CHANNEL); } void