diff options
author | Mike J. Chen <mjchen@sta.samsung.com> | 2010-11-23 17:39:22 -0800 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2011-01-19 18:05:18 -0800 |
commit | 0bd85d7b37790a2486319001d5bdd2e86a866c4f (patch) | |
tree | 2eeb5a527e821b0e1d314b237a9c873ef08965d8 /libcamera/SecCamera.h | |
parent | 27cc0c7879c062a7a27c2479f45e974b20c1522c (diff) | |
download | device_samsung_crespo-0bd85d7b37790a2486319001d5bdd2e86a866c4f.zip device_samsung_crespo-0bd85d7b37790a2486319001d5bdd2e86a866c4f.tar.gz device_samsung_crespo-0bd85d7b37790a2486319001d5bdd2e86a866c4f.tar.bz2 |
SP5C11X: libcamera: #ifdef/#defines cleanup
Remove a bunch of #ifdef conditionals to cleanup the code. The #else
cases have generally not been tested for months now and we don't use
them, and this makes it easier to follow for the next round of logic
cleanup coming up.
Change-Id: I4a78901916ed9393ef9b904a1e8037cd645be3b4
Signed-off-by: Mike J. Chen <mjchen@sta.samsung.com>
Diffstat (limited to 'libcamera/SecCamera.h')
-rw-r--r-- | libcamera/SecCamera.h | 57 |
1 files changed, 5 insertions, 52 deletions
diff --git a/libcamera/SecCamera.h b/libcamera/SecCamera.h index e1460b9..7710ce4 100644 --- a/libcamera/SecCamera.h +++ b/libcamera/SecCamera.h @@ -34,40 +34,16 @@ #include <sys/stat.h> #include <linux/videodev2.h> -#ifdef SWP1_CAMERA_ADD_ADVANCED_FUNCTION #include <videodev2_samsung.h> -#endif #include "JpegEncoder.h" -#ifdef ENABLE_HDMI_DISPLAY -#include "hdmi_lib.h" -#endif - #include <camera/CameraHardwareInterface.h> namespace android { -//Define this if the preview data is to be shared using memory mapped technique instead of passing physical address. -#define PREVIEW_USING_MMAP -//Define this if the JPEG images are obtained directly from camera sensor. Else on chip JPEG encoder will be used. -#define JPEG_FROM_SENSOR - -//#define DUAL_PORT_RECORDING //Define this if 2 fimc ports are needed for recording. - -//#define SEND_YUV_RECORD_DATA //Define this to copy YUV data to encoder instead of sharing the physical address. #define ENABLE_ESD_PREVIEW_CHECK -#define INCLUDE_JPEG_THUMBNAIL 1 //Valid only for on chip JPEG encoder - -#if defined PREVIEW_USING_MMAP -#define DUAL_PORT_RECORDING -#endif - -#if defined JPEG_FROM_SENSOR -#define DIRECT_DELIVERY_OF_POSTVIEW_DATA //Define this if postview data is needed in buffer instead of zero copy. -#endif - #if defined(LOG_NDEBUG) && LOG_NDEBUG == 0 #define LOG_CAMERA LOGD #define LOG_CAMERA_PREVIEW LOGD @@ -160,10 +136,8 @@ namespace android { #define DEFAULT_JPEG_THUMBNAIL_HEIGHT 192 #define CAMERA_DEV_NAME "/dev/video0" - -#ifdef DUAL_PORT_RECORDING #define CAMERA_DEV_NAME2 "/dev/video2" -#endif + #define CAMERA_DEV_NAME_TEMP "/data/videotmp_000" #define CAMERA_DEV_NAME2_TEMP "/data/videotemp_002" @@ -235,7 +209,6 @@ public: CAMERA_ID_FRONT = 1, }; -#ifdef SWP1_CAMERA_ADD_ADVANCED_FUNCTION enum JPEG_QUALITY { JPEG_QUALITY_ECONOMY = 0, JPEG_QUALITY_NORMAL = 50, @@ -279,7 +252,6 @@ public: int m_touch_af_start_stop; -#ifdef SWP1_CAMERA_ADD_ADVANCED_FUNCTION struct gps_info_latiude { unsigned int north_south; unsigned int dgree; @@ -298,10 +270,6 @@ public: unsigned int minute; unsigned int second; } gpsInfoAltitude; -#endif - - -#endif SecCamera(); ~SecCamera(); @@ -321,15 +289,14 @@ public: int startPreview(void); int stopPreview(void); -#ifdef DUAL_PORT_RECORDING + int startRecord(void); int stopRecord(void); int getRecord(void); unsigned int getRecPhyAddrY(int); unsigned int getRecPhyAddrC(int); -#endif + int cancelPicture(void); - int flagPreviewStart(void); int getPreview(void); int setPreviewSize(int width, int height, int pixel_format); int getPreviewSize(int *width, int *height, int *frame_size); @@ -369,7 +336,7 @@ public: int setImageEffect(int image_effect); int getImageEffect(void); -#ifdef SWP1_CAMERA_ADD_ADVANCED_FUNCTION + int setSceneMode(int scene_mode); int getSceneMode(void); @@ -460,7 +427,6 @@ public: #ifdef ENABLE_ESD_PREVIEW_CHECK int getCameraSensorESDStatus(void); #endif // ENABLE_ESD_PREVIEW_CHECK -#endif int setFrameRate(int frame_rate); unsigned char* getJpeg(int*, unsigned int*); @@ -468,22 +434,15 @@ public: unsigned int *output_size); int getExif(unsigned char *pExifDst, unsigned char *pThumbSrc); -#ifdef JPEG_FROM_SENSOR void getPostViewConfig(int*, int*, int*); -#endif void getThumbnailConfig(int *width, int *height, int *size); -#ifdef DIRECT_DELIVERY_OF_POSTVIEW_DATA int getPostViewOffset(void); -#endif int getCameraFd(void); int getJpegFd(void); void SetJpgAddr(unsigned char *addr); unsigned int getPhyAddrY(int); unsigned int getPhyAddrC(int); -#ifdef SEND_YUV_RECORD_DATA - void getYUVBuffers(unsigned char **virYAddr, unsigned char **virCaddr, int index); -#endif void pausePreview(); int initCamera(int index); void DeinitCamera(); @@ -532,12 +491,11 @@ private: int m_cam_fd_temp; int m_cam_fd2_temp; -#ifdef DUAL_PORT_RECORDING + int m_cam_fd2; struct pollfd m_events_c2; int m_flag_record_start; struct fimc_buffer m_buffers_c2[MAX_BUFFERS]; -#endif int m_preview_v4lformat; int m_preview_width; @@ -552,10 +510,6 @@ private: int m_snapshot_max_height; int m_angle; -#ifndef SWP1_CAMERA_ADD_ADVANCED_FUNCTION - int m_autofocus; -#endif -#ifdef SWP1_CAMERA_ADD_ADVANCED_FUNCTION int m_anti_banding; int m_wdr; int m_anti_shake; @@ -583,7 +537,6 @@ private: int m_caf_on_off; int m_default_imei; int m_camera_af_flag; -#endif int m_flag_camera_start; |