Rename property enums from ARG_ to PROP_

Property enum items should be named PROP_ for consistency and readability.
This commit is contained in:
Luis de Bethencourt 2015-04-27 11:26:10 +01:00
parent 9dfe40d740
commit 69f66aff9e
3 changed files with 35 additions and 35 deletions

View file

@ -97,9 +97,9 @@ enum
enum enum
{ {
ARG_0, PROP_0,
ARG_DITHERING, PROP_DITHERING,
ARG_NOISE_SHAPING, PROP_NOISE_SHAPING,
}; };
#define DEBUG_INIT \ #define DEBUG_INIT \
@ -183,13 +183,13 @@ gst_audio_convert_class_init (GstAudioConvertClass * klass)
gobject_class->set_property = gst_audio_convert_set_property; gobject_class->set_property = gst_audio_convert_set_property;
gobject_class->get_property = gst_audio_convert_get_property; gobject_class->get_property = gst_audio_convert_get_property;
g_object_class_install_property (gobject_class, ARG_DITHERING, g_object_class_install_property (gobject_class, PROP_DITHERING,
g_param_spec_enum ("dithering", "Dithering", g_param_spec_enum ("dithering", "Dithering",
"Selects between different dithering methods.", "Selects between different dithering methods.",
GST_TYPE_AUDIO_CONVERT_DITHERING, DITHER_TPDF, GST_TYPE_AUDIO_CONVERT_DITHERING, DITHER_TPDF,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_NOISE_SHAPING, g_object_class_install_property (gobject_class, PROP_NOISE_SHAPING,
g_param_spec_enum ("noise-shaping", "Noise shaping", g_param_spec_enum ("noise-shaping", "Noise shaping",
"Selects between different noise shaping methods.", "Selects between different noise shaping methods.",
GST_TYPE_AUDIO_CONVERT_NOISE_SHAPING, NOISE_SHAPING_NONE, GST_TYPE_AUDIO_CONVERT_NOISE_SHAPING, NOISE_SHAPING_NONE,
@ -867,10 +867,10 @@ gst_audio_convert_set_property (GObject * object, guint prop_id,
GstAudioConvert *this = GST_AUDIO_CONVERT (object); GstAudioConvert *this = GST_AUDIO_CONVERT (object);
switch (prop_id) { switch (prop_id) {
case ARG_DITHERING: case PROP_DITHERING:
this->dither = g_value_get_enum (value); this->dither = g_value_get_enum (value);
break; break;
case ARG_NOISE_SHAPING: case PROP_NOISE_SHAPING:
this->ns = g_value_get_enum (value); this->ns = g_value_get_enum (value);
break; break;
default: default:
@ -886,10 +886,10 @@ gst_audio_convert_get_property (GObject * object, guint prop_id,
GstAudioConvert *this = GST_AUDIO_CONVERT (object); GstAudioConvert *this = GST_AUDIO_CONVERT (object);
switch (prop_id) { switch (prop_id) {
case ARG_DITHERING: case PROP_DITHERING:
g_value_set_enum (value, this->dither); g_value_set_enum (value, this->dither);
break; break;
case ARG_NOISE_SHAPING: case PROP_NOISE_SHAPING:
g_value_set_enum (value, this->ns); g_value_set_enum (value, this->ns);
break; break;
default: default:

View file

@ -82,14 +82,14 @@ enum
enum enum
{ {
ARG_0, PROP_0,
ARG_IN, PROP_IN,
ARG_OUT, PROP_OUT,
ARG_ADD, PROP_ADD,
ARG_DROP, PROP_DROP,
ARG_SILENT, PROP_SILENT,
ARG_TOLERANCE, PROP_TOLERANCE,
ARG_SKIP_TO_FIRST PROP_SKIP_TO_FIRST
}; };
static GstStaticPadTemplate gst_audio_rate_src_template = static GstStaticPadTemplate gst_audio_rate_src_template =
@ -140,20 +140,20 @@ gst_audio_rate_class_init (GstAudioRateClass * klass)
object_class->set_property = gst_audio_rate_set_property; object_class->set_property = gst_audio_rate_set_property;
object_class->get_property = gst_audio_rate_get_property; object_class->get_property = gst_audio_rate_get_property;
g_object_class_install_property (object_class, ARG_IN, g_object_class_install_property (object_class, PROP_IN,
g_param_spec_uint64 ("in", "In", g_param_spec_uint64 ("in", "In",
"Number of input samples", 0, G_MAXUINT64, 0, "Number of input samples", 0, G_MAXUINT64, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, ARG_OUT, g_object_class_install_property (object_class, PROP_OUT,
g_param_spec_uint64 ("out", "Out", "Number of output samples", 0, g_param_spec_uint64 ("out", "Out", "Number of output samples", 0,
G_MAXUINT64, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); G_MAXUINT64, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
pspec_add = g_param_spec_uint64 ("add", "Add", "Number of added samples", pspec_add = g_param_spec_uint64 ("add", "Add", "Number of added samples",
0, G_MAXUINT64, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); 0, G_MAXUINT64, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, ARG_ADD, pspec_add); g_object_class_install_property (object_class, PROP_ADD, pspec_add);
pspec_drop = g_param_spec_uint64 ("drop", "Drop", "Number of dropped samples", pspec_drop = g_param_spec_uint64 ("drop", "Drop", "Number of dropped samples",
0, G_MAXUINT64, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); 0, G_MAXUINT64, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, ARG_DROP, pspec_drop); g_object_class_install_property (object_class, PROP_DROP, pspec_drop);
g_object_class_install_property (object_class, ARG_SILENT, g_object_class_install_property (object_class, PROP_SILENT,
g_param_spec_boolean ("silent", "silent", g_param_spec_boolean ("silent", "silent",
"Don't emit notify for dropped and duplicated frames", DEFAULT_SILENT, "Don't emit notify for dropped and duplicated frames", DEFAULT_SILENT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
@ -163,7 +163,7 @@ gst_audio_rate_class_init (GstAudioRateClass * klass)
* The difference between incoming timestamp and next timestamp must exceed * The difference between incoming timestamp and next timestamp must exceed
* the given value for audiorate to add or drop samples. * the given value for audiorate to add or drop samples.
*/ */
g_object_class_install_property (object_class, ARG_TOLERANCE, g_object_class_install_property (object_class, PROP_TOLERANCE,
g_param_spec_uint64 ("tolerance", "tolerance", g_param_spec_uint64 ("tolerance", "tolerance",
"Only act if timestamp jitter/imperfection exceeds indicated tolerance (ns)", "Only act if timestamp jitter/imperfection exceeds indicated tolerance (ns)",
0, G_MAXUINT64, DEFAULT_TOLERANCE, 0, G_MAXUINT64, DEFAULT_TOLERANCE,
@ -174,7 +174,7 @@ gst_audio_rate_class_init (GstAudioRateClass * klass)
* *
* Don't produce buffers before the first one we receive. * Don't produce buffers before the first one we receive.
*/ */
g_object_class_install_property (object_class, ARG_SKIP_TO_FIRST, g_object_class_install_property (object_class, PROP_SKIP_TO_FIRST,
g_param_spec_boolean ("skip-to-first", "Skip to first buffer", g_param_spec_boolean ("skip-to-first", "Skip to first buffer",
"Don't produce buffers before the first one we receive", "Don't produce buffers before the first one we receive",
DEFAULT_SKIP_TO_FIRST, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); DEFAULT_SKIP_TO_FIRST, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
@ -686,13 +686,13 @@ gst_audio_rate_set_property (GObject * object,
GstAudioRate *audiorate = GST_AUDIO_RATE (object); GstAudioRate *audiorate = GST_AUDIO_RATE (object);
switch (prop_id) { switch (prop_id) {
case ARG_SILENT: case PROP_SILENT:
audiorate->silent = g_value_get_boolean (value); audiorate->silent = g_value_get_boolean (value);
break; break;
case ARG_TOLERANCE: case PROP_TOLERANCE:
audiorate->tolerance = g_value_get_uint64 (value); audiorate->tolerance = g_value_get_uint64 (value);
break; break;
case ARG_SKIP_TO_FIRST: case PROP_SKIP_TO_FIRST:
audiorate->skip_to_first = g_value_get_boolean (value); audiorate->skip_to_first = g_value_get_boolean (value);
break; break;
default: default:
@ -708,25 +708,25 @@ gst_audio_rate_get_property (GObject * object,
GstAudioRate *audiorate = GST_AUDIO_RATE (object); GstAudioRate *audiorate = GST_AUDIO_RATE (object);
switch (prop_id) { switch (prop_id) {
case ARG_IN: case PROP_IN:
g_value_set_uint64 (value, audiorate->in); g_value_set_uint64 (value, audiorate->in);
break; break;
case ARG_OUT: case PROP_OUT:
g_value_set_uint64 (value, audiorate->out); g_value_set_uint64 (value, audiorate->out);
break; break;
case ARG_ADD: case PROP_ADD:
g_value_set_uint64 (value, audiorate->add); g_value_set_uint64 (value, audiorate->add);
break; break;
case ARG_DROP: case PROP_DROP:
g_value_set_uint64 (value, audiorate->drop); g_value_set_uint64 (value, audiorate->drop);
break; break;
case ARG_SILENT: case PROP_SILENT:
g_value_set_boolean (value, audiorate->silent); g_value_set_boolean (value, audiorate->silent);
break; break;
case ARG_TOLERANCE: case PROP_TOLERANCE:
g_value_set_uint64 (value, audiorate->tolerance); g_value_set_uint64 (value, audiorate->tolerance);
break; break;
case ARG_SKIP_TO_FIRST: case PROP_SKIP_TO_FIRST:
g_value_set_boolean (value, audiorate->skip_to_first); g_value_set_boolean (value, audiorate->skip_to_first);
break; break;
default: default:

View file

@ -61,7 +61,7 @@ enum
enum enum
{ {
ARG_0 PROP_0
/* FILL ME */ /* FILL ME */
}; };