• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2012 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 HW_EMULATOR_CAMERA_EMULATED_FAKE_CAMERA2_H
18 #define HW_EMULATOR_CAMERA_EMULATED_FAKE_CAMERA2_H
19 
20 /*
21  * Contains declaration of a class EmulatedFakeCamera2 that encapsulates
22  * functionality of a fake camera that implements version 2 of the camera device
23  * interface.
24  */
25 
26 #include "EmulatedCamera2.h"
27 
28 namespace android {
29 
30 /* Encapsulates functionality of an advanced fake camera.  This camera contains
31  * a simple simulation of a scene, sensor, and image processing pipeline.
32  */
33 class EmulatedFakeCamera2 : public EmulatedCamera2 {
34 public:
35     /* Constructs EmulatedFakeCamera instance. */
36     EmulatedFakeCamera2(int cameraId, bool facingBack, struct hw_module_t* module);
37 
38     /* Destructs EmulatedFakeCamera instance. */
39     ~EmulatedFakeCamera2();
40 
41     /****************************************************************************
42      * EmulatedCamera2 virtual overrides.
43      ***************************************************************************/
44 
45 public:
46     /* Initializes EmulatedFakeCamera2 instance. */
47      status_t Initialize();
48 
49     /****************************************************************************
50      * EmulatedCamera abstract API implementation.
51      ***************************************************************************/
52 
53 protected:
54 
55     /****************************************************************************
56      * Data memebers.
57      ***************************************************************************/
58 
59 protected:
60     /* Facing back (true) or front (false) switch. */
61     bool                        mFacingBack;
62 
63 };
64 
65 }; /* namespace android */
66 
67 #endif  /* HW_EMULATOR_CAMERA_EMULATED_FAKE_CAMERA2_H */
68