blob: 4aa988e5ff405805ed8b00d58b5c0933357fdde0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ANDROID_CAMERA_CAMERA_COMMON_H_
#define ANDROID_CAMERA_CAMERA_COMMON_H_
/*
* Contains declarations of platform-independent the stuff that is used in
* camera emulation.
*/
#if defined(_WIN32) || defined(__APPLE__)
/* Include declarations that are missing in non-Linux headers. */
#include "android/camera/camera-win.h"
#endif /* _WIN32 */
/* Describes a connected camera device.
* This is a pratform-independent camera device descriptor that is used in
* the camera API. This descriptor also contains some essential camera
* properties, so the client of this API can use them to properly prepare to
* handle frame capturing.
*/
typedef struct CameraDevice {
/* Opaque pointer used by the camera capturing API. */
void* opaque;
/* Frame's width in number of pixels. */
int width;
/* Frame's height in number of pixels. */
int height;
/* Number of bytes encoding each pixel. */
uint32_t bpp;
/* Number of bytes encoding each line. */
uint32_t bpl;
/* Pixel format of the frame captured from the camera device. */
uint32_t pixel_format;
/* Total size in bytes of the framebuffer. */
size_t framebuffer_size;
} CameraDevice;
#endif /* ANDROID_CAMERA_CAMERA_COMMON_H_ */
|