blob: f37fef5cb7e7ccce29b602f3d4b841db0ede7019 [file] [log] [blame]
Iliyan Malchev6d016452013-03-27 16:27:56 -07001/*
2** Copyright (c) 2011 The Linux Foundation. All rights reserved.
3**
4** Licensed under the Apache License, Version 2.0 (the "License");
5** you may not use this file except in compliance with the License.
6** You may obtain a copy of the License at
7**
8** http://www.apache.org/licenses/LICENSE-2.0
9**
10** Unless required by applicable law or agreed to in writing, software
11** distributed under the License is distributed on an "AS IS" BASIS,
12** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13** See the License for the specific language governing permissions and
14** limitations under the License.
15*/
16
17#ifndef ANDROID_HARDWARE_QUALCOMM_CAMERA_H
18#define ANDROID_HARDWARE_QUALCOMM_CAMERA_H
19
20
21//#include <camera/CameraHardwareInterface.h>
22
23extern "C" {
24#include <hardware/camera.h>
25
26 int get_number_of_cameras();
27 int get_camera_info(int camera_id, struct camera_info *info);
28
29 int camera_device_open(const struct hw_module_t* module, const char* id,
30 struct hw_device_t** device);
31
32 hw_device_t * open_camera_device(int cameraId);
33
34 int close_camera_device( hw_device_t *);
35
36namespace android {
37 int set_preview_window(struct camera_device *,
38 struct preview_stream_ops *window);
39 void set_callbacks(struct camera_device *,
40 camera_notify_callback notify_cb,
41 camera_data_callback data_cb,
42 camera_data_timestamp_callback data_cb_timestamp,
43 camera_request_memory get_memory,
44 void *user);
45
46 void enable_msg_type(struct camera_device *, int32_t msg_type);
47
48 void disable_msg_type(struct camera_device *, int32_t msg_type);
49 int msg_type_enabled(struct camera_device *, int32_t msg_type);
50
51 int start_preview(struct camera_device *);
52
53 void stop_preview(struct camera_device *);
54
55 int preview_enabled(struct camera_device *);
56 int store_meta_data_in_buffers(struct camera_device *, int enable);
57
58 int start_recording(struct camera_device *);
59
60 void stop_recording(struct camera_device *);
61
62 int recording_enabled(struct camera_device *);
63
64 void release_recording_frame(struct camera_device *,
65 const void *opaque);
66
67 int auto_focus(struct camera_device *);
68
69 int cancel_auto_focus(struct camera_device *);
70
71 int take_picture(struct camera_device *);
72
73 int cancel_picture(struct camera_device *);
74
75 int set_parameters(struct camera_device *, const char *parms);
76
77 char* get_parameters(struct camera_device *);
78
79 void put_parameters(struct camera_device *, char *);
80
81 int send_command(struct camera_device *,
82 int32_t cmd, int32_t arg1, int32_t arg2);
83
84 void release(struct camera_device *);
85
86 int dump(struct camera_device *, int fd);
87
88
89
90}; // namespace android
91
92} //extern "C"
93
94#endif
95