ges: Move GESVideo/AudioSource::create_source to GESSource

Deprecating the old variants which were not introspectable
and cleaning a bit the API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/231>
This commit is contained in:
Thibault Saunier 2021-02-24 23:37:28 -03:00 committed by GStreamer Marge Bot
parent ec5b267249
commit 906654de87
13 changed files with 94 additions and 59 deletions

View file

@ -126,14 +126,13 @@ ges_audio_source_create_element (GESTrackElement * trksrc)
GstElement *topbin; GstElement *topbin;
GstElement *sub_element; GstElement *sub_element;
GPtrArray *elements; GPtrArray *elements;
GESAudioSourceClass *source_class = GES_AUDIO_SOURCE_GET_CLASS (trksrc); GESSourceClass *source_class = GES_SOURCE_GET_CLASS (trksrc);
const gchar *props[] = { "volume", "mute", NULL }; const gchar *props[] = { "volume", "mute", NULL };
GESAudioSource *self = GES_AUDIO_SOURCE (trksrc); GESAudioSource *self = GES_AUDIO_SOURCE (trksrc);
if (!source_class->create_source) g_assert (source_class->create_source);
return NULL;
sub_element = source_class->create_source (trksrc); sub_element = source_class->create_source (GES_SOURCE (trksrc));
GST_DEBUG_OBJECT (trksrc, "Creating a bin sub_element ! volume"); GST_DEBUG_OBJECT (trksrc, "Creating a bin sub_element ! volume");
vbin = vbin =
@ -177,13 +176,11 @@ ges_audio_source_class_init (GESAudioSourceClass * klass)
{ {
GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GESTrackElementClass *track_class = GES_TRACK_ELEMENT_CLASS (klass); GESTrackElementClass *track_class = GES_TRACK_ELEMENT_CLASS (klass);
GESAudioSourceClass *audio_source_class = GES_AUDIO_SOURCE_CLASS (klass);
gobject_class->dispose = ges_audio_source_dispose; gobject_class->dispose = ges_audio_source_dispose;
track_class->nleobject_factorytype = "nlesource"; track_class->nleobject_factorytype = "nlesource";
track_class->create_element = ges_audio_source_create_element; track_class->create_element = ges_audio_source_create_element;
track_class->ABI.abi.default_track_type = GES_TRACK_TYPE_AUDIO; track_class->ABI.abi.default_track_type = GES_TRACK_TYPE_AUDIO;
audio_source_class->create_source = NULL;
} }
static void static void

View file

