uri-source: Respect stream-id even on streams muxed in raw
[platform/upstream/gst-editing-services.git] / ges / ges-source.h
1 /* GStreamer Editing Services
2  * Copyright (C) 2009 Edward Hervey <edward.hervey@collabora.co.uk>
3  *               2009 Nokia Corporation
4  *
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.
9  *
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.
14  *
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.
19  */
20
21 #pragma once
22
23 #include <glib-object.h>
24 #include <gst/gst.h>
25 #include <ges/ges-types.h>
26 #include <ges/ges-track-element.h>
27
28 G_BEGIN_DECLS
29
30 #define GES_TYPE_SOURCE ges_source_get_type()
31 GES_DECLARE_TYPE(Source, source, SOURCE);
32
33 /**
34  * GESSource:
35  *
36  * Base class for single-media sources
37  */
38
39 struct _GESSource {
40   /*< private >*/
41   GESTrackElement parent;
42
43   GESSourcePrivate *priv;
44
45   /* Padding for API extension */
46   gpointer _ges_reserved[GES_PADDING];
47 };
48
49 /**
50  * GESSourceClass:
51  * @create_source: method to return the GstElement to put in the source topbin.
52  */
53
54 struct _GESSourceClass {
55   /*< private >*/
56   GESTrackElementClass parent_class;
57
58   /**
59    * GESSourceClass::select_pad:
60    * @source: The @source for which to check if @pad should be used or not
61    * @pad: The pad to check
62    *
63    * Check whether @pad should be exposed/used.
64    *
65    * Returns: %TRUE if @pad should be used %FALSE otherwise.
66    *
67    * Since: 1.20
68    */
69   gboolean (*select_pad)(GESSource *source, GstPad *pad);
70
71   /* Padding for API extension */
72   gpointer _ges_reserved[GES_PADDING - 1];
73 };
74
75 G_END_DECLS