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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
/*
* camerasrc
*
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
*
* Contact: Jeongmo Yang <jm80.yang@samsung.com>
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef __CAMERASRC_ERROR_H__
#define __CAMERASRC_ERROR_H__
#ifdef __cplusplus
extern "C" {
#endif
/**
* CAMSRC CLASS
*/
#define CAMERASRC_SUCCESS (0x00000000) /**< No Error */
#define CAMERASRC_ERROR (0x80000000) /**< Error Class */
#define CAMERASRC_WARING (0x70000000) /**< Waring Class */
/*
* Detail enumeration
*/
enum {
CAMSRC_IN_UNKNOWN = 0,
CAMSRC_IN_PARAMETER,
CAMSRC_IN_HANDLE,
CAMSRC_IN_POINTER,
CAMSRC_IN_VALUE,
CAMSRC_IN_OVERRUN,
CAMSRC_IN_UNDERRUN,
CAMSRC_IN_RANGE_OVER,
CAMSRC_IN_RANGE_UNDER,
CAMSRC_IN_MODE,
CAMSRC_IN_FORMAT,
CAMSRC_IN_CHANNEL,
CAMSRC_IN_SAMPLERATE,
CAMSRC_IN_LAYER,
CAMSRC_IN_ROTATE,
CAMSRC_IN_ALLOC,
CAMSRC_IN_INTERNAL,
/*Extra state for camera*/
CAMSRC_IN_IO_CONTROL,
CAMSRC_IN_DEVICE_OPEN,
CAMSRC_IN_DEVICE_BUSY,
CAMSRC_IN_DEVICE_NOT_FOUND,
CAMSRC_IN_DEVICE_REGISTER_TROUBLE,
CAMSRC_IN_WAIT_RES,
CAMSRC_IN_SUPPORT,
CAMSRC_IN_STATE,
CAMSRC_IN_PRIVILEGE,
CAMSRC_IN_SECURITY_SERVICE,
};
/*
* CAMERASRC_WARNING
*/
#define CAMERASRC_WAR_INVALID_PARAMETER (CAMERASRC_WARING | CAMSRC_IN_PARAMETER)
#define CAMERASRC_WAR_INVALID_HANDLE (CAMERASRC_WARING | CAMSRC_IN_HANDLE)
#define CAMERASRC_WAR_INVALID_VALUE (CAMERASRC_WARING | CAMSRC_IN_VALUE)
#define CAMERASRC_WAR_INVALID_MODE (CAMERASRC_WARING | CAMSRC_IN_MODE)
#define CAMERASRC_WAR_INVALID_FORMAT (CAMERASRC_WARING | CAMSRC_IN_FORMAT)
#define CAMERASRC_WAR_INVALID_CHANNEL (CAMERASRC_WARING | CAMSRC_IN_CHANNEL)
#define CAMERASRC_WAR_INVALID_SAMPLERATE (CAMERASRC_WARING | CAMSRC_IN_SAMPLERATE)
#define CAMERASRC_WAR_INVALID_LAYER (CAMERASRC_WARING | CAMSRC_IN_LAYER)
#define CAMERASRC_WAR_INVALID_ROTATE (CAMERASRC_WARING | CAMSRC_IN_ROTATE)
#define CAMERASRC_WAR_NULL_POINTER (CAMERASRC_WARING | CAMSRC_IN_POINTER)
#define CAMERASRC_WAR_UNDERRUN (CAMERASRC_WARING | CAMSRC_IN_UNDERRUN)
#define CAMERASRC_WAR_OVERRUN (CAMERASRC_WARING | CAMSRC_IN_OVERRUN)
#define CAMERASRC_WAR_RANGE_OVER (CAMERASRC_WARING | CAMSRC_IN_RANGE_OVER)
#define CAMERASRC_WAR_RANGE_UNDER (CAMERASRC_WARING | CAMSRC_IN_RANGE_UNDER)
#define CAMERASRC_WAR_ALLOCATION (CAMERASRC_WARING | CAMSRC_IN_ALLOC)
#define CAMERASRC_WAR_INTERNAL (CAMERASRC_WARING | CAMSRC_IN_INTERNAL)
/*Extra warning for camera*/
#define CAMERASRC_WAR_IO_CONTROL (CAMERASRC_WARING | CAMSRC_IN_IO_CONTROL)
#define CAMERASRC_WAR_DEVICE_OPEN (CAMERASRC_WARING | CAMSRC_IN_DEVICE_OPEN)
#define CAMERASRC_WAR_DEVICE_BUSY (CAMERASRC_WARING | CAMSRC_IN_DEVICE_BUSY)
#define CAMERASRC_WAR_DEVICE_NOT_FOUND (CAMERASRC_WARING | CAMSRC_IN_DEVICE_NOT_FOUND)
#define CAMERASRC_WAR_DEVICE_UNAVAILABLE (CAMERASRC_WARING | CAMSRC_IN_DEVICE_REGISTER_TROUBLE)
#define CAMERASRC_WAR_DEVICE_WAIT_TIMEOUT (CAMERASRC_WARING | CAMSRC_IN_WAIT_RES)
#define CAMERASRC_WAR_DEVICE_NOT_SUPPORT (CAMERASRC_WARING | CAMSRC_IN_SUPPORT)
#define CAMERASRC_WAR_INVALID_STATE_TRANSITION (CAMERASRC_WARING | CAMSRC_IN_STATE)
/**
* CAMERASRC_ERROR
*/
#define CAMERASRC_ERR_INVALID_PARAMETER (CAMERASRC_ERROR | CAMSRC_IN_PARAMETER)
#define CAMERASRC_ERR_INVALID_HANDLE (CAMERASRC_ERROR | CAMSRC_IN_HANDLE)
#define CAMERASRC_ERR_INVALID_VALUE (CAMERASRC_ERROR | CAMSRC_IN_VALUE)
#define CAMERASRC_ERR_INVALID_MODE (CAMERASRC_ERROR | CAMSRC_IN_MODE)
#define CAMERASRC_ERR_INVALID_FORMAT (CAMERASRC_ERROR | CAMSRC_IN_FORMAT)
#define CAMERASRC_ERR_INVALID_CHANNEL (CAMERASRC_ERROR | CAMSRC_IN_CHANNEL)
#define CAMERASRC_ERR_INVALID_SAMPLERATE (CAMERASRC_ERROR | CAMSRC_IN_SAMPLERATE)
#define CAMERASRC_ERR_INVALID_LAYER (CAMERASRC_ERROR | CAMSRC_IN_LAYER)
#define CAMERASRC_ERR_INVALID_ROTATE (CAMERASRC_ERROR | CAMSRC_IN_ROTATE)
#define CAMERASRC_ERR_NULL_POINTER (CAMERASRC_ERROR | CAMSRC_IN_POINTER)
#define CAMERASRC_ERR_UNDERRUN (CAMERASRC_ERROR | CAMSRC_IN_UNDERRUN)
#define CAMERASRC_ERR_OVERRUN (CAMERASRC_ERROR | CAMSRC_IN_OVERRUN)
#define CAMERASRC_ERR_RANGE_OVER (CAMERASRC_ERROR | CAMSRC_IN_RANGE_OVER)
#define CAMERASRC_ERR_RANGE_UNDER (CAMERASRC_ERROR | CAMSRC_IN_RANGE_UNDER)
#define CAMERASRC_ERR_ALLOCATION (CAMERASRC_ERROR | CAMSRC_IN_ALLOC)
#define CAMERASRC_ERR_INTERNAL (CAMERASRC_ERROR | CAMSRC_IN_INTERNAL)
#define CAMERASRC_ERR_UNKNOWN (CAMERASRC_ERROR | CAMSRC_IN_UNKNOWN) /**< unknown error */
/*Extra warning for camera*/
#define CAMERASRC_ERR_IO_CONTROL (CAMERASRC_ERROR | CAMSRC_IN_IO_CONTROL)
#define CAMERASRC_ERR_DEVICE_OPEN (CAMERASRC_ERROR | CAMSRC_IN_DEVICE_OPEN)
#define CAMERASRC_ERR_DEVICE_BUSY (CAMERASRC_ERROR | CAMSRC_IN_DEVICE_BUSY)
#define CAMERASRC_ERR_DEVICE_NOT_FOUND (CAMERASRC_ERROR | CAMSRC_IN_DEVICE_NOT_FOUND)
#define CAMERASRC_ERR_DEVICE_UNAVAILABLE (CAMERASRC_ERROR | CAMSRC_IN_DEVICE_REGISTER_TROUBLE)
#define CAMERASRC_ERR_DEVICE_WAIT_TIMEOUT (CAMERASRC_ERROR | CAMSRC_IN_WAIT_RES)
#define CAMERASRC_ERR_DEVICE_NOT_SUPPORT (CAMERASRC_ERROR | CAMSRC_IN_SUPPORT)
#define CAMERASRC_ERR_INVALID_STATE (CAMERASRC_ERROR | CAMSRC_IN_STATE)
#define CAMERASRC_ERR_PRIVILEGE (CAMERASRC_ERROR | CAMSRC_IN_PRIVILEGE)
#define CAMERASRC_ERR_SECURITY_SERVICE (CAMERASRC_ERROR | CAMSRC_IN_SECURITY_SERVICE)
#define CAMERASRC_IS_FAIL(_A_) (CAMERASRC_ERROR & (_A_))
#ifdef __cplusplus
}
#endif
#endif /* __CAMERASRC_ERROR_H__ */
|