diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2005-11-22 18:11:58 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2005-11-22 18:11:58 +0000 |
commit | 842a43f80230c65d024a5859c6b67dc601e7de64 (patch) | |
tree | a012246390f7c9192d05f2d1c4889e6e604a4bc3 /ext | |
parent | a6e0bc89cb979d320dde7ca84150254e67fcd51c (diff) |
fix up more enums
Original commit message from CVS:
fix up more enums
Diffstat (limited to 'ext')
-rw-r--r-- | ext/aalib/gstaasink.c | 9 | ||||
-rw-r--r-- | ext/dv/gstdvdec.c | 13 | ||||
-rw-r--r-- | ext/esd/esdmon.c | 8 | ||||
-rw-r--r-- | ext/flac/gstflacenc.c | 8 | ||||
-rw-r--r-- | ext/gdk_pixbuf/pixbufscale.c | 8 | ||||
-rw-r--r-- | ext/libcaca/gstcacasink.c | 39 | ||||
-rw-r--r-- | ext/shout2/gstshout2.c | 8 |
7 files changed, 41 insertions, 52 deletions
diff --git a/ext/aalib/gstaasink.c b/ext/aalib/gstaasink.c index d9c95982..4a7b09e0 100644 --- a/ext/aalib/gstaasink.c +++ b/ext/aalib/gstaasink.c @@ -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); diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c index 113dc341..c0007d17 100644 --- a/ext/dv/gstdvdec.c +++ b/ext/dv/gstdvdec.c @@ -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}, }; diff --git a/ext/esd/esdmon.c b/ext/esd/esdmon.c index 5b0f714a..eaa8b097 100644 --- a/ext/esd/esdmon.c +++ b/ext/esd/esdmon.c @@ -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}, }; diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c index f7edaabb..c90e1192 100644 --- a/ext/flac/gstflacenc.c +++ b/ext/flac/gstflacenc.c @@ -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} }; diff --git a/ext/gdk_pixbuf/pixbufscale.c b/ext/gdk_pixbuf/pixbufscale.c index 1cecdab6..9edef400 100644 --- a/ext/gdk_pixbuf/pixbufscale.c +++ b/ext/gdk_pixbuf/pixbufscale.c @@ -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}, }; diff --git a/ext/libcaca/gstcacasink.c b/ext/libcaca/gstcacasink.c index 6cdf8350..ab33821f 100644 --- a/ext/libcaca/gstcacasink.c +++ b/ext/libcaca/gstcacasink.c @@ -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); diff --git a/ext/shout2/gstshout2.c b/ext/shout2/gstshout2.c index d488b9ac..e87da679 100644 --- a/ext/shout2/gstshout2.c +++ b/ext/shout2/gstshout2.c @@ -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}, }; |