Tizen 2.0 Release
[framework/multimedia/gst-plugins-bad0.10.git] / gst / camerabin / camerabinimage.h
1 /*
2  * GStreamer
3  * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
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., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20
21 #ifndef __CAMERABIN_IMAGE_H__
22 #define __CAMERABIN_IMAGE_H__
23
24 #include <gst/gstbin.h>
25
26 #include "gstcamerabin-enum.h"
27
28 G_BEGIN_DECLS
29 #define GST_TYPE_CAMERABIN_IMAGE             (gst_camerabin_image_get_type())
30 #define GST_CAMERABIN_IMAGE_CAST(obj)        ((GstCameraBinImage*)(obj))
31 #define GST_CAMERABIN_IMAGE(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CAMERABIN_IMAGE,GstCameraBinImage))
32 #define GST_CAMERABIN_IMAGE_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CAMERABIN_IMAGE,GstCameraBinImageClass))
33 #define GST_IS_CAMERABIN_IMAGE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CAMERABIN_IMAGE))
34 #define GST_IS_CAMERABIN_IMAGE_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CAMERABIN_IMAGE))
35 /**
36  * GstCameraBinImage:
37  *
38  * The opaque #GstCameraBinImage structure.
39  */
40 typedef struct _GstCameraBinImage GstCameraBinImage;
41 typedef struct _GstCameraBinImageClass GstCameraBinImageClass;
42
43 struct _GstCameraBinImage
44 {
45   GstBin parent;
46   GString *filename;
47
48   /* Ghost pads of image bin */
49   GstPad *sinkpad;
50
51   /* Ordered list of elements configured to imagebin */
52   GList *elements;
53   /* Imagebin elements */
54   GstElement *post;
55   GstElement *csp;
56   GstElement *enc;
57   GstElement *app_enc;
58   GstElement *formatter;
59   GstElement *app_formatter;
60   GstElement *sink;
61
62   GstCameraBinFlags flags;
63   gulong metadata_probe_id;
64 };
65
66 struct _GstCameraBinImageClass
67 {
68   GstBinClass parent_class;
69 };
70
71 GType gst_camerabin_image_get_type (void);
72
73 void
74 gst_camerabin_image_set_encoder (GstCameraBinImage * img, GstElement * encoder);
75
76 void
77 gst_camerabin_image_set_postproc (GstCameraBinImage * img,
78     GstElement * postproc);
79
80 void
81 gst_camerabin_image_set_formatter (GstCameraBinImage * img, GstElement * formatter);
82
83 void
84 gst_camerabin_image_set_flags (GstCameraBinImage * img,
85     GstCameraBinFlags flags);
86
87 GstElement *gst_camerabin_image_get_encoder (GstCameraBinImage * img);
88
89 GstElement *gst_camerabin_image_get_postproc (GstCameraBinImage * img);
90
91 GstElement *gst_camerabin_image_get_formatter (GstCameraBinImage * img);
92
93 gboolean gst_camerabin_image_prepare_elements (GstCameraBinImage * imagebin);
94
95 G_END_DECLS
96 #endif /* #ifndef __CAMERABIN_IMAGE_H__ */