comparison src/ui3/mfw/mfw_camapp.h @ 420:e8ddbb0837ed

src/ui3: initial import of TCS3/LoCosto BMI & MFW code
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 21 Jan 2018 03:09:00 +0000
parents
children
comparison
equal deleted inserted replaced
419:59143cd42ec7 420:e8ddbb0837ed
1 /*
2 +--------------------------------------------------------------------+
3 | PROJECT: MMI-Framework (8417) $Workfile:: mfw_camapp.h $|
4 | $Author:: NDH $Revision:: 1 $|
5 | CREATED: 21.05.04 $Modtime:: 21.05.04 14:58 $|
6 | STATE : code |
7 +--------------------------------------------------------------------+
8
9 MODULE : MFW_CAMAPP
10
11 PURPOSE : This module contains the definitions for the Camera Interface.
12 ***********************************************************************************************
13 $History: mfw_camapp.h
14
15 Oct 23 2007. DRT:OMAPS00149238. x0083025 (adrian)
16 Description: The quality is same for the 3 modes (economy, Standard, High)
17 Solution: Data type sent to MM from BMI is different. Changed data type to match.
18
19 April 03 2007 ER:OMAPS00116772 x0061088(Prachi)
20 Description:Support of 1.3 Mpixel camera on Locosto Plus
21
22 Mar 15 2007 DRT OMAPS00120112 x0061088(Prachi)
23 MFW_CAM_BURST_ON is set equal to 4.
24
25 xrashmic 02 Aug 2006, OMAPS00087612
26 Hanlding of MSL errors for the snapshot save failed scenario
27
28 May 17 2006, xdeepadh - LOCOSTO-DRT-OMAPS00077374
29 Description:Saving Images in NAND flash during viewfinder->snapshot.
30 Solution: Based on the compile time flag FF_MMI_RFS_ENABLED, the
31 appropriate file system APIS will be called.
32
33 May 02 2006, xdeepadh - LOCOSTO-DRT-OMAPS00076437
34 Description: MT call not handled in camera Application
35 Solution: The asynch event handling in Camera Application has been handled.
36
37 Jan 10 2006, xdeepadh - LOCOSTO-ENH-
38 Description: Application to test camera
39 Solution: Implemented the camera application with following functionalities
40 preview, snapshot ,configure and image saving.
41 ************************************************************************************************/
42 #include "msl/inc/msl_api.h"
43 typedef enum
44 {
45 QUALITY_ECONOMY=40,
46 QUALITY_STANDARD=55,
47 QUALITY_HIGH=65
48 } T_MFW_CAM_QUALITY;
49
50 //Camera Test Return Values
51 typedef enum
52 {
53 MFW_CAM_OK = 0,
54 MFW_CAM_FAILED =- 1
55 } T_MFW_CAM_STATUS;
56
57 // CAM Mfw -> BMI signal parameter
58
59 typedef enum
60 {
61 MFW_CAM_NO_ROTATE,
62 MFW_CAM_ROTATE_90,
63 MFW_CAM_ROTATE_180,
64 MFW_CAM_ROTATE_270
65 }T_MFW_CAM_ROTATE;
66
67 typedef enum
68 {
69 MFW_CAM_BURST_OFF=1,
70 //Mar 15 2007 DRT OMAPS00120112 x0061088(Prachi)
71 MFW_CAM_BURST_ON =4
72 }T_MFW_CAM_BUSTMODE;
73
74 /*Defines for Zoom -------------------------------------*/
75
76 #define MFW_CAM_ZOOM_LOW 1024
77 #define MFW_CAM_ZOOM_MAX (8 * MFW_CAM_ZOOM_LOW)
78 #define MFW_CAM_ZOOM_NONE 1024
79
80 #define VGA_WIDTH 640
81 #define VGA_HEIGHT 480
82 #define QCIF_WIDTH 176
83 #define QCIF_HEIGHT 144
84 //add by prachi
85 #if CAM_SENSOR == 1
86 #define SXGA_WIDTH 1280
87 #define SXGA_HEIGHT 1024
88 #endif
89
90 #define CAM_FILENAME_EDITOR_INPUT_LEN 45
91
92 // May 17 2006, xdeepadh - LOCOSTO-DRT-OMAPS00077374
93 #ifdef FF_MMI_RFS_ENABLED
94 #define JPEG_CONTENT_DIR "/INANDA1"
95 #else
96 #define JPEG_CONTENT_DIR "/jpeg"
97 #endif //FF_MMI_RFS_ENABLED
98
99 #define E_CAM_INIT (T_MFW_EVENT)0x00000001
100 #define E_CAM_VIEWFINDER (T_MFW_EVENT)0x00000002
101 #define E_CAM_SNAPSHOT (T_MFW_EVENT)0x00000004
102 #define E_CAM_PAUSE (T_MFW_EVENT)0x00000008
103 #define E_CAM_DEINIT (T_MFW_EVENT)0x00000010
104 /* April 03 2007 ER:OMAPS00116772 x0061088(Prachi) */
105 #define E_CAM_PREVIEW (T_MFW_EVENT)0x00000012
106 #define E_CAM_ALL_SERVICES (T_MFW_EVENT)0xFFFFFFFF
107 // CT Control Block
108 typedef enum
109 {
110 CAM_STATE_NONE,
111 CAM_STATE_INIT,
112 CAM_STATE_INIT_DONE,
113 CAM_STATE_VIEWFINDER,
114 CAM_STATE_VIEWFINDER_DONE,
115 CAM_STATE_SNAPSHOT,
116 CAM_STATE_SNAPSHOT_DONE,
117 CAM_STATE_SNAPSHOT_SAVE_ERROR,//xrashmic 02 Aug 2006, OMAPS00087612
118 CAM_STATE_SNAPSHOT_NOSPACE_ERROR, //omaps00151335
119 CAM_STATE_PAUSE,
120 CAM_STATE_PAUSE_DONE,
121 CAM_STATE_DEINIT,
122 CAM_STATE_DEINIT_DONE,
123 CAM_STATE_ERROR,
124 /* April 03 2007 ER:OMAPS00116772 x0061088(Prachi) */
125 CAM_STATE_PREVIEW_DONE
126 }T_MFW_CAM_STATE;
127
128 typedef enum
129 {
130 MFW_CAM_NO_ERROR,
131 MFW_CAM_ERROR,
132 //Mar 09 2007 DRT :OMAPS00118881 x0061088(Prachi)
133 MFW_CAM_ERROR_NO_MEMORY
134 }T_MFW_CAM_ERROR;
135
136
137 typedef enum
138 {
139 CAM_IDLE_MODE,
140 CAM_VIEWFINDER_MODE,
141 CAM_SNAPSHOT_MODE,
142 CAM_CONFIGURE_MODE,
143 // May 02 2006, xdeepadh - LOCOSTO-DRT-OMAPS00076437
144 CAM_VIEWFINDER_ASYNC_MODE,
145 CAM_SNAPSHOT_ASYNC_MODE
146 }T_MFW_CAM_MODE;
147
148 typedef struct
149 {
150 T_MFW_CAM_STATE state;
151 }
152 T_MFW_CAM_PARA;
153
154 typedef struct
155 {
156 T_MFW_EVENT emask; /* events of interest */
157 T_MFW_EVENT event; /* current event */
158 T_MFW_CB handler;
159 T_MFW_CAM_PARA para;
160 } T_MFW_CAM;
161
162
163 /*
164 ** Public function Definitions
165 */
166
167 T_MFW_HND mfw_cam_create(T_MFW_HND hWin, T_MFW_EVENT event, T_MFW_CB cbfunc);
168 T_MFW_RES mfw_cam_delete(T_MFW_HND hnd);
169 T_MFW_CAM_ERROR mfw_msl_cam_create(void);
170 T_MFW_CAM_ERROR mfw_msl_cam_init(void);
171 T_MFW_CAM_ERROR mfw_cam_setDefaultConfigurations();
172 T_MFW_CAM_ERROR mfw_cam_setSnapshotConfigurations(BOOL frame);//xrashmic 11 Aug 2006, OMAPS00089912
173
174 // Oct 23 2007. DRT:OMAPS00149238. x0083025 (adrian)
175 T_MFW_CAM_ERROR mfw_msl_cam_setQualityConfig(U32 qFactor);
176 T_MFW_CAM_ERROR mfw_msl_cam_setRotateConfig(int tRotate);
177 T_MFW_CAM_ERROR mfw_msl_cam_setBurstModeConfig(UBYTE burstCount);
178 T_MFW_CAM_ERROR mfw_msl_cam_setFileNameConfig();
179 T_MFW_CAM_ERROR mfw_msl_cam_setOverlayConfig(MSL_U8 * overlayBuffer);
180 T_MFW_CAM_ERROR mfw_cam_set_SSOverlayConfig(MSL_U8 * overlayBuffer);
181 T_MFW_CAM_ERROR mfw_msl_cam_setZoomConfig(U32 zoomFactor);
182 void mfw_msl_cam_cb( U32 tCMd,U32 tStatus);
183 T_MFW_CAM_ERROR mfw_msl_cam_exit(void);
184 T_MFW_CAM_ERROR mfw_msl_cam_viewfinder();
185 T_MFW_CAM_ERROR mfw_msl_cam_suspend_camera();
186 T_MFW_CAM_ERROR mfw_msl_cam_snapshot();
187 T_MFW_CAM_ERROR mfw_msl_cam_deinit();
188
189 /* April 03 2007 ER:OMAPS00116772 x0061088(Prachi) */
190 T_MFW_CAM_ERROR mfw_msl_cam_setAutoSave(UBYTE autoSave);
191 T_MFW_CAM_ERROR mfw_msl_cam_save();
192
193 //Feb 19 2007, x0061088(Prachi) LOCOSTO-DRT-OMAPS00112518
194 #ifdef FF_MMI_RELIANCE_FFS
195 void mfw_close_dir();
196 #endif
197
198