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