mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-04 05:35:53 +00:00
ges: Place imagefreeze at right place
Negotiation fails when having the imagefreeze after videorate and frame positioning won't happen after seeks if we do not put it before the postioner
This commit is contained in:
parent
d1444581f6
commit
c940333d18
|
@ -97,7 +97,7 @@ ges_image_source_dispose (GObject * object)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pad_added_cb (GstElement * timeline, GstPad * pad, GstElement * scale)
|
pad_added_cb (GstElement * source, GstPad * pad, GstElement * scale)
|
||||||
{
|
{
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
GstPadLinkReturn ret;
|
GstPadLinkReturn ret;
|
||||||
|
|
|
@ -216,6 +216,13 @@ G_DEFINE_TYPE_WITH_CODE (GESVideoUriSource, ges_video_uri_source,
|
||||||
G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
|
G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
|
||||||
ges_extractable_interface_init));
|
ges_extractable_interface_init));
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
_find_positioner (GstElement * a, GstElement * b)
|
||||||
|
{
|
||||||
|
return !g_strcmp0 (GST_OBJECT_NAME (gst_element_get_factory (a)),
|
||||||
|
"framepositioner");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* GObject VMethods */
|
/* GObject VMethods */
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -229,8 +236,16 @@ ges_video_uri_source_create_filters (GESVideoSource * source,
|
||||||
->ABI.abi.create_filters (source, elements, needs_converters))
|
->ABI.abi.create_filters (source, elements, needs_converters))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (ges_uri_source_asset_is_image (GES_URI_SOURCE_ASSET (asset)))
|
if (ges_uri_source_asset_is_image (GES_URI_SOURCE_ASSET (asset))) {
|
||||||
g_ptr_array_add (elements, gst_element_factory_make ("imagefreeze", NULL));
|
guint i;
|
||||||
|
|
||||||
|
g_ptr_array_find_with_equal_func (elements, NULL,
|
||||||
|
(GEqualFunc) _find_positioner, &i);
|
||||||
|
/* Adding the imagefreeze right before the positionner so positioning can happen
|
||||||
|
* properly */
|
||||||
|
g_ptr_array_insert (elements, i,
|
||||||
|
gst_element_factory_make ("imagefreeze", NULL));
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue