webOS Userland
Native system APIs for webOS
resource_calculator_c.h
1
/*
2
* Copyright (c) 2008-2018 LG Electronics, Inc.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
10
11
12
* Unless required by applicable law or agreed to in writing, software
13
* distributed under the License is distributed on an "AS IS" BASIS,
14
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
* See the License for the specific language governing permissions and
16
* limitations under the License.
17
18
* SPDX-License-Identifier: Apache-2.0
19
*/
20
21
#ifndef RESOURCE_CALCULATOR_C_H_
22
#define RESOURCE_CALCULATOR_C_H_
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
28
enum
MRCVideoCodec {
29
kVideoEtc = (1 << 0),
30
kVideoH264 = (1 << 1),
31
kVideoH265 = (1 << 2),
32
kVideoMPEG = (1 << 3),
// MPEG1/2
33
kVideoMVC = (1 << 4),
34
kVideoSVC = (1 << 5),
35
kVideoVP9 = (1 << 6),
36
kVideoRM = (1 << 7),
37
kVideoAVS = (1 << 8),
38
kVideoVP8 = (1 << 9),
39
kVideoMJPEG = (1 << 10),
40
kVideoMPEG4 = (1 << 11),
41
kVideoJPEG = (1 << 12),
42
};
43
44
enum
MRCScanType {
45
kScanProgressive,
46
kScanInterlaced,
47
};
48
49
enum
MRC3DType {
50
k3DNone,
51
k3DSequential,
52
k3DMultiStream,
53
};
54
55
enum
MRCAudioCodec {
56
kAudioEtc = (1 << 0),
57
kAudioMPEG = (1 << 1),
58
kAudioPCM = (1 << 2),
59
kAudioDTS = (1 << 3),
60
kAudioDTSE = (1 << 4),
61
kAudioMPEGH = (1 << 5),
62
kAudioAC4 = (1 << 6),
63
kAudioATMOS = (1 << 7),
64
kAudioDescription = (1 << 8),
65
};
66
67
typedef
struct
MRCResource
{
68
char
*type;
69
int
quantity;
70
}
MRCResource
;
71
72
// null-terminated array of MRCResource pointer
73
typedef
MRCResource
**
MRCResourceList
;
74
typedef
MRCResourceList
*
MRCResourceListOptions
;
75
76
// codecs are combination of bitmasks defined in enum MRCVideoCodec.
77
// Zero width or height is considered as 4K resolution.
78
// Zero frameRate is considered as max frameRate for each codec.
79
MRCResourceList
MRCCalcVdecResources(
int
codecs,
80
int
width,
81
int
height,
82
int
frameRate,
83
enum
MRCScanType scanType,
84
enum
MRC3DType _3dType);
85
86
MRCResourceListOptions
MRCCalcVdecResourceOptions(
int
codecs,
87
int
width,
88
int
height,
89
int
frameRate,
90
enum
MRCScanType scanType,
91
enum
MRC3DType _3dType);
92
93
MRCResourceList
MRCCalcAdecResources(
int
codecs,
94
int
version,
95
int
channel);
96
97
MRCResourceList
MRCCalcMiscResources(
int
useSecureVideoPath,
int
useSecureReformatter);
98
99
void
MRCDeleteResourceList(
MRCResourceList
resourceList);
100
101
#ifdef __cplusplus
102
}
103
#endif
104
105
#endif
// RESOURCE_CALCULATOR_C_H_
MRCResource
Definition:
resource_calculator_c.h:67
include
media-resource-calculator
resource_calculator_c.h
Generated by
1.9.1