1 /* GStreamer Editing Services
2 * Copyright (C) 2009 Edward Hervey <edward.hervey@collabora.co.uk>
3 * 2009 Nokia Corporation
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef _GES_VIDEO_SOURCE
22 #define _GES_VIDEO_SOURCE
24 #include <glib-object.h>
26 #include <ges/ges-types.h>
27 #include <ges/ges-track-element.h>
28 #include <ges/ges-source.h>
32 #define GES_TYPE_VIDEO_SOURCE ges_video_source_get_type()
34 #define GES_VIDEO_SOURCE(obj) \
35 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_VIDEO_SOURCE, GESVideoSource))
37 #define GES_VIDEO_SOURCE_CLASS(klass) \
38 (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_VIDEO_SOURCE, GESVideoSourceClass))
40 #define GES_IS_VIDEO_SOURCE(obj) \
41 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_VIDEO_SOURCE))
43 #define GES_IS_VIDEO_SOURCE_CLASS(klass) \
44 (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_VIDEO_SOURCE))
46 #define GES_VIDEO_SOURCE_GET_CLASS(obj) \
47 (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_VIDEO_SOURCE, GESVideoSourceClass))
49 typedef struct _GESVideoSourcePrivate GESVideoSourcePrivate;
54 * Base class for video sources
57 struct _GESVideoSource {
61 GESVideoSourcePrivate *priv;
63 /* Padding for API extension */
64 gpointer _ges_reserved[GES_PADDING];
68 * GESVideoSourceClass:
69 * @create_source: method to return the GstElement to put in the source topbin.
70 * Other elements will be queued, like a videoscale.
71 * In the case of a VideoUriSource, for example, the subclass will return a decodebin,
72 * and we will append a videoscale.
74 struct _GESVideoSourceClass {
76 GESSourceClass parent_class;
79 GstElement* (*create_source) (GESTrackElement * object);
82 /* Padding for API extension */
84 gpointer _ges_reserved[GES_PADDING];
86 gboolean disable_scale_in_compositor;
87 gboolean (*needs_converters)(GESVideoSource *self);
93 GType ges_video_source_get_type (void);
97 #endif /* _GES_VIDEO_SOURCE */