2010-11-25 16:00:50 +00:00
|
|
|
/*
|
|
|
|
* GStreamer
|
|
|
|
* Copyright (C) 2010 Texas Instruments, Inc
|
2010-12-24 12:10:48 +00:00
|
|
|
* Copyright (C) 2010 Thiago Santos <thiago.sousa.santos@collabora.co.uk>
|
2010-11-25 16:00:50 +00:00
|
|
|
*
|
|
|
|
* 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
|
2012-11-03 20:38:00 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2010-11-25 16:00:50 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2010-12-14 20:23:10 +00:00
|
|
|
#ifndef __GST_WRAPPER_CAMERA_BIN_SRC_H__
|
|
|
|
#define __GST_WRAPPER_CAMERA_BIN_SRC_H__
|
2010-11-25 16:00:50 +00:00
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2010-12-13 22:36:41 +00:00
|
|
|
#include <gst/basecamerabinsrc/gstbasecamerasrc.h>
|
2011-02-03 15:02:14 +00:00
|
|
|
#include <gst/basecamerabinsrc/gstcamerabinpreview.h>
|
2010-12-30 03:27:03 +00:00
|
|
|
#include "camerabingeneral.h"
|
2010-11-25 16:00:50 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
2014-10-28 21:42:31 +00:00
|
|
|
|
2010-12-14 20:23:10 +00:00
|
|
|
#define GST_TYPE_WRAPPER_CAMERA_BIN_SRC \
|
|
|
|
(gst_wrapper_camera_bin_src_get_type())
|
|
|
|
#define GST_WRAPPER_CAMERA_BIN_SRC(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_WRAPPER_CAMERA_BIN_SRC,GstWrapperCameraBinSrc))
|
|
|
|
#define GST_WRAPPER_CAMERA_BIN_SRC_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_WRAPPER_CAMERA_BIN_SRC,GstWrapperCameraBinSrcClass))
|
|
|
|
#define GST_IS_WRAPPER_CAMERA_BIN_SRC(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_WRAPPER_CAMERA_BIN_SRC))
|
|
|
|
#define GST_IS_WRAPPER_CAMERA_BIN_SRC_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WRAPPER_CAMERA_BIN_SRC))
|
|
|
|
GType gst_wrapper_camera_bin_src_get_type (void);
|
|
|
|
|
|
|
|
typedef struct _GstWrapperCameraBinSrc GstWrapperCameraBinSrc;
|
|
|
|
typedef struct _GstWrapperCameraBinSrcClass GstWrapperCameraBinSrcClass;
|
2010-11-25 16:00:50 +00:00
|
|
|
|
2010-11-29 18:49:26 +00:00
|
|
|
enum GstVideoRecordingStatus {
|
|
|
|
GST_VIDEO_RECORDING_STATUS_DONE,
|
|
|
|
GST_VIDEO_RECORDING_STATUS_STARTING,
|
|
|
|
GST_VIDEO_RECORDING_STATUS_RUNNING,
|
|
|
|
GST_VIDEO_RECORDING_STATUS_FINISHING
|
|
|
|
};
|
|
|
|
|
2010-11-25 16:00:50 +00:00
|
|
|
|
|
|
|
/**
|
2010-12-14 20:23:10 +00:00
|
|
|
* GstWrapperCameraBinSrc:
|
2010-11-25 16:00:50 +00:00
|
|
|
*
|
|
|
|
*/
|
2010-12-14 20:23:10 +00:00
|
|
|
struct _GstWrapperCameraBinSrc
|
2010-11-25 16:00:50 +00:00
|
|
|
{
|
|
|
|
GstBaseCameraSrc parent;
|
|
|
|
|
2010-12-17 01:49:24 +00:00
|
|
|
GstCameraBinMode mode;
|
|
|
|
|
2012-03-22 07:47:57 +00:00
|
|
|
GstPad *srcfilter_pad;
|
2010-12-07 22:40:28 +00:00
|
|
|
GstPad *vfsrc;
|
|
|
|
GstPad *imgsrc;
|
|
|
|
GstPad *vidsrc;
|
|
|
|
|
2010-11-29 18:49:26 +00:00
|
|
|
/* video recording controls */
|
|
|
|
gint video_rec_status;
|
|
|
|
|
2010-11-30 12:28:50 +00:00
|
|
|
/* image capture controls */
|
|
|
|
gint image_capture_count;
|
|
|
|
|
2010-11-25 16:00:50 +00:00
|
|
|
/* source elements */
|
|
|
|
GstElement *src_vid_src;
|
2011-05-09 17:35:42 +00:00
|
|
|
GstElement *video_filter;
|
2010-11-25 16:00:50 +00:00
|
|
|
GstElement *src_filter;
|
2015-04-27 16:24:54 +00:00
|
|
|
GstElement *digitalzoom;
|
2015-04-20 11:42:48 +00:00
|
|
|
|
|
|
|
/* Pad from our last element that is linked
|
|
|
|
* with the output pads */
|
|
|
|
GstPad *src_pad;
|
|
|
|
|
|
|
|
GstPad *video_tee_vf_pad;
|
|
|
|
GstPad *video_tee_sink;
|
2010-12-24 12:10:48 +00:00
|
|
|
|
|
|
|
gboolean elements_created;
|
2010-11-25 16:00:50 +00:00
|
|
|
|
2012-09-28 02:22:37 +00:00
|
|
|
gulong src_event_probe_id;
|
2012-09-28 03:06:45 +00:00
|
|
|
gulong src_max_zoom_signal_id;
|
2015-04-20 11:42:48 +00:00
|
|
|
gulong image_capture_probe;
|
|
|
|
gulong video_capture_probe;
|
2010-11-25 16:00:50 +00:00
|
|
|
|
|
|
|
/* Application configurable elements */
|
|
|
|
GstElement *app_vid_src;
|
2011-05-09 17:35:42 +00:00
|
|
|
GstElement *app_vid_filter;
|
2010-11-25 16:00:50 +00:00
|
|
|
|
|
|
|
/* Caps that videosrc supports */
|
|
|
|
GstCaps *allowed_caps;
|
|
|
|
|
2015-04-24 17:19:50 +00:00
|
|
|
/* Optional crop for frames. Used to crop frames e.g.
|
|
|
|
due to wrong aspect ratio. Done before the crop related to zooming. */
|
|
|
|
GstElement *src_crop;
|
2010-11-25 16:00:50 +00:00
|
|
|
|
|
|
|
/* Caps applied to capsfilters when in view finder mode */
|
|
|
|
GstCaps *view_finder_caps;
|
|
|
|
|
|
|
|
/* Caps applied to capsfilters when taking still image */
|
|
|
|
GstCaps *image_capture_caps;
|
2010-12-16 03:40:25 +00:00
|
|
|
gboolean image_renegotiate;
|
|
|
|
gboolean video_renegotiate;
|
2010-11-25 16:00:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2010-12-14 20:23:10 +00:00
|
|
|
* GstWrapperCameraBinSrcClass:
|
2010-11-25 16:00:50 +00:00
|
|
|
*
|
|
|
|
*/
|
2010-12-14 20:23:10 +00:00
|
|
|
struct _GstWrapperCameraBinSrcClass
|
2010-11-25 16:00:50 +00:00
|
|
|
{
|
|
|
|
GstBaseCameraSrcClass parent;
|
|
|
|
};
|
|
|
|
|
2010-12-14 20:23:10 +00:00
|
|
|
gboolean gst_wrapper_camera_bin_src_plugin_init (GstPlugin * plugin);
|
2010-11-25 16:00:50 +00:00
|
|
|
|
2014-10-28 21:42:31 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
2010-12-14 20:23:10 +00:00
|
|
|
#endif /* __GST_WRAPPER_CAMERA_BIN_SRC_H__ */
|