Merging gst-build
[platform/upstream/gstreamer.git] / subprojects / gst-editing-services / ges / ges-smart-adder.h
1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4 -*-  */
2 /*
3  * gst-editing-services
4  * Copyright (C) 2013 Thibault Saunier <tsaunier@gnome.org>
5  *
6  * gst-editing-services is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License as published
8  * by the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * gst-editing-services is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program.  If not, see <http://www.gnu.org/licenses/>.";
18  */
19
20 #pragma once
21
22 #include <glib-object.h>
23 #include <gst/gst.h>
24
25 #include "ges-track.h"
26
27 G_BEGIN_DECLS
28
29 #define GES_TYPE_SMART_ADDER             (ges_smart_adder_get_type ())
30 #define GES_SMART_ADDER(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_SMART_ADDER, GESSmartAdder))
31 #define GES_SMART_ADDER_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_SMART_ADDER, GESSmartAdderClass))
32 #define GES_IS_SMART_ADDER(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_SMART_ADDER))
33 #define GES_IS_SMART_ADDER_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_SMART_ADDER))
34 #define GES_SMART_ADDER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_SMART_ADDER, GESSmartAdderClass))
35
36 typedef struct _GESSmartAdderClass GESSmartAdderClass;
37 typedef struct _GESSmartAdder GESSmartAdder;
38
39 struct _GESSmartAdderClass
40 {
41   GstBinClass parent_class;
42
43   gpointer _ges_reserved[GES_PADDING];
44 };
45
46 struct _GESSmartAdder
47 {
48   GstBin parent_instance;
49
50   GHashTable *pads_infos;
51   GstPad *srcpad;
52   GstElement *adder;
53   GstElement *capsfilter;
54   GMutex lock;
55
56   GstCaps *caps;
57
58   GESTrack *track;
59
60   gpointer _ges_reserved[GES_PADDING];
61 };
62
63 GES_API
64 GType         ges_smart_adder_get_type (void) G_GNUC_CONST;
65
66 GES_API
67 GstElement*   ges_smart_adder_new      (GESTrack *track);
68
69 G_END_DECLS