From 6a47f6f594740e28dcf9176fb88260114a94f8b3 Mon Sep 17 00:00:00 2001 From: Lasse Laukkanen Date: Wed, 27 May 2009 11:33:01 +0300 Subject: camerabin: preview image sending optimization * decouple image capturing from image post-processing and encoding * post image-captured message after image is captured * post preview-image message with snapshot of captured image --- gst/camerabin/gstcamerabin.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'gst/camerabin/gstcamerabin.h') diff --git a/gst/camerabin/gstcamerabin.h b/gst/camerabin/gstcamerabin.h index 16b242c0..cd88c7ca 100644 --- a/gst/camerabin/gstcamerabin.h +++ b/gst/camerabin/gstcamerabin.h @@ -59,7 +59,6 @@ struct _GstCameraBin /* private */ GString *filename; gint mode; /* MODE_IMAGE or MODE_VIDEO */ - guint num_img_buffers; /* no of image buffers captured */ gboolean stop_requested; /* TRUE if capturing stop needed */ gboolean paused; /* TRUE if capturing paused */ @@ -69,6 +68,9 @@ struct _GstCameraBin gint fps_n; gint fps_d; + /* Image tags are collected here first before sending to imgbin */ + GstTagList *event_tags; + /* Caps applied to capsfilters when taking still image */ GstCaps *image_capture_caps; @@ -78,6 +80,9 @@ struct _GstCameraBin /* Caps that videosrc supports */ GstCaps *allowed_caps; + /* Caps used to create preview image */ + GstCaps *preview_caps; + /* The digital zoom (from 100% to 1000%) */ gint zoom; @@ -90,16 +95,16 @@ struct _GstCameraBin GstPad *pad_src_view; GstPad *pad_view_src; GstPad *pad_src_img; - GstPad *pad_view_img; GstPad *pad_src_vid; GstPad *pad_view_vid; + GstPad *pad_src_queue; - GstPad *srcpad_zoom_filter; - GstPad *srcpad_videosrc; - + GstElement *img_queue; /* queue for decoupling capture from + image-postprocessing and saving */ GstElement *imgbin; /* bin that holds image capturing elements */ GstElement *vidbin; /* bin that holds video capturing elements */ GstElement *active_bin; /* image or video bin that is currently in use */ + GstElement *preview_pipeline; /* pipeline for creating preview images */ /* source elements */ GstElement *src_vid_src; @@ -126,6 +131,9 @@ struct _GstCameraBin /* Cache the photography interface settings */ GstPhotoSettings photo_settings; + + /* Buffer probe id for captured image handling */ + gulong image_captured_id; }; /** @@ -148,7 +156,7 @@ struct _GstCameraBinClass /* signals (callback) */ - gboolean (*img_done) (GstCameraBin * camera, const gchar * filename); + gboolean (*img_done) (GstCameraBin * camera, const gchar * filename); }; /** @@ -167,4 +175,4 @@ typedef enum GType gst_camerabin_get_type (void); G_END_DECLS -#endif /* #ifndef __GST_CAMERABIN_H__ */ +#endif /* #ifndef __GST_CAMERABIN_H__ */ -- cgit v1.2.1