Iliyan Malchev | 6d01645 | 2013-03-27 16:27:56 -0700 | [diff] [blame] | 1 | /* |
| 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_QCAMERAHWI_DISPLAY_H |
| 18 | #define ANDROID_HARDWARE_QCAMERAHWI_DISPLAY_H |
| 19 | |
| 20 | |
| 21 | #include <utils/threads.h> |
| 22 | |
| 23 | #include <binder/MemoryBase.h> |
| 24 | #include <binder/MemoryHeapBase.h> |
| 25 | #include <utils/threads.h> |
| 26 | #include "QCamera_Intf.h" |
| 27 | extern "C" { |
| 28 | #include <mm_camera_interface2.h> |
| 29 | } |
| 30 | |
| 31 | namespace android { |
| 32 | |
| 33 | /*=============================== |
| 34 | Base Display Class |
| 35 | ================================*/ |
| 36 | |
| 37 | class QCameraDisplay { |
| 38 | |
| 39 | public: |
| 40 | virtual int Display_prepare_buffers() = 0; |
| 41 | virtual int Display_set_crop( ) = 0; |
| 42 | virtual int Display_set_geometry( ) =0; |
| 43 | virtual void Display_enqueue( ) = 0; |
| 44 | virtual void Display_dequeue( ) = 0; |
| 45 | virtual void Display_release_buffers( ) =0; |
| 46 | virtual ~QCameraDisplay( ); |
| 47 | }; |
| 48 | |
| 49 | /*================================ |
| 50 | Overlay Derivative |
| 51 | ==================================*/ |
| 52 | class QCameraDisplay_Overlay: public QCameraDisplay { |
| 53 | |
| 54 | public: |
| 55 | int Display_prepare_buffers(); |
| 56 | int Display_set_crop( ); |
| 57 | int Display_set_geometry( ); |
| 58 | void Display_enqueue( ); |
| 59 | void Display_dequeue( ); |
| 60 | void Display_release_buffers( ); |
| 61 | virtual ~QCameraDisplay_Overlay( ); |
| 62 | |
| 63 | |
| 64 | }; |
| 65 | |
| 66 | |
| 67 | }; // namespace android |
| 68 | |
| 69 | #endif |