mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 15:18:21 +00:00
Don't expose test source enum value table
This commit is contained in:
parent
318abee5fb
commit
66745d0695
3 changed files with 13 additions and 12 deletions
|
@ -468,7 +468,7 @@ ges_text_halign_get_type (void)
|
|||
}
|
||||
|
||||
/* table more-or-less copied from gstvideotestsrc.c */
|
||||
GEnumValue vpattern_enum_values[] = {
|
||||
static GEnumValue vpattern_enum_values[] = {
|
||||
{GES_VIDEO_TEST_PATTERN_SMPTE, "SMPTE 100% color bars", "smpte"}
|
||||
,
|
||||
{GES_VIDEO_TEST_PATTERN_SNOW, "Random (television snow)", "snow"}
|
||||
|
|
|
@ -292,8 +292,6 @@ typedef enum {
|
|||
#define GES_VIDEO_TEST_PATTERN_TYPE\
|
||||
ges_video_test_pattern_get_type()
|
||||
|
||||
extern GEnumValue vpattern_enum_values[];
|
||||
|
||||
GType ges_video_test_pattern_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
|
|
@ -309,16 +309,19 @@ GESTimelineTestSource *
|
|||
ges_timeline_test_source_new_for_nick (gchar * nick)
|
||||
{
|
||||
GEnumValue *value;
|
||||
int i;
|
||||
GEnumClass *klass;
|
||||
GESTimelineTestSource *ret = NULL;
|
||||
|
||||
for (i = 0, value = &vpattern_enum_values[i]; value->value_nick;
|
||||
value = &vpattern_enum_values[i++]) {
|
||||
if (!strcmp (nick, value->value_nick)) {
|
||||
return g_object_new (GES_TYPE_TIMELINE_TEST_SOURCE, "vpattern",
|
||||
(gint) value->value, NULL);
|
||||
}
|
||||
value++;
|
||||
klass = G_ENUM_CLASS (g_type_class_ref (GES_VIDEO_TEST_PATTERN_TYPE));
|
||||
if (!klass)
|
||||
return NULL;
|
||||
|
||||
value = g_enum_get_value_by_nick (klass, nick);
|
||||
if (value) {
|
||||
ret = g_object_new (GES_TYPE_TIMELINE_TEST_SOURCE, "vpattern",
|
||||
(gint) value->value, NULL);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
g_type_class_unref (klass);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue