3 * Copyright (C) 2009 Texas Instruments, Inc - http://www.ti.com/
5 * Description: V4L2 sink element
6 * Created on: Jul 2, 2009
7 * Author: Rob Clark <rob@ti.com>
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.
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.
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.
25 #ifndef __GSTV4L2SINK_H__
26 #define __GSTV4L2SINK_H__
28 #include <gst/video/gstvideosink.h>
29 #include <gstv4l2object.h>
30 #include <gstv4l2bufferpool.h>
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))
45 typedef struct _GstV4l2Sink GstV4l2Sink;
46 typedef struct _GstV4l2SinkClass GstV4l2SinkClass;
50 GstVideoSink videosink;
53 GstV4l2Object * v4l2object;
55 gint video_width, video_height; /* original (unscaled) video w/h */
58 * field to store requested overlay and crop top/left/width/height props:
59 * note, could maybe be combined with 'vwin' field in GstV4l2Object?
61 struct v4l2_rect overlay, crop;
64 * bitmask to track which overlay and crop fields user has requested by
67 guint8 overlay_fields_set, crop_fields_set;
70 struct _GstV4l2SinkClass {
71 GstVideoSinkClass parent_class;
73 GList *v4l2_class_devices;
76 GType gst_v4l2sink_get_type(void);
81 #endif /* __GSTV4L2SINK_H__ */