• 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 #ifndef INTERFACES_INNER_API_ALGORITHM_ALGORITHM_ERRORS_H
17 #define INTERFACES_INNER_API_ALGORITHM_ALGORITHM_ERRORS_H
18 
19 #include <map>
20 #include <string>
21 #include "errors.h"
22 
23 namespace OHOS {
24 namespace Media {
25 namespace VideoProcessingEngine {
26 // bit 28~21 is subsys, bit 20~16 is Module. bit 15~0 is code
27 constexpr ErrCode VPE_ALGO_MODULE = 11;
28 constexpr ErrCode VPE_ALGO_ERR_OFFSET = ErrCodeOffset(SUBSYS_MULTIMEDIA, VPE_ALGO_MODULE);
29 typedef enum VPEAlgoErrCode : ErrCode {
30     VPE_ALGO_ERR_OK = ERR_OK,
31     VPE_ALGO_ERR_NO_MEMORY = VPE_ALGO_ERR_OFFSET + ENOMEM,         // no memory
32     VPE_ALGO_ERR_INVALID_OPERATION = VPE_ALGO_ERR_OFFSET + ENOSYS, // opertation not be permitted
33     VPE_ALGO_ERR_INVALID_VAL = VPE_ALGO_ERR_OFFSET + EINVAL,       // invalid argument
34     VPE_ALGO_ERR_UNKNOWN = VPE_ALGO_ERR_OFFSET + 0x200,            // unkown error.
35     VPE_ALGO_ERR_INIT_FAILED,                                      // video processing engine init failed
36     VPE_ALGO_ERR_EXTENSION_NOT_FOUND,                              // extension not found
37     VPE_ALGO_ERR_EXTENSION_INIT_FAILED,                            // extension init failed
38     VPE_ALGO_ERR_EXTENSION_PROCESS_FAILED,                         // extension process failed
39     VPE_ALGO_ERR_NOT_IMPLEMENTED,                                  // extension is not implemented
40     VPE_ALGO_ERR_OPERATION_NOT_SUPPORTED,                          // not supported operation
41     VPE_ALGO_ERR_INVALID_STATE,                                    // the state no support this operation
42     VPE_ALGO_ERR_INVALID_PARAM,                                    // invalid parameter.
43 
44     VPE_ALGO_ERR_EXTEND_START = VPE_ALGO_ERR_OFFSET + 0xF000, // extend err start.
45 } VPEAlgoErrCode;
46 } // namespace VideoProcessingEngine
47 } // namespace Media
48 } // namespace OHOS
49 #endif // INTERFACES_INNER_API_ALGORITHM_ALGORITHM_ERRORS_H
50