diff options
author | Rob Clark <rob@ti.com> | 2009-08-04 09:14:20 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-08-04 09:16:56 +0200 |
commit | f19cfbda96d098362cc2a2565197cef347878549 (patch) | |
tree | 598fdc98292aa14467da24fd6d711590588c1f68 /sys/v4l2/gstv4l2sink.h | |
parent | 56850099a6a47b8c3f8606f8107d42cb86dfe601 (diff) |
v4l2: Add v4l2sink element
This also does the following changes:
(1) pull the bufferpool code out into gstv4l2bufferpool.c, and make a
bit more generic so it can be used both for v4l2src and v4l2sink
(2) move some of the device probing/configuration/caps stuff into
gstv4l2object.c so it does not have to be duplicated between
v4l2src and v4l2sink
Fixes bug #590280.
Diffstat (limited to 'sys/v4l2/gstv4l2sink.h')
-rw-r--r-- | sys/v4l2/gstv4l2sink.h | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/sys/v4l2/gstv4l2sink.h b/sys/v4l2/gstv4l2sink.h new file mode 100644 index 00000000..2d5cadb8 --- /dev/null +++ b/sys/v4l2/gstv4l2sink.h @@ -0,0 +1,88 @@ +/* GStreamer + * + * Copyright (C) 2009 Texas Instruments, Inc - http://www.ti.com/ + * + * Description: V4L2 sink element + * Created on: Jul 2, 2009 + * Author: Rob Clark <rob@ti.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GSTV4L2SINK_H__ +#define __GSTV4L2SINK_H__ + +#include <gst/video/gstvideosink.h> +#include <gstv4l2object.h> +#include <gstv4l2bufferpool.h> + +GST_DEBUG_CATEGORY_EXTERN (v4l2sink_debug); + + +G_BEGIN_DECLS + +#define GST_TYPE_V4L2SINK \ + (gst_v4l2sink_get_type()) +#define GST_V4L2SINK(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_V4L2SINK, GstV4l2Sink)) +#define GST_V4L2SINK_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_V4L2SINK, GstV4l2SinkClass)) +#define GST_IS_V4L2SINK(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_V4L2SINK)) +#define GST_IS_V4L2SINK_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_V4L2SINK)) + +typedef struct _GstV4l2Sink GstV4l2Sink; +typedef struct _GstV4l2SinkClass GstV4l2SinkClass; + + +struct _GstV4l2Sink { + GstVideoSink videosink; + + /*< private >*/ + GstV4l2Object * v4l2object; + GstCaps *probed_caps; /* all supported caps of underlying v4l2 device */ + GstCaps *current_caps; /* the current negotiated caps */ + GstV4l2BufferPool *pool; + guint32 num_buffers; + + /** + * field to store requested overlay-top/left/width/height props: + * note, could maybe be combined with 'vwin' field in GstV4l2Object? + */ + struct v4l2_rect overlay; + + /** + * bitmask to track which 'overlay' fields user has requested by + * setting properties: + */ + guint8 overlay_fields_set; + + guint8 state; +}; + +struct _GstV4l2SinkClass { + GstVideoSinkClass parent_class; + + GList *v4l2_class_devices; +}; + +GType gst_v4l2sink_get_type(void); + +G_END_DECLS + + +#endif /* __GSTV4L2SINK_H__ */ |