• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * @file native_averrors.h
18  *
19  * @brief Provides audio and video error description.
20  *
21  * @kit AVCodecKit
22  * @library libnative_media_core.so
23  * @syscap SystemCapability.Multimedia.Media.Core
24  * @since 9
25  */
26 
27 #ifndef NATIVE_AVERRORS_H
28 #define NATIVE_AVERRORS_H
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /**
35  * @brief AV error code
36  * @syscap SystemCapability.Multimedia.Media.Core
37  * @since 9
38  * @version 1.0
39  */
40 typedef enum OH_AVErrCode {
41     /**
42      * @error the operation completed successfully.
43      */
44     AV_ERR_OK = 0,
45     /**
46      * @error no memory.
47      */
48     AV_ERR_NO_MEMORY = 1,
49     /**
50      * @error opertation not be permitted.
51      */
52     AV_ERR_OPERATE_NOT_PERMIT = 2,
53     /**
54      * @error invalid argument.
55      */
56     AV_ERR_INVALID_VAL = 3,
57     /**
58      * @error IO error.
59      */
60     AV_ERR_IO = 4,
61     /**
62      * @error network timeout.
63      */
64     AV_ERR_TIMEOUT = 5,
65     /**
66      * @error unknown error.
67      */
68     AV_ERR_UNKNOWN = 6,
69     /**
70      * @error media service died.
71      */
72     AV_ERR_SERVICE_DIED = 7,
73     /**
74      * @error the state is not support this operation.
75      */
76     AV_ERR_INVALID_STATE = 8,
77     /**
78      * @error unsupport interface.
79      */
80     AV_ERR_UNSUPPORT = 9,
81     /**
82      * @error input data error.
83      * @since 12
84      */
85     AV_ERR_INPUT_DATA_ERROR = 10,
86     /**
87      * @error extend err start.
88      */
89     AV_ERR_EXTEND_START = 100,
90     /** drm error base.
91      * @since 12
92      */
93     AV_ERR_DRM_BASE = 200,
94     /** drm decypt failed.
95      * @since 12
96      */
97     AV_ERR_DRM_DECRYPT_FAILED = 201,
98     /**
99      * @error video error base.
100      * @since 12
101      */
102     AV_ERR_VIDEO_BASE = 300,
103     /**
104      * @error video unsupported color space conversion.
105      * @since 12
106      */
107     AV_ERR_VIDEO_UNSUPPORTED_COLOR_SPACE_CONVERSION = 301,
108 } OH_AVErrCode;
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 
114 #endif // NATIVE_AVERRORS_H
115