blob: 9d6a9c0d58d2f50be6ebe1aa0563dcef27c566c6 [file] [log] [blame]
Alex Ray61f7a0c2013-07-03 17:54:19 -07001/*
2 * Copyright (C) 2013 The Android Open Source Project
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 EXAMPLE_CAMERA_H_
18#define EXAMPLE_CAMERA_H_
19
20#include <system/camera_metadata.h>
21#include "Camera.h"
22
23namespace default_camera_hal {
24// ExampleCamera is an example for a specific camera device. The Camera object
25// contains all logic common between all cameras (e.g. front and back cameras),
26// while a specific camera device (e.g. ExampleCamera) holds all specific
27// metadata and logic about that device.
28class ExampleCamera : public Camera {
29 public:
30 ExampleCamera(int id);
31 ~ExampleCamera();
32
33 private:
34 // Initialize static camera characteristics for individual device
35 camera_metadata_t *initStaticInfo();
36 // Initialize whole device (templates/etc) when opened
37 int initDevice();
38 // Verify settings are valid for a capture with this device
39 bool isValidCaptureSettings(const camera_metadata_t* settings);
40};
41} // namespace default_camera_hal
42
43#endif // CAMERA_H_