Release 1.19.2
[platform/upstream/gst-editing-services.git] / ges / ges-smart-video-mixer.h
1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4 -*-  */
2 /*
3  * gst-editing-services
4  * Copyright (C) 2013 Mathieu Duponchelle <mduponchelle1@gmail.com>
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_MIXER             (ges_smart_mixer_get_type ())
30 #define GES_SMART_MIXER(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_SMART_MIXER, GESSmartMixer))
31 #define GES_SMART_MIXER_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_SMART_MIXER, GESSmartMixerClass))
32 #define GES_IS_SMART_MIXER(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_SMART_MIXER))
33 #define GES_IS_SMART_MIXER_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_SMART_MIXER))
34 #define GES_SMART_MIXER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_SMART_MIXER, GESSmartMixerClass))
35
36 typedef struct _GESSmartMixerClass GESSmartMixerClass;
37 typedef struct _GESSmartMixer GESSmartMixer;
38
39 struct _GESSmartMixerClass
40 {
41   GstBinClass parent_class;
42
43   gpointer _ges_reserved[GES_PADDING];
44 };
45
46 struct _GESSmartMixer
47 {
48   GstBin parent_instance;
49
50   GHashTable *pads_infos;
51   GstPad *srcpad;
52   GstElement *mixer;
53   GMutex lock;
54
55   GstCaps *caps;
56   gboolean is_transition;
57
58   gpointer _ges_reserved[GES_PADDING];
59 };
60
61 G_GNUC_INTERNAL
62 GType ges_smart_mixer_get_type (void) G_GNUC_CONST;
63
64 G_GNUC_INTERNAL GstPad *
65 ges_smart_mixer_get_mixer_pad (GESSmartMixer *self, GstPad **mixerpad);
66
67 G_GNUC_INTERNAL
68 GstElement*   ges_smart_mixer_new      (GESTrack *track);
69
70 G_END_DECLS