diff options
author | Thiago Santos <thiago.sousa.santos@collabora.co.uk> | 2010-12-16 22:49:24 -0300 |
---|---|---|
committer | Thiago Santos <thiago.sousa.santos@collabora.co.uk> | 2010-12-23 13:24:55 -0300 |
commit | b1a361b566cf0dfc3a188f5a23c13feab9d575a2 (patch) | |
tree | 156bd0978a251e4b7efb5080407aac521bcba46d | |
parent | 85bf8f233556a1f73d66ae742d0fb97524a44e88 (diff) | |
download | gstreamer-plugins-bad-b1a361b566cf0dfc3a188f5a23c13feab9d575a2.tar.gz |
wrappercamerabinsrc: Add local mode
-rw-r--r-- | gst/camerabin2/gstwrappercamerabinsrc.c | 12 | ||||
-rw-r--r-- | gst/camerabin2/gstwrappercamerabinsrc.h | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c index bcbddc6cf..747913b62 100644 --- a/gst/camerabin2/gstwrappercamerabinsrc.c +++ b/gst/camerabin2/gstwrappercamerabinsrc.c @@ -417,6 +417,9 @@ gst_wrapper_camera_bin_src_set_mode (GstBaseCameraSrc * bcamsrc, GstCameraBinMode mode) { GstPhotography *photography = gst_base_camera_src_get_photography (bcamsrc); + GstWrapperCameraBinSrc *self = GST_WRAPPER_CAMERA_BIN_SRC (bcamsrc); + + self->mode = mode; if (photography) { if (g_object_class_find_property (G_OBJECT_GET_CLASS (photography), @@ -691,10 +694,10 @@ gst_wrapper_camera_bin_src_start_capture (GstBaseCameraSrc * camerasrc) GstWrapperCameraBinSrc *src = GST_WRAPPER_CAMERA_BIN_SRC (camerasrc); /* TODO shoud we access this directly? Maybe a macro is better? */ - if (camerasrc->mode == MODE_IMAGE) { + if (src->mode == MODE_IMAGE) { src->image_capture_count = 1; start_image_capture (src); - } else if (camerasrc->mode == MODE_VIDEO) { + } else if (src->mode == MODE_VIDEO) { if (src->video_rec_status == GST_VIDEO_RECORDING_STATUS_DONE) { src->video_rec_status = GST_VIDEO_RECORDING_STATUS_STARTING; } @@ -711,7 +714,7 @@ gst_wrapper_camera_bin_src_stop_capture (GstBaseCameraSrc * camerasrc) GstWrapperCameraBinSrc *src = GST_WRAPPER_CAMERA_BIN_SRC (camerasrc); /* TODO shoud we access this directly? Maybe a macro is better? */ - if (camerasrc->mode == MODE_VIDEO) { + if (src->mode == MODE_VIDEO) { if (src->video_rec_status == GST_VIDEO_RECORDING_STATUS_STARTING) { GST_DEBUG_OBJECT (src, "Aborting, had not started recording"); src->video_rec_status = GST_VIDEO_RECORDING_STATUS_DONE; @@ -794,6 +797,9 @@ gst_wrapper_camera_bin_src_init (GstWrapperCameraBinSrc * self, /* TODO where are variables reset? */ self->image_capture_count = 0; self->video_rec_status = GST_VIDEO_RECORDING_STATUS_DONE; + self->video_renegotiate = FALSE; + self->image_renegotiate = FALSE; + self->mode = GST_BASE_CAMERA_SRC_CAST (self)->mode; } gboolean diff --git a/gst/camerabin2/gstwrappercamerabinsrc.h b/gst/camerabin2/gstwrappercamerabinsrc.h index c06a9bbce..dc65f33ce 100644 --- a/gst/camerabin2/gstwrappercamerabinsrc.h +++ b/gst/camerabin2/gstwrappercamerabinsrc.h @@ -57,6 +57,8 @@ struct _GstWrapperCameraBinSrc { GstBaseCameraSrc parent; + GstCameraBinMode mode; + GstPad *vfsrc; GstPad *imgsrc; GstPad *vidsrc; |