mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
inter: Use a #define for the default value of the channel property
This commit is contained in:
parent
cd5b64133e
commit
7f27b81e05
5 changed files with 20 additions and 10 deletions
|
@ -76,6 +76,8 @@ enum
|
||||||
PROP_CHANNEL
|
PROP_CHANNEL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define DEFAULT_CHANNEL ("default")
|
||||||
|
|
||||||
/* pad templates */
|
/* pad templates */
|
||||||
static GstStaticPadTemplate gst_inter_audio_sink_sink_template =
|
static GstStaticPadTemplate gst_inter_audio_sink_sink_template =
|
||||||
GST_STATIC_PAD_TEMPLATE ("sink",
|
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_object_class_install_property (gobject_class, PROP_CHANNEL,
|
||||||
g_param_spec_string ("channel", "Channel",
|
g_param_spec_string ("channel", "Channel",
|
||||||
"Channel name to match inter src and sink elements",
|
"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
|
static void
|
||||||
gst_inter_audio_sink_init (GstInterAudioSink * interaudiosink)
|
gst_inter_audio_sink_init (GstInterAudioSink * interaudiosink)
|
||||||
{
|
{
|
||||||
interaudiosink->channel = g_strdup ("default");
|
interaudiosink->channel = g_strdup (DEFAULT_CHANNEL);
|
||||||
interaudiosink->input_adapter = gst_adapter_new ();
|
interaudiosink->input_adapter = gst_adapter_new ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,8 @@ enum
|
||||||
PROP_PERIOD_TIME
|
PROP_PERIOD_TIME
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define DEFAULT_CHANNEL ("default")
|
||||||
|
|
||||||
/* pad templates */
|
/* pad templates */
|
||||||
static GstStaticPadTemplate gst_inter_audio_src_src_template =
|
static GstStaticPadTemplate gst_inter_audio_src_src_template =
|
||||||
GST_STATIC_PAD_TEMPLATE ("src",
|
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_object_class_install_property (gobject_class, PROP_CHANNEL,
|
||||||
g_param_spec_string ("channel", "Channel",
|
g_param_spec_string ("channel", "Channel",
|
||||||
"Channel name to match inter src and sink elements",
|
"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_object_class_install_property (gobject_class, PROP_BUFFER_TIME,
|
||||||
g_param_spec_uint64 ("buffer-time", "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_live (GST_BASE_SRC (interaudiosrc), TRUE);
|
||||||
gst_base_src_set_blocksize (GST_BASE_SRC (interaudiosrc), -1);
|
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->buffer_time = DEFAULT_AUDIO_BUFFER_TIME;
|
||||||
interaudiosrc->latency_time = DEFAULT_AUDIO_LATENCY_TIME;
|
interaudiosrc->latency_time = DEFAULT_AUDIO_LATENCY_TIME;
|
||||||
interaudiosrc->period_time = DEFAULT_AUDIO_PERIOD_TIME;
|
interaudiosrc->period_time = DEFAULT_AUDIO_PERIOD_TIME;
|
||||||
|
|
|
@ -66,6 +66,8 @@ enum
|
||||||
PROP_CHANNEL
|
PROP_CHANNEL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define DEFAULT_CHANNEL ("default")
|
||||||
|
|
||||||
/* pad templates */
|
/* pad templates */
|
||||||
static GstStaticPadTemplate gst_inter_sub_sink_sink_template =
|
static GstStaticPadTemplate gst_inter_sub_sink_sink_template =
|
||||||
GST_STATIC_PAD_TEMPLATE ("sink",
|
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_object_class_install_property (gobject_class, PROP_CHANNEL,
|
||||||
g_param_spec_string ("channel", "Channel",
|
g_param_spec_string ("channel", "Channel",
|
||||||
"Channel name to match inter src and sink elements",
|
"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
|
static void
|
||||||
gst_inter_sub_sink_init (GstInterSubSink * intersubsink)
|
gst_inter_sub_sink_init (GstInterSubSink * intersubsink)
|
||||||
{
|
{
|
||||||
intersubsink->channel = g_strdup ("default");
|
intersubsink->channel = g_strdup (DEFAULT_CHANNEL);
|
||||||
|
|
||||||
intersubsink->fps_n = 1;
|
intersubsink->fps_n = 1;
|
||||||
intersubsink->fps_d = 1;
|
intersubsink->fps_d = 1;
|
||||||
|
|
|
@ -69,6 +69,8 @@ enum
|
||||||
PROP_CHANNEL
|
PROP_CHANNEL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define DEFAULT_CHANNEL ("default")
|
||||||
|
|
||||||
/* pad templates */
|
/* pad templates */
|
||||||
static GstStaticPadTemplate gst_inter_sub_src_src_template =
|
static GstStaticPadTemplate gst_inter_sub_src_src_template =
|
||||||
GST_STATIC_PAD_TEMPLATE ("src",
|
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_object_class_install_property (gobject_class, PROP_CHANNEL,
|
||||||
g_param_spec_string ("channel", "Channel",
|
g_param_spec_string ("channel", "Channel",
|
||||||
"Channel name to match inter src and sink elements",
|
"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
|
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_format (GST_BASE_SRC (intersubsrc), GST_FORMAT_TIME);
|
||||||
gst_base_src_set_live (GST_BASE_SRC (intersubsrc), TRUE);
|
gst_base_src_set_live (GST_BASE_SRC (intersubsrc), TRUE);
|
||||||
|
|
||||||
intersubsrc->channel = g_strdup ("default");
|
intersubsrc->channel = g_strdup (DEFAULT_CHANNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -72,6 +72,8 @@ enum
|
||||||
PROP_CHANNEL
|
PROP_CHANNEL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define DEFAULT_CHANNEL ("default")
|
||||||
|
|
||||||
/* pad templates */
|
/* pad templates */
|
||||||
static GstStaticPadTemplate gst_inter_video_sink_sink_template =
|
static GstStaticPadTemplate gst_inter_video_sink_sink_template =
|
||||||
GST_STATIC_PAD_TEMPLATE ("sink",
|
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_object_class_install_property (gobject_class, PROP_CHANNEL,
|
||||||
g_param_spec_string ("channel", "Channel",
|
g_param_spec_string ("channel", "Channel",
|
||||||
"Channel name to match inter src and sink elements",
|
"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
|
static void
|
||||||
gst_inter_video_sink_init (GstInterVideoSink * intervideosink)
|
gst_inter_video_sink_init (GstInterVideoSink * intervideosink)
|
||||||
{
|
{
|
||||||
intervideosink->channel = g_strdup ("default");
|
intervideosink->channel = g_strdup (DEFAULT_CHANNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue