1 #ifndef SHOOTING_H
2 #define SHOOTING_H
3
4
5
6
7
8
9
10
11 extern void shooting_init();
12
13
14
15 #define SET_NOW 1
16 #define SET_LATER 0
17
18
19
20 typedef struct {
21 short id;
22 short prop_id;
23 char *name;
24 short shutter_dfs_value;
25 } ISOTable;
26
27 typedef struct {
28 short id;
29 short prop_id;
30 char *name;
31 long usec;
32 } ShutterSpeed;
33
34 typedef struct {
35 short id;
36 short prop_id;
37 char *name;
38 } ApertureSize;
39
40 typedef struct {
41 int subj_dist;
42 int dsubj_dist;
43 int subj_dist_step;
44 short av96;
45 short dav96;
46 short av96_step;
47 short tv96;
48 short dtv96;
49 short tv96_step;
50 short sv96;
51 short dsv96;
52 short sv96_step;
53 short iso;
54 short diso;
55 short iso_step;
56 short shoot_counter;
57 } EXPO_BRACKETING_VALUES;
58
59
60
61 extern int shooting_in_progress();
62 extern int shooting_is_flash();
63 extern int shooting_is_flash_ready();
64 extern short shooting_get_flash_mode();
65
66
67
68
69
70 #define SHOOTING_TV96_INVALID -10000
71
72 extern int shooting_get_user_tv_id();
73 extern short shooting_get_tv96();
74 extern short shooting_get_tv96_from_shutter_speed(float t);
75 extern void shooting_set_tv96(short tv96, short is_now);
76 extern void shooting_set_tv96_direct(short tv96, short is_now);
77 extern short shooting_get_user_tv96();
78 extern void shooting_set_user_tv96(short tv96);
79 extern float shooting_get_shutter_speed_from_tv96(short tv96);
80 extern void shooting_set_user_tv_by_id(int v);
81 extern void shooting_set_user_tv_by_id_rel(int v);
82
83
84
85 extern short shooting_get_aperture_sizes_table_size();
86 extern int shooting_get_aperture_from_av96(short av96);
87 extern short shooting_get_av96_from_aperture(int aperture);
88 extern int shooting_get_user_av_id();
89 extern void shooting_set_user_av_by_id(int v);
90 extern short shooting_get_av96();
91 extern short shooting_get_min_av96();
92 extern short shooting_get_max_av96();
93 extern void shooting_set_av96(short av96,short is_now);
94 extern void shooting_set_av96_direct(short av96, short is_now);
95 extern short shooting_get_user_av96();
96 extern void shooting_set_user_av96(short av96);
97 extern void shooting_set_user_av_by_id_rel(int v);
98 extern int shooting_get_real_aperture();
99 extern short shooting_get_av96_override_value();
100 extern void shooting_set_nd_filter_state(short v, short is_now);
101 extern short shooting_get_nd_value_ev96(void);
102 extern short shooting_get_nd_current_ev96(void);
103
104
105
106 extern short shooting_get_is_mode();
107 extern short shooting_get_resolution();
108 extern short shooting_get_display_mode();
109 #define SHOOTING_CANON_FMT_JPG 1
110 #define SHOOTING_CANON_FMT_RAW 2
111 extern int shooting_get_canon_image_format();
112 extern int shooting_set_canon_image_format(int fmt);
113
114
115
116 extern int shooting_get_zoom();
117 extern void shooting_set_zoom(int v);
118 extern void shooting_set_zoom_rel(int v);
119 extern void shooting_set_zoom_speed(int v);
120
121
122 int shooting_get_digital_zoom_mode(void);
123
124 int shooting_get_digital_zoom_state(void);
125
126
127
128 extern void shooting_set_focus(int v, short is_now);
129 extern short shooting_get_focus_mode();
130 extern short shooting_get_real_focus_mode();
131 extern short shooting_get_focus_state();
132 extern short shooting_get_focus_ok();
133 extern void shooting_update_dof_values();
134 extern int shooting_get_hyperfocal_distance();
135 extern int shooting_get_hyperfocal_distance_1e3_f(int av, int fl);
136 extern int shooting_get_exif_subject_dist();
137 extern int shooting_get_subject_distance();
138 extern int shooting_get_subject_distance_override_value();
139 extern int shooting_get_lens_to_focal_plane_width();
140 extern short shooting_get_drive_mode();
141 extern short shooting_can_focus();
142 extern short shooting_get_common_focus_mode();
143 extern short shooting_is_infinity_distance();
144 extern void set_focus_bypass(int);
145
146
147
148 extern int shooting_get_iso_mode();
149 extern void shooting_set_iso_mode(int v);
150 extern short shooting_get_sv96_real();
151 extern short shooting_get_sv96_market();
152 extern short shooting_get_iso_market();
153 extern short shooting_get_iso_real();
154 extern void shooting_set_iso_real(short iso, short is_now);
155 extern void shooting_set_sv96(short sv96, short is_now);
156 extern short shooting_get_iso_override_value();
157
158 extern short shooting_iso_market_to_real(short isom);
159 extern short shooting_iso_real_to_market(short isor);
160 extern short shooting_sv96_market_to_real(short isom);
161 extern short shooting_sv96_real_to_market(short isor);
162 extern short shooting_get_sv96_from_iso(short iso);
163 extern short shooting_get_iso_from_sv96(short sv96);
164
165
166
167 extern short shooting_get_canon_overexposure_value();
168 extern short shooting_get_bv96();
169 extern int shooting_get_luminance();
170
171 extern short shooting_get_ev_correction1();
172 extern short shooting_get_ev_correction2();
173
174
175
176 extern void shooting_expo_param_override();
177 extern void shooting_bracketing(void);
178
179
180
181 extern void DoAELock(void);
182 extern void UnlockAE(void);
183
184 extern int EngDrvRead(int gpio_reg);
185
186 extern void PutInNdFilter();
187 extern void PutOutNdFilter();
188 extern long shooting_get_current_av96();
189 extern long shooting_get_current_tv96();
190 extern long shooting_get_current_delta_sv96();
191 extern long shooting_get_current_base_sv96();
192 extern long IsStrobeChargeCompleted();
193 extern void SetCurrentCaptureModeType();
194 extern int shooting_get_imager_active();
195 extern int shooting_get_analog_video_standard(void);
196 extern int get_ev_video_avail(void);
197 extern void set_ev_video_avail(int);
198 extern int get_ev_video(void);
199 extern void set_ev_video(int);
200
201
202
203
204
205 extern int shooting_mode_canon2chdk(int canonmode);
206
207 extern int shooting_mode_chdk2canon(int hackmode);
208
209 extern int shooting_set_mode_chdk(int mode);
210
211 extern int shooting_set_mode_canon(int mode);
212
213
214 void shooting_set_playrec_mode(int mode);
215
216
217
218 #define INFINITY_DIST 0xFFFFFFFF
219
220 int get_focal_length(int zp);
221 int get_effective_focal_length(int zp);
222 int get_zoom_x(int zp);
223
224
225
226
227
228 #define VIDEO_RECORD_NEVER_STARTED 0
229 #define VIDEO_RECORD_STOPPED 1
230 #define VIDEO_RECORD_IN_PROGRESS 4
231 #define VIDEO_RECORD_STOPPING 5
232
233
234 #define ZOOM_OPTICAL_MIN 1
235 #define ZOOM_OPTICAL_MAX 2
236 #define ZOOM_OPTICAL_MEDIUM 3
237
238
239
240
241
242
243
244
245
246
247
248 extern int is_video_recording();
249
250 extern void set_movie_status(int status);
251
252 extern int get_movie_status();
253
254
255 extern void change_video_tables(int a, int b);
256 extern void shooting_video_bitrate_change(int v);
257
258
259 void shooting_video_minbitrate_change(int);
260 unsigned int shooting_get_video_recorded_size_kb();
261 extern void change_video_minbitrate(int, int);
262 extern unsigned int get_video_recorded_size_kb();
263
264 extern int zoom_status;
265 extern const int zoom_points;
266 extern int recreview_hold;
267
268
269
270 #endif
271