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#ifndef NATIVE_AVERRORS_H
16#define NATIVE_AVERRORS_H
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22/**
23 * @brief AV error code
24 * @syscap SystemCapability.Multimedia.Media.Core
25 * @since 9
26 * @version 1.0
27 */
28typedef enum OH_AVErrCode {
29    /**
30     * the operation completed successfully.
31     */
32    AV_ERR_OK = 0,
33    /**
34     * no memory.
35     */
36    AV_ERR_NO_MEMORY = 1,
37    /**
38     * opertation not be permitted.
39     */
40    AV_ERR_OPERATE_NOT_PERMIT = 2,
41    /**
42     * invalid argument.
43     */
44    AV_ERR_INVALID_VAL = 3,
45    /**
46     * IO error.
47     */
48    AV_ERR_IO = 4,
49    /**
50     * network timeout.
51     */
52    AV_ERR_TIMEOUT = 5,
53    /**
54     * unknown error.
55     */
56    AV_ERR_UNKNOWN = 6,
57    /**
58     * media service died.
59     */
60    AV_ERR_SERVICE_DIED = 7,
61    /**
62     * the state is not support this operation.
63     */
64    AV_ERR_INVALID_STATE = 8,
65    /**
66     * unsupport interface.
67     */
68    AV_ERR_UNSUPPORT = 9,
69    /**
70     * @error input data error.
71     * @since 12
72     */
73    AV_ERR_INPUT_DATA_ERROR = 10,
74    /**
75     * extend err start.
76     */
77    AV_ERR_EXTEND_START = 100,
78    /**drm error base.
79     * @since 12
80     */
81    AV_ERR_DRM_BASE = 200,
82    /** drm decypt failed.
83     * @since 12
84     */
85    AV_ERR_DRM_DECRYPT_FAILED = 201,
86    /**
87     * @error video error base.
88     * @since 12
89     */
90    AV_ERR_VIDEO_BASE = 300,
91    /**
92     * @error video unsupported color space conversion.
93     * @since 12
94     */
95    AV_ERR_VIDEO_UNSUPPORTED_COLOR_SPACE_CONVERSION = 301,
96} OH_AVErrCode;
97
98#ifdef __cplusplus
99}
100#endif
101
102#endif // NATIVE_AVERRORS_H
103