• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 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 HDI_CODEC_CAPABILITY_PARSER_H
17 #define HDI_CODEC_CAPABILITY_PARSER_H
18 
19 #include "codec_config_parser.h"
20 
21 #define CODEC_CONFIG_KEY_INPUT_BUFFER_COUNT  "inputBufferCount"
22 #define CODEC_CONFIG_KEY_INPUT_BUFFER_SIZE   "inputBufferSize"
23 #define CODEC_CONFIG_KEY_OUTPUT_BUFFER_COUNT "outputBufferCount"
24 #define CODEC_CONFIG_KEY_OUTPUT_BUFFER_SIZE  "outputBufferSize"
25 
26 typedef struct {
27     CodecType type;
28     char compName[NAME_LENGTH];
29     int32_t inputBufferCount;
30     uint32_t inputBufferSize;
31     int32_t outputBufferCount;
32     uint32_t outputBufferSize;
33 } CodecExInfo;
34 
35 typedef struct {
36     int32_t num;
37     CodecExInfo *exInfo;
38 } CodecExInfoGroup;
39 
40 typedef struct {
41     CodecExInfoGroup videoHwEncoderGroup;
42     CodecExInfoGroup videoHwDecoderGroup;
43     CodecExInfoGroup videoSwEncoderGroup;
44     CodecExInfoGroup videoSwDecoderGroup;
45     CodecExInfoGroup audioHwEncoderGroup;
46     CodecExInfoGroup audioHwDecoderGroup;
47     CodecExInfoGroup audioSwEncoderGroup;
48     CodecExInfoGroup audioSwDecoderGroup;
49     bool inited;
50 } CodecExInfoGroups;
51 
52 int32_t LoadCodecExInfoFromHcs(const struct DeviceResourceNode *node, CodecExInfoGroups *caps);
53 int32_t ClearExInfoGroup(CodecExInfoGroups *caps);
54 
55 #endif  // HDI_CODEC_CAPABILITY_PARSER_H
56