summaryrefslogtreecommitdiffstats
path: root/libcamera/SecCamera.h
diff options
context:
space:
mode:
authorMike J. Chen <mjchen@sta.samsung.com>2010-11-03 10:19:37 -0700
committerSimon Wilson <simonwilson@google.com>2011-01-19 18:27:02 -0800
commit050e57e0f0738fa9c7312de75c6223572ba5d529 (patch)
treed7a6d5cfa7e6c55970070dcecd2a9029c476158a /libcamera/SecCamera.h
parent0bd85d7b37790a2486319001d5bdd2e86a866c4f (diff)
downloaddevice_samsung_crespo-050e57e0f0738fa9c7312de75c6223572ba5d529.zip
device_samsung_crespo-050e57e0f0738fa9c7312de75c6223572ba5d529.tar.gz
device_samsung_crespo-050e57e0f0738fa9c7312de75c6223572ba5d529.tar.bz2
S5PC11X: libcamera: buffer cleanup
Cleanup how buffers are managed. Before, buffers for preview and capture and record were mixed together, with one thread cleaning up buffers for another. Now, each mode cleans up its own buffers. Implement asychronous buffer release for record case to fix a bug where we allowed FIMC to update a buffer that was still in use by encoder, resulting in encoding a frame that was part one image and part another. Change-Id: I42d0032cea61197a1f3a665a7248b700599d5a6a Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
Diffstat (limited to 'libcamera/SecCamera.h')
-rw-r--r--libcamera/SecCamera.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/libcamera/SecCamera.h b/libcamera/SecCamera.h
index 7710ce4..0580373 100644
--- a/libcamera/SecCamera.h
+++ b/libcamera/SecCamera.h
@@ -292,11 +292,11 @@ public:
int startRecord(void);
int stopRecord(void);
- int getRecord(void);
+ int getRecordFrame(void);
+ int releaseRecordFrame(int index);
unsigned int getRecPhyAddrY(int);
unsigned int getRecPhyAddrC(int);
- int cancelPicture(void);
int getPreview(void);
int setPreviewSize(int width, int height, int pixel_format);
int getPreviewSize(int *width, int *height, int *frame_size);
@@ -410,6 +410,7 @@ public:
int setExifOrientationInfo(int orientationInfo);
int setBatchReflection(void);
int setSnapshotCmd(void);
+ int endSnapshot(void);
int setCameraSensorReset(void);
int setSensorMode(int sensor_mode); /* Camcorder fix fps */
int setShotMode(int shot_mode); /* Shot mode */
@@ -424,6 +425,7 @@ public:
int setDefultIMEI(int imei);
int getDefultIMEI(void);
const __u8* getCameraSensorName(void);
+ int previewPoll(bool preview);
#ifdef ENABLE_ESD_PREVIEW_CHECK
int getCameraSensorESDStatus(void);
#endif // ENABLE_ESD_PREVIEW_CHECK
@@ -495,7 +497,6 @@ private:
int m_cam_fd2;
struct pollfd m_events_c2;
int m_flag_record_start;
- struct fimc_buffer m_buffers_c2[MAX_BUFFERS];
int m_preview_v4lformat;
int m_preview_width;
@@ -553,7 +554,7 @@ private:
exif_attribute_t mExifInfo;
- struct fimc_buffer m_buffers_c[MAX_BUFFERS];
+ struct fimc_buffer m_capture_buf;
struct pollfd m_events_c;
inline int m_frameSize(int format, int width, int height);