mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
implement ges_timeline_background_source_new_for_nick()
This commit is contained in:
parent
fcab9fa0b3
commit
2d022c8886
2 changed files with 23 additions and 0 deletions
|
@ -32,6 +32,7 @@
|
|||
#include "ges-track-object.h"
|
||||
#include "ges-track-video-background-source.h"
|
||||
#include "ges-track-audio-background-source.h"
|
||||
#include <string.h>
|
||||
|
||||
G_DEFINE_TYPE (GESTimelineBackgroundSource, ges_tl_bg_src,
|
||||
GES_TYPE_TIMELINE_SOURCE);
|
||||
|
@ -264,3 +265,23 @@ ges_timeline_background_source_new (void)
|
|||
/* FIXME : Check for validity/existence of URI */
|
||||
return g_object_new (GES_TYPE_TIMELINE_BACKGROUND_SOURCE, NULL);
|
||||
}
|
||||
|
||||
GESTimelineBackgroundSource *
|
||||
ges_timeline_background_source_new_for_nick (gchar * nick)
|
||||
{
|
||||
GESTimelineBackgroundSource *ret;
|
||||
GEnumValue *value;
|
||||
int i;
|
||||
|
||||
for (i = 0, value = &vpattern_enum_values[i]; value->value_nick;
|
||||
value = &vpattern_enum_values[i++]) {
|
||||
if (!strcmp (nick, value->value_nick)) {
|
||||
ret = g_object_new (GES_TYPE_TIMELINE_BACKGROUND_SOURCE, "vpattern",
|
||||
(gint) value->value, NULL);
|
||||
return ret;
|
||||
}
|
||||
value++;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -72,6 +72,8 @@ struct _GESTimelineBackgroundSourceClass {
|
|||
GType ges_tl_bg_src_get_type (void);
|
||||
|
||||
GESTimelineBackgroundSource* ges_timeline_background_source_new (void);
|
||||
GESTimelineBackgroundSource* ges_timeline_background_source_new_for_nick(gchar
|
||||
* nick);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in a new issue