enum
{
+ PROP_0,
+ PROP_MODE,
+ PROP_ZOOM,
+ PROP_READY_FOR_CAPTURE
+};
+
+enum
+{
/* action signals */
START_CAPTURE_SIGNAL,
STOP_CAPTURE_SIGNAL,
GstBaseCameraSrc *self = GST_BASE_CAMERA_SRC (object);
switch (prop_id) {
- case ARG_MODE:
+ case PROP_MODE:
gst_base_camera_src_set_mode (GST_BASE_CAMERA_SRC (self),
g_value_get_enum (value));
break;
- case ARG_ZOOM:{
+ case PROP_ZOOM:{
g_atomic_int_set (&self->zoom, g_value_get_int (value));
/* does not set it if in NULL, the src is not created yet */
if (GST_STATE (self) != GST_STATE_NULL)
GstBaseCameraSrc *self = GST_BASE_CAMERA_SRC (object);
switch (prop_id) {
- case ARG_MODE:
+ case PROP_MODE:
g_value_set_enum (value, self->mode);
break;
- case ARG_READY_FOR_CAPTURE:
+ case PROP_READY_FOR_CAPTURE:
g_value_set_boolean (value, !self->capturing);
break;
- case ARG_ZOOM:
+ case PROP_ZOOM:
g_value_set_int (value, g_atomic_int_get (&self->zoom));
break;
default:
gobject_class->get_property = gst_base_camera_src_get_property;
// g_object_class_install_property ....
- g_object_class_install_property (gobject_class, ARG_MODE,
+ g_object_class_install_property (gobject_class, PROP_MODE,
g_param_spec_enum ("mode", "Mode",
"The capture mode (still image capture or video recording)",
GST_TYPE_CAMERABIN_MODE, MODE_IMAGE,
* function, please schedule a new thread to do it. If you're using glib's
* mainloop you can use g_idle_add() for example.
*/
- g_object_class_install_property (gobject_class, ARG_READY_FOR_CAPTURE,
+ g_object_class_install_property (gobject_class, PROP_READY_FOR_CAPTURE,
g_param_spec_boolean ("ready-for-capture", "Ready for capture",
"Informs this element is ready for starting another capture",
TRUE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
G_BEGIN_DECLS
-/* XXX find better place for property related enum/defaults */
-enum
-{
- ARG_0,
- ARG_FILENAME,
- ARG_MODE,
- ARG_READY_FOR_CAPTURE,
- ARG_FLAGS,
- ARG_MUTE,
- ARG_ZOOM,
- ARG_IMAGE_POST,
- ARG_IMAGE_ENC,
- ARG_VIDEO_POST,
- ARG_VIDEO_ENC,
- ARG_AUDIO_ENC,
- ARG_VIDEO_MUX,
- ARG_VF_SINK,
- ARG_VIDEO_SRC,
- ARG_AUDIO_SRC,
- ARG_INPUT_CAPS,
- ARG_FILTER_CAPS,
- ARG_PREVIEW_CAPS,
- ARG_WB_MODE,
- ARG_COLOUR_TONE,
- ARG_SCENE_MODE,
- ARG_FLASH_MODE,
- ARG_FOCUS_STATUS,
- ARG_CAPABILITIES,
- ARG_SHAKE_RISK,
- ARG_EV_COMP,
- ARG_ISO_SPEED,
- ARG_APERTURE,
- ARG_EXPOSURE,
- ARG_VIDEO_SOURCE_FILTER,
- ARG_IMAGE_CAPTURE_SUPPORTED_CAPS,
- ARG_VIEWFINDER_FILTER,
- ARG_FLICKER_MODE,
- ARG_FOCUS_MODE,
- ARG_BLOCK_VIEWFINDER,
- ARG_IMAGE_CAPTURE_WIDTH,
- ARG_IMAGE_CAPTURE_HEIGHT,
- ARG_VIDEO_CAPTURE_WIDTH,
- ARG_VIDEO_CAPTURE_HEIGHT,
- ARG_VIDEO_CAPTURE_FRAMERATE
-};
-
#define DEFAULT_WIDTH 640
#define DEFAULT_HEIGHT 480
#define DEFAULT_CAPTURE_WIDTH 800
#include "camerabingeneral.h"
#include "gstcamerabin-enum.h"
+enum
+{
+ PROP_0,
+ PROP_FILTER_CAPS,
+ PROP_VIDEO_SRC,
+ PROP_VIDEO_SOURCE_FILTER
+};
+
#define CAMERABIN_DEFAULT_VF_CAPS "video/x-raw-yuv,format=(fourcc)I420"
/* Using "bilinear" as default zoom method */
GstV4l2CameraSrc *self = GST_V4L2_CAMERA_SRC (object);
switch (prop_id) {
- case ARG_FILTER_CAPS:
+ case PROP_FILTER_CAPS:
GST_OBJECT_LOCK (self);
gst_caps_replace (&self->view_finder_caps,
(GstCaps *) gst_value_get_caps (value));
GST_OBJECT_UNLOCK (self);
configure_format (self, self->view_finder_caps);
break;
- case ARG_VIDEO_SOURCE_FILTER:
+ case PROP_VIDEO_SOURCE_FILTER:
if (GST_STATE (self) != GST_STATE_NULL) {
GST_ELEMENT_ERROR (self, CORE, FAILED,
("camerasrc must be in NULL state when setting the video filter element"),
self->app_video_filter = g_value_dup_object (value);
}
break;
- case ARG_VIDEO_SRC:
+ case PROP_VIDEO_SRC:
if (GST_STATE (self) != GST_STATE_NULL) {
GST_ELEMENT_ERROR (self, CORE, FAILED,
("camerasrc must be in NULL state when setting the video source element"),
GstV4l2CameraSrc *self = GST_V4L2_CAMERA_SRC (object);
switch (prop_id) {
- case ARG_FILTER_CAPS:
+ case PROP_FILTER_CAPS:
gst_value_set_caps (value, self->view_finder_caps);
break;
- case ARG_VIDEO_SOURCE_FILTER:
+ case PROP_VIDEO_SOURCE_FILTER:
g_value_set_object (value, self->app_video_filter);
break;
- case ARG_VIDEO_SRC:
+ case PROP_VIDEO_SRC:
if (self->src_vid_src)
g_value_set_object (value, self->src_vid_src);
else