From e73c98630ea135eaf0a6c48faa4a62a5d24f4683 Mon Sep 17 00:00:00 2001 From: Brandon Lewis Date: Fri, 2 Jul 2010 12:47:31 +0200 Subject: [PATCH] add GESVideoTestPattern enum --- docs/libs/ges-sections.txt | 4 +++- docs/libs/ges.types | 2 ++ ges/ges-enums.c | 49 ++++++++++++++++++++++++++++++++++++++ ges/ges-enums.h | 45 ++++++++++++++++++++++++++++++++++ 4 files changed, 99 insertions(+), 1 deletion(-) diff --git a/docs/libs/ges-sections.txt b/docs/libs/ges-sections.txt index f802038e23..505b22a35d 100644 --- a/docs/libs/ges-sections.txt +++ b/docs/libs/ges-sections.txt @@ -29,6 +29,9 @@ GESTextVAlign DEFAULT_VALIGNMENT GES_TEXT_VALIGN_TYPE ges_text_valign_get_type +GESVideoTestPattern +GES_VIDEO_TEST_PATTERN_TYPE +ges_video_test_pattern_get_type
@@ -428,7 +431,6 @@ GES_TYPE_TIMELINE_TEXT_OVERLAY GESTrackVideoTestSource GESTrackVideoTestSource GESTrackVideoTestSourceClass -GESTrackVideoBgSrcPattern ges_track_video_test_source_new ges_track_video_test_source_get_type diff --git a/docs/libs/ges.types b/docs/libs/ges.types index 9e2039c788..dcb108562d 100644 --- a/docs/libs/ges.types +++ b/docs/libs/ges.types @@ -16,3 +16,5 @@ ges_timeline_transition_get_type ges_cust_timeline_src_get_type ges_simple_timeline_layer_get_type ges_video_transition_type_get_type +ges_text_valign_get_type +ges_text_halign_get_type diff --git a/ges/ges-enums.c b/ges/ges-enums.c index 5cb7153167..43a2814cbc 100644 --- a/ges/ges-enums.c +++ b/ges/ges-enums.c @@ -463,3 +463,52 @@ ges_text_halign_get_type (void) } return text_overlay_halign_type; } + +/* table more-or-less copied from gstvideotestsrc.c */ +GEnumValue vpattern_enum_values[] = { + {GES_VIDEO_TEST_PATTERN_SMPTE, "SMPTE 100% color bars", "smpte"} + , + {GES_VIDEO_TEST_PATTERN_SNOW, "Random (television snow)", "snow"} + , + {GES_VIDEO_TEST_PATTERN_BLACK, "100% Black", "black"} + , + {GES_VIDEO_TEST_PATTERN_WHITE, "100% White", "white"} + , + {GES_VIDEO_TEST_PATTERN_RED, "Red", "red"} + , + {GES_VIDEO_TEST_PATTERN_GREEN, "Green", "green"} + , + {GES_VIDEO_TEST_PATTERN_BLUE, "Blue", "blue"} + , + {GES_VIDEO_TEST_PATTERN_CHECKERS1, "Checkers 1px", "checkers-1"} + , + {GES_VIDEO_TEST_PATTERN_CHECKERS2, "Checkers 2px", "checkers-2"} + , + {GES_VIDEO_TEST_PATTERN_CHECKERS4, "Checkers 4px", "checkers-4"} + , + {GES_VIDEO_TEST_PATTERN_CHECKERS8, "Checkers 8px", "checkers-8"} + , + {GES_VIDEO_TEST_PATTERN_CIRCULAR, "Circular", "circular"} + , + {GES_VIDEO_TEST_PATTERN_BLINK, "Blink", "blink"} + , + {GES_VIDEO_TEST_PATTERN_SMPTE75, "SMPTE 75% color bars", "smpte75"} + , + {0, NULL, NULL} +}; + +GType +ges_video_test_pattern_get_type (void) +{ + + static gsize once = 0; + static GType theType = 0; + + if (g_once_init_enter (&once)) { + theType = g_enum_register_static ("GESTimelineTestSourceVPattern", + vpattern_enum_values); + g_once_init_leave (&once, 1); + }; + + return theType; +} diff --git a/ges/ges-enums.h b/ges/ges-enums.h index ef8e1b2d19..137c35a4a3 100644 --- a/ges/ges-enums.h +++ b/ges/ges-enums.h @@ -251,6 +251,51 @@ typedef enum { GType ges_text_halign_get_type (void); +/** + * GESVideoTestPattern: + * @GES_VIDEO_TEST_PATTERN_SMPTE: A standard SMPTE test pattern + * @GES_VIDEO_TEST_PATTERN_SNOW: Random noise + * @GES_VIDEO_TEST_PATTERN_BLACK: A black image + * @GES_VIDEO_TEST_PATTERN_WHITE: A white image + * @GES_VIDEO_TEST_PATTERN_RED: A red image + * @GES_VIDEO_TEST_PATTERN_GREEN: A green image + * @GES_VIDEO_TEST_PATTERN_BLUE: A blue image + * @GES_VIDEO_TEST_PATTERN_CHECKERS1: Checkers pattern (1px) + * @GES_VIDEO_TEST_PATTERN_CHECKERS2: Checkers pattern (2px) + * @GES_VIDEO_TEST_PATTERN_CHECKERS4: Checkers pattern (4px) + * @GES_VIDEO_TEST_PATTERN_CHECKERS8: Checkers pattern (8px) + * @GES_VIDEO_TEST_PATTERN_CIRCULAR: Circular pattern + * @GES_VIDEO_TEST_PATTERN_BLINK: Alternate between black and white + * @GES_VIDEO_TEST_PATTERN_SMPTE75: SMPTE test pattern (75% color bars) + * + * The test pattern to produce + */ + +typedef enum { + GES_VIDEO_TEST_PATTERN_SMPTE, + GES_VIDEO_TEST_PATTERN_SNOW, + GES_VIDEO_TEST_PATTERN_BLACK, + GES_VIDEO_TEST_PATTERN_WHITE, + GES_VIDEO_TEST_PATTERN_RED, + GES_VIDEO_TEST_PATTERN_GREEN, + GES_VIDEO_TEST_PATTERN_BLUE, + GES_VIDEO_TEST_PATTERN_CHECKERS1, + GES_VIDEO_TEST_PATTERN_CHECKERS2, + GES_VIDEO_TEST_PATTERN_CHECKERS4, + GES_VIDEO_TEST_PATTERN_CHECKERS8, + GES_VIDEO_TEST_PATTERN_CIRCULAR, + GES_VIDEO_TEST_PATTERN_BLINK, + GES_VIDEO_TEST_PATTERN_SMPTE75, +} GESVideoTestPattern; + + +#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 #endif /* __GES_ENUMS_H__ */