@ -49,16 +49,21 @@ struct _GESAudioSource {
/** /**
* GESAudioSourceClass: * GESAudioSourceClass:
* @create_source: method to return the GstElement to put in the source topbin.
* Other elements will be queued, like a volume.
* In the case of a AudioUriSource, for example, the subclass will return a decodebin,
* and we will append a volume.
*/ */
struct _GESAudioSourceClass { struct _GESAudioSourceClass {
/*< private >*/ /*< private >*/
GESSourceClass parent_class; GESSourceClass parent_class;
/*< public >*/ /*< public >*/
/**
* GESAudioSource::create_element:
* @object: The #GESTrackElement
*
* Returns: (transfer floating): the #GstElement that the underlying nleobject
* controls.
*
* Deprecated: 1.20: Use #GESSourceClass::create_element instead.
*/
GstElement* (*create_source) (GESTrackElement * object); GstElement* (*create_source) (GESTrackElement * object);
/*< private >*/ /*< private >*/

View file

@ -57,13 +57,13 @@ static void ges_audio_test_source_get_property (GObject * object, guint
static void ges_audio_test_source_set_property (GObject * object, guint static void ges_audio_test_source_set_property (GObject * object, guint
property_id, const GValue * value, GParamSpec * pspec); property_id, const GValue * value, GParamSpec * pspec);
static GstElement *ges_audio_test_source_create_source (GESTrackElement * self); static GstElement *ges_audio_test_source_create_source (GESSource * source);
static void static void
ges_audio_test_source_class_init (GESAudioTestSourceClass * klass) ges_audio_test_source_class_init (GESAudioTestSourceClass * klass)
{ {
GObjectClass *object_class = G_OBJECT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESAudioSourceClass *source_class = GES_AUDIO_SOURCE_CLASS (klass); GESSourceClass *source_class = GES_SOURCE_CLASS (klass);
object_class->get_property = ges_audio_test_source_get_property; object_class->get_property = ges_audio_test_source_get_property;
object_class->set_property = ges_audio_test_source_set_property; object_class->set_property = ges_audio_test_source_set_property;
@ -100,18 +100,19 @@ ges_audio_test_source_set_property (GObject * object,
} }
static GstElement * static GstElement *
ges_audio_test_source_create_source (GESTrackElement * trksrc) ges_audio_test_source_create_source (GESSource * source)
{ {
GESAudioTestSource *self; GESAudioTestSource *self;
GstElement *ret; GstElement *ret;
const gchar *props[] = { "volume", "freq", NULL }; const gchar *props[] = { "volume", "freq", NULL };
self = (GESAudioTestSource *) trksrc; self = (GESAudioTestSource *) source;
ret = gst_element_factory_make ("audiotestsrc", NULL); ret = gst_element_factory_make ("audiotestsrc", NULL);
g_object_set (ret, "volume", (gdouble) self->priv->volume, "freq", (gdouble) g_object_set (ret, "volume", (gdouble) self->priv->volume, "freq", (gdouble)
self->priv->freq, NULL); self->priv->freq, NULL);
ges_track_element_add_children_props (trksrc, ret, NULL, NULL, props); ges_track_element_add_children_props (GES_TRACK_ELEMENT (self), ret, NULL,
NULL, props);
return ret; return ret;
} }

View file

@ -48,7 +48,7 @@ enum
/* GESSource VMethod */ /* GESSource VMethod */
static GstElement * static GstElement *
ges_audio_uri_source_create_source (GESTrackElement * element) ges_audio_uri_source_create_source (GESSource * element)
{ {
return ges_uri_source_create_source (GES_AUDIO_URI_SOURCE (element)->priv); return ges_uri_source_create_source (GES_AUDIO_URI_SOURCE (element)->priv);
} }
@ -137,7 +137,6 @@ ges_audio_uri_source_class_init (GESAudioUriSourceClass * klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESTimelineElementClass *element_class = GES_TIMELINE_ELEMENT_CLASS (klass); GESTimelineElementClass *element_class = GES_TIMELINE_ELEMENT_CLASS (klass);
GESSourceClass *src_class = GES_SOURCE_CLASS (klass); GESSourceClass *src_class = GES_SOURCE_CLASS (klass);
GESAudioSourceClass *audio_src_class = GES_AUDIO_SOURCE_CLASS (klass);
object_class->get_property = ges_audio_uri_source_get_property; object_class->get_property = ges_audio_uri_source_get_property;
object_class->set_property = ges_audio_uri_source_set_property; object_class->set_property = ges_audio_uri_source_set_property;
@ -155,7 +154,7 @@ ges_audio_uri_source_class_init (GESAudioUriSourceClass * klass)
element_class->get_natural_framerate = _get_natural_framerate; element_class->get_natural_framerate = _get_natural_framerate;
src_class->select_pad = ges_uri_source_select_pad; src_class->select_pad = ges_uri_source_select_pad;
audio_src_class->create_source = ges_audio_uri_source_create_source; src_class->create_source = ges_audio_uri_source_create_source;
} }
static void static void

View file

@ -118,20 +118,20 @@ pad_added_cb (GstElement * source, GstPad * pad, GstElement * scale)
} }
static GstElement * static GstElement *
ges_image_source_create_source (GESTrackElement * track_element) ges_image_source_create_source (GESSource * source)
{ {
GstElement *bin, *source, *scale, *freeze, *iconv; GstElement *bin, *src, *scale, *freeze, *iconv;
GstPad *src, *target; GstPad *srcpad, *target;
bin = GST_ELEMENT (gst_bin_new ("still-image-bin")); bin = GST_ELEMENT (gst_bin_new ("still-image-bin"));
source = gst_element_factory_make ("uridecodebin", NULL); src = gst_element_factory_make ("uridecodebin", NULL);
scale = gst_element_factory_make ("videoscale", NULL); scale = gst_element_factory_make ("videoscale", NULL);
freeze = gst_element_factory_make ("imagefreeze", NULL); freeze = gst_element_factory_make ("imagefreeze", NULL);
iconv = gst_element_factory_make ("videoconvert", NULL); iconv = gst_element_factory_make ("videoconvert", NULL);
g_object_set (scale, "add-borders", TRUE, NULL); g_object_set (scale, "add-borders", TRUE, NULL);
gst_bin_add_many (GST_BIN (bin), source, scale, freeze, iconv, NULL); gst_bin_add_many (GST_BIN (bin), src, scale, freeze, iconv, NULL);
gst_element_link_pads_full (scale, "src", iconv, "sink", gst_element_link_pads_full (scale, "src", iconv, "sink",
GST_PAD_LINK_CHECK_NOTHING); GST_PAD_LINK_CHECK_NOTHING);
@ -142,13 +142,13 @@ ges_image_source_create_source (GESTrackElement * track_element)
target = gst_element_get_static_pad (freeze, "src"); target = gst_element_get_static_pad (freeze, "src");
src = gst_ghost_pad_new ("src", target); srcpad = gst_ghost_pad_new ("src", target);
gst_element_add_pad (bin, src); gst_element_add_pad (bin, srcpad);
gst_object_unref (target); gst_object_unref (target);
g_object_set (source, "uri", ((GESImageSource *) track_element)->uri, NULL); g_object_set (src, "uri", ((GESImageSource *) source)->uri, NULL);
g_signal_connect (G_OBJECT (source), "pad-added", g_signal_connect (G_OBJECT (src), "pad-added",
G_CALLBACK (pad_added_cb), scale); G_CALLBACK (pad_added_cb), scale);
return bin; return bin;
@ -158,7 +158,8 @@ static void
ges_image_source_class_init (GESImageSourceClass * klass) ges_image_source_class_init (GESImageSourceClass * klass)
{ {
GObjectClass *object_class = G_OBJECT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESVideoSourceClass *source_class = GES_VIDEO_SOURCE_CLASS (klass); GESSourceClass *source_class = GES_SOURCE_CLASS (klass);
GESVideoSourceClass *vsource_class = GES_VIDEO_SOURCE_CLASS (klass);
object_class->get_property = ges_image_source_get_property; object_class->get_property = ges_image_source_get_property;
object_class->set_property = ges_image_source_set_property; object_class->set_property = ges_image_source_set_property;
@ -174,7 +175,7 @@ ges_image_source_class_init (GESImageSourceClass * klass)
NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
source_class->create_source = ges_image_source_create_source; source_class->create_source = ges_image_source_create_source;
source_class->ABI.abi.get_natural_size = vsource_class->ABI.abi.get_natural_size =
ges_video_uri_source_get_natural_size; ges_video_uri_source_get_natural_size;
GES_TRACK_ELEMENT_CLASS_DEFAULT_HAS_INTERNAL_SOURCE (klass) = FALSE; GES_TRACK_ELEMENT_CLASS_DEFAULT_HAS_INTERNAL_SOURCE (klass) = FALSE;

View file

@ -173,7 +173,7 @@ ges_multi_file_uri_new (const gchar * uri)
} }
static GstElement * static GstElement *
ges_multi_file_source_create_source (GESTrackElement * track_element) ges_multi_file_source_create_source (GESSource * source)
{ {
GESMultiFileSource *self; GESMultiFileSource *self;
GstElement *bin, *src, *decodebin; GstElement *bin, *src, *decodebin;
@ -184,7 +184,7 @@ ges_multi_file_source_create_source (GESTrackElement * track_element)
GESUriSourceAsset *asset; GESUriSourceAsset *asset;
GESMultiFileURI *uri_data; GESMultiFileURI *uri_data;
self = (GESMultiFileSource *) track_element; self = (GESMultiFileSource *) source;
asset = asset =
GES_URI_SOURCE_ASSET (ges_extractable_get_asset (GES_EXTRACTABLE (self))); GES_URI_SOURCE_ASSET (ges_extractable_get_asset (GES_EXTRACTABLE (self)));
@ -230,7 +230,7 @@ static void
ges_multi_file_source_class_init (GESMultiFileSourceClass * klass) ges_multi_file_source_class_init (GESMultiFileSourceClass * klass)
{ {
GObjectClass *object_class = G_OBJECT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESVideoSourceClass *source_class = GES_VIDEO_SOURCE_CLASS (klass); GESSourceClass *source_class = GES_SOURCE_CLASS (klass);
object_class->get_property = ges_multi_file_source_get_property; object_class->get_property = ges_multi_file_source_get_property;
object_class->set_property = ges_multi_file_source_set_property; object_class->set_property = ges_multi_file_source_set_property;

View file

@ -48,7 +48,6 @@ struct _GESSource {
/** /**
* GESSourceClass: * GESSourceClass:
* @create_source: method to return the GstElement to put in the source topbin.
*/ */
struct _GESSourceClass { struct _GESSourceClass {
@ -68,8 +67,22 @@ struct _GESSourceClass {
*/ */
gboolean (*select_pad)(GESSource *source, GstPad *pad); gboolean (*select_pad)(GESSource *source, GstPad *pad);
/**
* GESSourceClass::create_source:
* @source: The #GESAudioSource
*
* Creates the GstElement to put in the source topbin. Other elements will be
* queued, like a volume. In the case of a AudioUriSource, for example, the
* subclass will return a decodebin, and we will append a volume.
*
* Returns: (transfer floating): The source element to use.
*
* Since: 1.20
*/
GstElement* (*create_source) (GESSource * source);
/* Padding for API extension */ /* Padding for API extension */
gpointer _ges_reserved[GES_PADDING - 1]; gpointer _ges_reserved[GES_PADDING - 2];
}; };
G_END_DECLS G_END_DECLS

View file

@ -68,7 +68,7 @@ static void ges_title_source_get_property (GObject * object, guint
static void ges_title_source_set_property (GObject * object, guint static void ges_title_source_set_property (GObject * object, guint
property_id, const GValue * value, GParamSpec * pspec); property_id, const GValue * value, GParamSpec * pspec);
static GstElement *ges_title_source_create_source (GESTrackElement * self); static GstElement *ges_title_source_create_source (GESSource * self);
static gboolean static gboolean
_lookup_child (GESTimelineElement * object, _lookup_child (GESTimelineElement * object,
@ -98,7 +98,8 @@ static void
ges_title_source_class_init (GESTitleSourceClass * klass) ges_title_source_class_init (GESTitleSourceClass * klass)
{ {
GObjectClass *object_class = G_OBJECT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESVideoSourceClass *source_class = GES_VIDEO_SOURCE_CLASS (klass); GESSourceClass *source_class = GES_SOURCE_CLASS (klass);
GESVideoSourceClass *vsource_class = GES_VIDEO_SOURCE_CLASS (klass);
GESTimelineElementClass *timeline_element_class = GESTimelineElementClass *timeline_element_class =
GES_TIMELINE_ELEMENT_CLASS (klass); GES_TIMELINE_ELEMENT_CLASS (klass);
@ -107,7 +108,7 @@ ges_title_source_class_init (GESTitleSourceClass * klass)
object_class->dispose = ges_title_source_dispose; object_class->dispose = ges_title_source_dispose;
timeline_element_class->lookup_child = _lookup_child; timeline_element_class->lookup_child = _lookup_child;
source_class->ABI.abi.disable_scale_in_compositor = TRUE; vsource_class->ABI.abi.disable_scale_in_compositor = TRUE;
source_class->create_source = ges_title_source_create_source; source_class->create_source = ges_title_source_create_source;
GES_TRACK_ELEMENT_CLASS_DEFAULT_HAS_INTERNAL_SOURCE (klass) = FALSE; GES_TRACK_ELEMENT_CLASS_DEFAULT_HAS_INTERNAL_SOURCE (klass) = FALSE;
@ -176,12 +177,12 @@ ges_title_source_set_property (GObject * object,
} }
static GstElement * static GstElement *
ges_title_source_create_source (GESTrackElement * object) ges_title_source_create_source (GESSource * source)
{ {
GstElement *topbin, *background, *text; GstElement *topbin, *background, *text;
GstPad *src, *pad; GstPad *src, *pad;
GESTitleSource *self = GES_TITLE_SOURCE (object); GESTitleSource *self = GES_TITLE_SOURCE (source);
GESTitleSourcePrivate *priv = self->priv; GESTitleSourcePrivate *priv = self->priv;
const gchar *bg_props[] = { "pattern", "foreground-color", NULL }; const gchar *bg_props[] = { "pattern", "foreground-color", NULL };
const gchar *text_props[] = { "text", "font-desc", "valignment", "halignment", const gchar *text_props[] = { "text", "font-desc", "valignment", "halignment",
@ -228,9 +229,10 @@ ges_title_source_create_source (GESTrackElement * object)
priv->text_el = text; priv->text_el = text;
priv->background_el = background; priv->background_el = background;
ges_track_element_add_children_props (object, text, NULL, NULL, text_props); ges_track_element_add_children_props (GES_TRACK_ELEMENT (source), text, NULL,
ges_track_element_add_children_props (object, background, NULL, NULL, NULL, text_props);
bg_props); ges_track_element_add_children_props (GES_TRACK_ELEMENT (source), background,
NULL, NULL, bg_props);
return topbin; return topbin;
} }

View file

@ -70,8 +70,6 @@ struct _GESTrackElement {
* track element. The default implementation will use the factory given by * track element. The default implementation will use the factory given by
* @nleobject_factorytype to created the nleobject and will give it * @nleobject_factorytype to created the nleobject and will give it
* the #GstElement returned by @create_element. * the #GstElement returned by @create_element.
* @create_element: Method to create the #GstElement that the underlying
* nleobject controls.
* @active_changed: Method to be called when the #GESTrackElement:active * @active_changed: Method to be called when the #GESTrackElement:active
* property changes. * property changes.
* @list_children_properties: Deprecated: Listing children properties is * @list_children_properties: Deprecated: Listing children properties is
@ -92,6 +90,14 @@ struct _GESTrackElementClass {
/* virtual methods for subclasses */ /* virtual methods for subclasses */
const gchar *nleobject_factorytype; const gchar *nleobject_factorytype;
GstElement* (*create_gnl_object) (GESTrackElement * object); GstElement* (*create_gnl_object) (GESTrackElement * object);
/**
* GESTrackElementClass::create_element:
* @object: The #GESTrackElement
*
* Returns: (transfer floating): the #GstElement that the underlying nleobject
* controls.
*/
GstElement* (*create_element) (GESTrackElement * object); GstElement* (*create_element) (GESTrackElement * object);
void (*active_changed) (GESTrackElement *object, gboolean active); void (*active_changed) (GESTrackElement *object, gboolean active);

View file

@ -174,7 +174,8 @@ ges_video_source_create_element (GESTrackElement * trksrc)
{ {
GstElement *topbin; GstElement *topbin;
GstElement *sub_element; GstElement *sub_element;
GESVideoSourceClass *source_class = GES_VIDEO_SOURCE_GET_CLASS (trksrc); GESVideoSourceClass *vsource_class = GES_VIDEO_SOURCE_GET_CLASS (trksrc);
GESSourceClass *source_class = GES_SOURCE_GET_CLASS (trksrc);
GESVideoSource *self; GESVideoSource *self;
gboolean needs_converters = TRUE; gboolean needs_converters = TRUE;
GPtrArray *elements; GPtrArray *elements;
@ -182,15 +183,15 @@ ges_video_source_create_element (GESTrackElement * trksrc)
if (!source_class->create_source) if (!source_class->create_source)
return NULL; return NULL;
sub_element = source_class->create_source (trksrc); sub_element = source_class->create_source (GES_SOURCE (trksrc));
self = (GESVideoSource *) trksrc; self = (GESVideoSource *) trksrc;
if (source_class->ABI.abi.needs_converters) if (vsource_class->ABI.abi.needs_converters)
needs_converters = source_class->ABI.abi.needs_converters (self); needs_converters = vsource_class->ABI.abi.needs_converters (self);
elements = g_ptr_array_new (); elements = g_ptr_array_new ();
g_assert (source_class->ABI.abi.create_filters); g_assert (vsource_class->ABI.abi.create_filters);
if (!source_class->ABI.abi.create_filters (self, elements, needs_converters)) { if (!vsource_class->ABI.abi.create_filters (self, elements, needs_converters)) {
g_ptr_array_free (elements, TRUE); g_ptr_array_free (elements, TRUE);
return NULL; return NULL;
@ -248,7 +249,6 @@ ges_video_source_class_init (GESVideoSourceClass * klass)
track_element_class->create_element = ges_video_source_create_element; track_element_class->create_element = ges_video_source_create_element;
track_element_class->ABI.abi.default_track_type = GES_TRACK_TYPE_VIDEO; track_element_class->ABI.abi.default_track_type = GES_TRACK_TYPE_VIDEO;
video_source_class->create_source = NULL;
video_source_class->ABI.abi.create_filters = ges_video_source_create_filters; video_source_class->ABI.abi.create_filters = ges_video_source_create_filters;
} }

View file

@ -59,6 +59,15 @@ struct _GESVideoSourceClass {
GESSourceClass parent_class; GESSourceClass parent_class;
/*< public >*/ /*< public >*/
/**
* GESVideoSource::create_element:
* @object: The #GESTrackElement
*
* Returns: (transfer floating): the #GstElement that the underlying nleobject
* controls.
*
* Deprecated: 1.20: Use #GESSourceClass::create_element instead.
*/
GstElement* (*create_source) (GESTrackElement * object); GstElement* (*create_source) (GESTrackElement * object);
/*< private >*/ /*< private >*/

View file

@ -65,7 +65,7 @@ G_DEFINE_TYPE_WITH_CODE (GESVideoTestSource, ges_video_test_source,
G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE, G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE,
ges_extractable_interface_init)); ges_extractable_interface_init));
static GstElement *ges_video_test_source_create_source (GESTrackElement * self); static GstElement *ges_video_test_source_create_source (GESSource * source);
static gboolean static gboolean
get_natural_size (GESVideoSource * source, gint * width, gint * height) get_natural_size (GESVideoSource * source, gint * width, gint * height)
@ -161,10 +161,11 @@ static void
ges_video_test_source_class_init (GESVideoTestSourceClass * klass) ges_video_test_source_class_init (GESVideoTestSourceClass * klass)
{ {
GObjectClass *object_class = G_OBJECT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESVideoSourceClass *source_class = GES_VIDEO_SOURCE_CLASS (klass); GESVideoSourceClass *vsource_class = GES_VIDEO_SOURCE_CLASS (klass);
GESSourceClass *source_class = GES_SOURCE_CLASS (klass);
source_class->create_source = ges_video_test_source_create_source; source_class->create_source = ges_video_test_source_create_source;
source_class->ABI.abi.get_natural_size = get_natural_size; vsource_class->ABI.abi.get_natural_size = get_natural_size;
object_class->dispose = dispose; object_class->dispose = dispose;
@ -218,7 +219,7 @@ ges_video_test_source_create_overlay (GESVideoTestSource * self)
} }
static GstElement * static GstElement *
ges_video_test_source_create_source (GESTrackElement * element) ges_video_test_source_create_source (GESSource * source)
{ {
GstCaps *caps; GstCaps *caps;
gint pattern; gint pattern;
@ -227,9 +228,10 @@ ges_video_test_source_create_source (GESTrackElement * element)
const gchar *props[] = const gchar *props[] =
{ "pattern", "background-color", "foreground-color", NULL }; { "pattern", "background-color", "foreground-color", NULL };
GPtrArray *elements; GPtrArray *elements;
GESVideoTestSource *self = GES_VIDEO_TEST_SOURCE (element); GESVideoTestSource *self = GES_VIDEO_TEST_SOURCE (source);
GESTrackElement *element = GES_TRACK_ELEMENT (source);
g_assert (!GES_TIMELINE_ELEMENT_PARENT (element)); g_assert (!GES_TIMELINE_ELEMENT_PARENT (source));
testsrc = gst_element_factory_make ("videotestsrc", NULL); testsrc = gst_element_factory_make ("videotestsrc", NULL);
self->priv->capsfilter = gst_element_factory_make ("capsfilter", NULL); self->priv->capsfilter = gst_element_factory_make ("capsfilter", NULL);
pattern = self->priv->pattern; pattern = self->priv->pattern;

View file

@ -51,7 +51,7 @@ enum
/* GESSource VMethod */ /* GESSource VMethod */
static GstElement * static GstElement *
ges_video_uri_source_create_source (GESTrackElement * element) ges_video_uri_source_create_source (GESSource * element)
{ {
return ges_uri_source_create_source (GES_VIDEO_URI_SOURCE (element)->priv); return ges_uri_source_create_source (GES_VIDEO_URI_SOURCE (element)->priv);
} }
@ -315,7 +315,7 @@ ges_video_uri_source_class_init (GESVideoUriSourceClass * klass)
src_class->select_pad = ges_uri_source_select_pad; src_class->select_pad = ges_uri_source_select_pad;
video_src_class->create_source = ges_video_uri_source_create_source; src_class->create_source = ges_video_uri_source_create_source;
video_src_class->ABI.abi.needs_converters = video_src_class->ABI.abi.needs_converters =
ges_video_uri_source_needs_converters; ges_video_uri_source_needs_converters;
video_src_class->ABI.abi.get_natural_size = video_src_class->ABI.abi.get_natural_size =