[v4l2src] Add new property for TBM output buffer
[platform/upstream/gst-plugins-good.git] / sys / v4l2 / gstv4l2sink.h
1 /* GStreamer
2  *
3  * Copyright (C) 2009 Texas Instruments, Inc - http://www.ti.com/
4  *
5  * Description: V4L2 sink element
6  *  Created on: Jul 2, 2009
7  *      Author: Rob Clark <rob@ti.com>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Library General Public
11  * License as published by the Free Software Foundation; either
12  * version 2 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Library General Public License for more details.
18  *
19  * You should have received a copy of the GNU Library General Public
20  * License along with this library; if not, write to the
21  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
22  * Boston, MA 02110-1301, USA.
23  */
24
25 #ifndef __GSTV4L2SINK_H__
26 #define __GSTV4L2SINK_H__
27
28 #include <gst/video/gstvideosink.h>
29 #include <gstv4l2object.h>
30 #include <gstv4l2bufferpool.h>
31
32 G_BEGIN_DECLS
33
34 #define GST_TYPE_V4L2SINK \
35   (gst_v4l2sink_get_type())
36 #define GST_V4L2SINK(obj) \
37   (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_V4L2SINK, GstV4l2Sink))
38 #define GST_V4L2SINK_CLASS(klass) \
39   (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_V4L2SINK, GstV4l2SinkClass))
40 #define GST_IS_V4L2SINK(obj) \
41   (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_V4L2SINK))
42 #define GST_IS_V4L2SINK_CLASS(klass) \
43   (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_V4L2SINK))
44
45 typedef struct _GstV4l2Sink GstV4l2Sink;
46 typedef struct _GstV4l2SinkClass GstV4l2SinkClass;
47
48
49 struct _GstV4l2Sink {
50   GstVideoSink videosink;
51
52   /*< private >*/
53   GstV4l2Object * v4l2object;
54
55   gint video_width, video_height;      /* original (unscaled) video w/h */
56
57   /*
58    * field to store requested overlay and crop top/left/width/height props:
59    * note, could maybe be combined with 'vwin' field in GstV4l2Object?
60    */
61   struct v4l2_rect overlay, crop;
62
63   /*
64    * bitmask to track which overlay and crop fields user has requested by
65    * setting properties:
66    */
67   guint8 overlay_fields_set, crop_fields_set;
68 };
69
70 struct _GstV4l2SinkClass {
71   GstVideoSinkClass parent_class;
72
73   GList *v4l2_class_devices;
74 };
75
76 GType gst_v4l2sink_get_type(void);
77
78 G_END_DECLS
79
80
81 #endif /* __GSTV4L2SINK_H__ */