mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 16:51:10 +00:00
video-test-src: Force video/x-raw
Avoiding to hit errors with video/x-bayer
This commit is contained in:
parent
a2f8dbd3d1
commit
602f49f3e1
1 changed files with 11 additions and 5 deletions
|
@ -61,13 +61,18 @@ ges_video_test_source_init (GESVideoTestSource * self)
|
|||
static GstElement *
|
||||
ges_video_test_source_create_element (GESTrackElement * self)
|
||||
{
|
||||
GstElement *ret;
|
||||
gint pattern;
|
||||
GstElement *ret;
|
||||
gchar *bin_desc;
|
||||
|
||||
|
||||
pattern = ((GESVideoTestSource *) self)->priv->pattern;
|
||||
|
||||
ret = gst_element_factory_make ("videotestsrc", NULL);
|
||||
g_object_set (ret, "pattern", (gint) pattern, NULL);
|
||||
bin_desc =
|
||||
g_strdup_printf
|
||||
("videotestsrc pattern=%i name=testsrc ! capsfilter caps=video/x-raw",
|
||||
pattern);
|
||||
ret = gst_parse_bin_from_description (bin_desc, TRUE, NULL);
|
||||
g_free (bin_desc);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -89,7 +94,8 @@ ges_video_test_source_set_pattern (GESVideoTestSource
|
|||
self->priv->pattern = pattern;
|
||||
|
||||
if (element)
|
||||
g_object_set (element, "pattern", (gint) pattern, NULL);
|
||||
gst_child_proxy_set (GST_CHILD_PROXY (element), "testsrc::pattern",
|
||||
(gint) pattern, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue