fix up more enums

Original commit message from CVS:
fix up more enums
parent a6e0bc89
2005-11-22 Thomas Vander Stichele <thomas at apestaart dot org>
* ext/aalib/gstaasink.c:
* ext/dv/gstdvdec.c:
* ext/esd/esdmon.c:
* ext/flac/gstflacenc.c:
* ext/gdk_pixbuf/pixbufscale.c:
* ext/libcaca/gstcacasink.c:
* ext/shout2/gstshout2.c:
* gst/alpha/gstalpha.c:
* gst/oldcore/gstaggregator.c:
* gst/oldcore/gstshaper.c:
* gst/smpte/barboxwipes.c:
* gst/smpte/gstsmpte.c:
* gst/videobox/gstvideobox.c:
* gst/videofilter/gstvideoflip.c:
* gst/videomixer/videomixer.c:
fix up more enums
2005-11-22 Michael Smith <msmith@fluendo.com>
* gst/videomixer/videomixer.c: (gst_videomixer_pad_sink_setcaps),
......
......@@ -133,8 +133,8 @@ gst_aasink_drivers_get_type (void)
for (i = 0; i < n_drivers; i++) {
driver = aa_drivers[i];
drivers[i].value = i;
drivers[i].value_name = g_strdup (driver->shortname);
drivers[i].value_nick = g_strdup (driver->name);
drivers[i].value_name = g_strdup (driver->name);
drivers[i].value_nick = g_utf8_strdown (driver->shortname, -1);
}
drivers[i].value = 0;
drivers[i].value_name = NULL;
......@@ -165,7 +165,8 @@ gst_aasink_dither_get_type (void)
for (i = 0; i < n_ditherers; i++) {
ditherers[i].value = i;
ditherers[i].value_name = g_strdup (aa_dithernames[i]);
ditherers[i].value_nick = g_strdup (aa_dithernames[i]);
ditherers[i].value_nick =
g_strdelimit (g_strdup (aa_dithernames[i]), " _", '-');
}
ditherers[i].value = 0;
ditherers[i].value_name = NULL;
......@@ -547,4 +548,4 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"aasink",
"ASCII Art video sink",
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
......@@ -95,13 +95,12 @@ gst_dvdec_quality_get_type (void)
if (qtype == 0) {
static const GEnumValue values[] = {
{0, "DV_QUALITY_FASTEST", "Fastest decoding, low-quality mono"},
{1, "DV_QUALITY_AC_1", "Mono decoding using the first AC coefficient"},
{2, "DV_QUALITY_AC_2", "Highest quality mono decoding"},
{3, "DV_QUALITY_DC|DV_QUALITY_COLOUR", "Fastest colour decoding"},
{4, "DV_QUALITY_AC_1|DV_QUALITY_COLOUR",
"Colour, using only the first AC coefficient"},
{5, "DV_QUALITY_BEST", "Highest quality colour decoding"},
{0, "Monochrome, DC (Fastest)", "fastest"},
{1, "Monochrome, first AC coefficient", "monochrome-ac"},
{2, "Monochrome, highest quality", "monochrome-best"},
{3, "Colour, DC, fastest", "colour-fastest"},
{4, "Colour, using only the first AC coefficient", "colour-ac"},
{5, "Highest quality colour decoding", "best"},
{0, NULL, NULL},
};
......
......@@ -93,8 +93,8 @@ gst_esdmon_depths_get_type (void)
{
static GType esdmon_depths_type = 0;
static GEnumValue esdmon_depths[] = {
{8, "8", "8 Bits"},
{16, "16", "16 Bits"},
{8, "8 Bits", "8"},
{16, "16 Bits", "16"},
{0, NULL, NULL},
};
......@@ -111,8 +111,8 @@ gst_esdmon_channels_get_type (void)
{
static GType esdmon_channels_type = 0;
static GEnumValue esdmon_channels[] = {
{1, "1", "Mono"},
{2, "2", "Stereo"},
{1, "Mono", "mono"},
{2, "Stereo", "stereo"},
{0, NULL, NULL},
};
......
......@@ -159,16 +159,16 @@ gst_flacenc_quality_get_type (void)
if (qtype == 0) {
static const GEnumValue values[] = {
{0, "0", "0 - Fastest compression"},
{0, "0 - Fastest compression", "0"},
{1, "1", "1"},
{2, "2", "2"},
{3, "3", "3"},
{4, "4", "4"},
{5, "5", "5 - Default"},
{5, "5 - Default", "5"},
{6, "6", "6"},
{7, "7", "7"},
{8, "8", "8 - Highest compression "},
{9, "9", "9 - Insane"},
{8, "8 - Highest compression", "8"},
{9, "9 - Insane", "9"},
{0, NULL, NULL}
};
......
......@@ -81,10 +81,10 @@ gst_pixbufscale_method_get_type (void)
{
static GType pixbufscale_method_type = 0;
static GEnumValue pixbufscale_methods[] = {
{GST_PIXBUFSCALE_NEAREST, "0", "Nearest Neighbour"},
{GST_PIXBUFSCALE_TILES, "1", "Tiles"},
{GST_PIXBUFSCALE_BILINEAR, "2", "Bilinear"},
{GST_PIXBUFSCALE_HYPER, "3", "Hyper"},
{GST_PIXBUFSCALE_NEAREST, "Nearest Neighbour", "nearest"},
{GST_PIXBUFSCALE_TILES, "Tiles", "tiles"},
{GST_PIXBUFSCALE_BILINEAR, "Bilinear", "bilinear"},
{GST_PIXBUFSCALE_HYPER, "Hyper", "hyper"},
{0, NULL, NULL},
};
......
......@@ -108,28 +108,17 @@ gst_cacasink_dither_get_type (void)
{
static GType dither_type = 0;
if (!dither_type) {
GEnumValue *dithers;
gint n_dithers;
gint i;
gchar *caca_dithernames[] = {
"NONE", "ORDERED2", "ORDERED4", "ORDERED8", "RANDOM", NULL
};
n_dithers = 5;
dithers = g_new0 (GEnumValue, n_dithers + 1);
static GEnumValue dither_types[] = {
{CACA_DITHERING_NONE, "No dithering", "none"},
{CACA_DITHERING_ORDERED2, "Ordered 2x2 Bayer dithering", "2x2"},
{CACA_DITHERING_ORDERED4, "Ordered 4x4 Bayer dithering", "4x4"},
{CACA_DITHERING_ORDERED8, "Ordered 8x8 Bayer dithering", "8x8"},
{CACA_DITHERING_RANDOM, "Random dithering", "random"},
{0, NULL, NULL},
};
for (i = 0; i < n_dithers; i++) {
dithers[i].value = i;
dithers[i].value_name = g_strdup (caca_dithernames[i]);
dithers[i].value_nick = g_strdup (caca_dithernames[i]);
}
dithers[i].value = 0;
dithers[i].value_name = NULL;
dithers[i].value_nick = NULL;
dither_type = g_enum_register_static ("GstCACASinkDithers", dithers);
if (!dither_type) {
dither_type = g_enum_register_static ("GstCACASinkDithering", dither_types);
}
return dither_type;
}
......@@ -161,13 +150,13 @@ gst_cacasink_class_init (GstCACASinkClass * klass)
gobject_class->get_property = gst_cacasink_get_property;
gstelement_class->change_state = gst_cacasink_change_state;
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SCREEN_WIDTH, g_param_spec_int ("screen_width", "screen_width", "screen_width", G_MININT, G_MAXINT, 0, G_PARAM_READABLE)); /* CHECKME */
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SCREEN_HEIGHT, g_param_spec_int ("screen_height", "screen_height", "screen_height", G_MININT, G_MAXINT, 0, G_PARAM_READABLE)); /* CHECKME */
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SCREEN_WIDTH, g_param_spec_int ("screen-width", "screen_width", "screen_width", G_MININT, G_MAXINT, 0, G_PARAM_READABLE)); /* CHECKME */
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SCREEN_HEIGHT, g_param_spec_int ("screen-height", "screen_height", "screen_height", G_MININT, G_MAXINT, 0, G_PARAM_READABLE)); /* CHECKME */
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DITHER,
g_param_spec_enum ("dither", "Dither Type", "Set type of Dither",
GST_TYPE_CACADITHER, 0, G_PARAM_READWRITE));
GST_TYPE_CACADITHER, CACA_DITHERING_NONE, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_ANTIALIASING,
g_param_spec_boolean ("anti_aliasing", "Anti-Aliasing",
g_param_spec_boolean ("anti-aliasing", "Anti-Aliasing",
"Enables Anti-Aliasing", TRUE, G_PARAM_READWRITE));
gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_cacasink_setcaps);
......
......@@ -96,10 +96,10 @@ gst_shout2send_protocol_get_type (void)
{
static GType shout2send_protocol_type = 0;
static GEnumValue shout2send_protocol[] = {
{SHOUT2SEND_PROTOCOL_XAUDIOCAST, "1",
"Xaudiocast Protocol (icecast 1.3.x)"},
{SHOUT2SEND_PROTOCOL_ICY, "2", "Icy Protocol (ShoutCast)"},
{SHOUT2SEND_PROTOCOL_HTTP, "3", "Http Protocol (icecast 2.x)"},
{SHOUT2SEND_PROTOCOL_XAUDIOCAST,
"Xaudiocast Protocol (icecast 1.3.x)", "xaudiocast"},
{SHOUT2SEND_PROTOCOL_ICY, "Icy Protocol (ShoutCast)", "icy"},
{SHOUT2SEND_PROTOCOL_HTTP, "Http Protocol (icecast 2.x)", "http"},
{0, NULL, NULL},
};
......
......@@ -171,10 +171,10 @@ gst_alpha_method_get_type (void)
{
static GType alpha_method_type = 0;
static GEnumValue alpha_method[] = {
{ALPHA_METHOD_SET, "0", "Set/adjust alpha channel"},
{ALPHA_METHOD_GREEN, "1", "Chroma Key green"},
{ALPHA_METHOD_BLUE, "2", "Chroma Key blue"},
{ALPHA_METHOD_CUSTOM, "3", "Chroma Key on target_r/g/b"},
{ALPHA_METHOD_SET, "Set/adjust alpha channel", "set"},
{ALPHA_METHOD_GREEN, "Chroma Key green", "green"},
{ALPHA_METHOD_BLUE, "Chroma Key blue", "blue"},
{ALPHA_METHOD_CUSTOM, "Chroma Key on target_r/g/b", "custom"},
{0, NULL, NULL},
};
......
......@@ -69,9 +69,9 @@ gst_aggregator_sched_get_type (void)
{
static GType aggregator_sched_type = 0;
static GEnumValue aggregator_sched[] = {
{AGGREGATOR_LOOP, "1", "Loop Based"},
{AGGREGATOR_LOOP_SELECT, "3", "Loop Based Select"},
{AGGREGATOR_CHAIN, "4", "Chain Based"},
{AGGREGATOR_LOOP, "Loop Based", "loop"},
{AGGREGATOR_LOOP_SELECT, "Loop Based Select", "loop-select"},
{AGGREGATOR_CHAIN, "Chain Based", "chain"},
{0, NULL, NULL},
};
......
......@@ -77,8 +77,8 @@ gst_shaper_policy_get_type (void)
{
static GType shaper_policy_type = 0;
static GEnumValue shaper_policy[] = {
{SHAPER_POLICY_TIMESTAMPS, "1", "sync on timestamps"},
{SHAPER_POLICY_BUFFERSIZE, "2", "sync on buffer size"},
{SHAPER_POLICY_TIMESTAMPS, "sync on timestamps", "timestamp"},
{SHAPER_POLICY_BUFFERSIZE, "sync on buffer size", "size"},
{0, NULL, NULL},
};
......
This diff is collapsed.
......@@ -95,8 +95,8 @@ gst_smpte_transition_type_get_type (void)
definitions = g_list_next (definitions);
smpte_transitions[i].value = definition->type;
smpte_transitions[i].value_name = definition->short_name;
smpte_transitions[i].value_nick = definition->long_name;
smpte_transitions[i].value_nick = definition->short_name;
smpte_transitions[i].value_name = definition->long_name;
i++;
}
......
......@@ -145,9 +145,9 @@ gst_video_box_fill_get_type (void)
{
static GType video_box_fill_type = 0;
static GEnumValue video_box_fill[] = {
{VIDEO_BOX_FILL_BLACK, "0", "Black"},
{VIDEO_BOX_FILL_GREEN, "1", "Colorkey green"},
{VIDEO_BOX_FILL_BLUE, "2", "Colorkey blue"},
{VIDEO_BOX_FILL_BLACK, "Black", "black"},
{VIDEO_BOX_FILL_GREEN, "Colorkey green", "green"},
{VIDEO_BOX_FILL_BLUE, "Colorkey blue", "blue"},
{0, NULL, NULL},
};
......
......@@ -68,16 +68,17 @@ gst_videoflip_method_get_type (void)
{
static GType videoflip_method_type = 0;
static GEnumValue videoflip_methods[] = {
{GST_VIDEOFLIP_METHOD_IDENTITY, "0", "Identity (no rotation)"},
{GST_VIDEOFLIP_METHOD_90R, "1", "Rotate clockwise 90 degrees"},
{GST_VIDEOFLIP_METHOD_180, "2", "Rotate 180 degrees"},
{GST_VIDEOFLIP_METHOD_90L, "3", "Rotate counter-clockwise 90 degrees"},
{GST_VIDEOFLIP_METHOD_HORIZ, "4", "Flip horizontally"},
{GST_VIDEOFLIP_METHOD_VERT, "5", "Flip vertically"},
{GST_VIDEOFLIP_METHOD_TRANS, "6",
"Flip across upper left/lower right diagonal"},
{GST_VIDEOFLIP_METHOD_OTHER, "7",
"Flip across upper right/lower left diagonal"},
{GST_VIDEOFLIP_METHOD_IDENTITY, "Identity (no rotation)", "none"},
{GST_VIDEOFLIP_METHOD_90R, "Rotate clockwise 90 degrees", "clockwise"},
{GST_VIDEOFLIP_METHOD_180, "Rotate 180 degrees", "rotate-180"},
{GST_VIDEOFLIP_METHOD_90L, "Rotate counter-clockwise 90 degrees",
"counterclockwise"},
{GST_VIDEOFLIP_METHOD_HORIZ, "Flip horizontally", "horizontal-flip"},
{GST_VIDEOFLIP_METHOD_VERT, "Flip vertically", "vertical-flip"},
{GST_VIDEOFLIP_METHOD_TRANS,
"Flip across upper left/lower right diagonal", "upper-left-diagonal"},
{GST_VIDEOFLIP_METHOD_OTHER,
"Flip across upper right/lower left diagonal", "upper-right-diagonal"},
{0, NULL, NULL},
};
......
......@@ -375,9 +375,9 @@ gst_video_mixer_background_get_type (void)
{
static GType video_mixer_background_type = 0;
static GEnumValue video_mixer_background[] = {
{VIDEO_MIXER_BACKGROUND_CHECKER, "0", "Checker pattern"},
{VIDEO_MIXER_BACKGROUND_BLACK, "1", "Black"},
{VIDEO_MIXER_BACKGROUND_WHITE, "2", "White"},
{VIDEO_MIXER_BACKGROUND_CHECKER, "Checker pattern", "checker"},
{VIDEO_MIXER_BACKGROUND_BLACK, "Black", "black"},
{VIDEO_MIXER_BACKGROUND_WHITE, "White", "white"},
{0, NULL, NULL},
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment