• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2025 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/**
17 * @brief get the lpplayer supported capabilities.
18
19 * @since 6.0
20 * @version 1.0
21 */
22
23/**
24 * @addtogroup LowPowerPlayer
25 * @{
26 *
27 * @ @brief Provides unified APIs for media services to access low power player drivers.
28 *
29 * The media service can obtain a low power player driver object or proxy, and then invoke the
30 * API provided by the object or proxy, The module provides APIs for initializing the custom data
31 * and audio and video codecs, setting parameters, and controlling and transferring data.
32 *
33 * @since 6.0
34 * @version 1.0
35 */
36
37/**
38 * @brief Defines the path for the package of the LowPowerPlayer module APIs.
39 *
40 * @since 6.0
41 * @version 1.0
42 */
43package ohos.hdi.low_power_player.v1_0;
44
45/**
46 * @brief Enumerates the types of HDR.
47 *
48 * @since 6.0
49 * @version 1.0
50 */
51enum HDRType {
52    HDR10,
53    HDR10Plus,
54    HDRVivid
55};
56
57/**
58 * @brief Defines the Video capabilities.
59 *
60 * @since 6.0
61 * @version 1.0
62 */
63struct VideoMimeCap {
64    String mime;                              /** video/avc, video/hevc */
65    unsigned int minWidth;
66    unsigned int minHeight;
67    unsigned int maxWidth;
68    unsigned int maxHeight;
69    HDRType[] supportHDRTypes;                /** HDR10, HDR10+, HDRVivid */
70    unsigned int maxPixelPerSecond;
71    unsigned int maxInstance;
72    boolean isSupportDRM;
73};
74
75/**
76 * @brief Defines the Audio capabilities.
77 *
78 * @since 6.0
79 * @version 1.0
80 */
81struct AudioMimeCap {
82    String mime;                              /** AAC, Flac, Vorbis, MPEG, G711mu, AMR(amrnb, amrwb), APE */
83    unsigned int sampleRate;
84    unsigned int channelCount;
85};
86
87/**
88 * @brief Defines the LowPowerPlayer capabilities.
89 *
90 * @since 6.0
91 * @version 1.0
92 */
93struct LppAVCap {
94    unsigned int maxInstance;
95    struct VideoMimeCap[] videoCap;           /** videoCap */
96    struct AudioMimeCap[] audioCap;           /** audioCap */
97};