videoaggregator: Create a new GstVideoAggregator baseclass
[platform/upstream/gstreamer.git] / gst-libs / gst / video / gstvideoaggregatorpad.h
1 /* Generic video aggregator plugin
2  * Copyright (C) 2008 Wim Taymans <wim@fluendo.com>
3  * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk>
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 #ifndef __GST_VIDEO_AGGREGATOR_PAD_H__
22 #define __GST_VIDEO_AGGREGATOR_PAD_H__
23
24 #include <gst/gst.h>
25 #include <gst/video/video.h>
26
27 #include <gst/base/gstaggregator.h>
28
29 #include "videoconvert.h"
30
31 G_BEGIN_DECLS
32
33 #define GST_TYPE_VIDEO_AGGREGATOR_PAD (gst_videoaggregator_pad_get_type())
34 #define GST_VIDEO_AGGREGATOR_PAD(obj) \
35         (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_AGGREGATOR_PAD, GstVideoAggregatorPad))
36 #define GST_VIDEO_AGGREGATOR_PAD_CLASS(klass) \
37         (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_COMPOSITOR_PAD, GstVideoAggregatorPadClass))
38 #define GST_IS_VIDEO_AGGREGATOR_PAD(obj) \
39         (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_AGGREGATOR_PAD))
40 #define GST_IS_VIDEO_AGGREGATOR_PAD_CLASS(klass) \
41         (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_AGGREGATOR_PAD))
42
43 typedef struct _GstVideoAggregatorPad GstVideoAggregatorPad;
44 typedef struct _GstVideoAggregatorPadClass GstVideoAggregatorPadClass;
45 typedef struct _GstVideoAggregatorCollect GstVideoAggregatorCollect;
46
47 /**
48  * GstVideoAggregatorPad:
49  *
50  * The opaque #GstVideoAggregatorPad structure.
51  */
52 struct _GstVideoAggregatorPad
53 {
54   GstAggregatorPad parent;
55
56   /* < private > */
57
58   /* caps */
59   GstVideoInfo info;
60
61   /* properties */
62   guint zorder;
63
64   /* caps used for conversion if needed */
65   GstVideoInfo conversion_info;
66
67   /* Converter, if NULL no conversion is done */
68   VideoConvert *convert;
69   gboolean need_conversion_update;
70   GstBuffer *converted_buffer;
71
72   GstBuffer *buffer;
73   GstVideoInfo queued_vinfo;
74   GstBuffer *queued;
75   GstVideoInfo buffer_vinfo;
76
77   GstClockTime start_time;
78   GstClockTime end_time;
79   GstVideoFrame *aggregated_frame;
80 };
81
82 struct _GstVideoAggregatorPadClass
83 {
84   GstAggregatorPadClass parent_class;
85 };
86
87 GType gst_videoaggregator_pad_get_type (void);
88
89 G_END_DECLS
90 #endif /* __GST_VIDEO_AGGREGATOR_PAD_H__ */