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/** 17 * @addtogroup LowPowerPlayer 18 * @{ 19 * 20 * @ @brief Provides unified APIs for media services to access low power player drivers. 21 * 22 * The media service can obtain a low power player driver object or proxy, and then invoke the 23 * API provided by the object or proxy, The module provides APIs for initializing the custom data 24 * and audio and video codecs, setting parameters, and controlling and transferring data. 25 * 26 * @since 6.0 27 * @version 1.0 28 */ 29 30package ohos.hdi.low_power_player.v1_0; 31 32import ohos.hdi.low_power_player.v1_0.ILppAudioSinkAdapter; 33import ohos.hdi.low_power_player.v1_0.ILppSyncManagerAdapter; 34import ohos.hdi.low_power_player.v1_0.ILppTypes; 35 36interface ILowPowerPlayerFactory { 37 /** 38 * @brief Creates a low power player audio and video sync manager adapter. 39 * 40 * 41 * 42 * @param syncMgrAdapter Indicates the pointer to the sync manager adapter created. 43 * @param syncMgrId Indicates the ID of the adapter created. 44 * 45 * @return Returns <b>HDF_SUCCESS</b> if the operation is successful. 46 * @return Returns <b>HDF_FAILURE</b> if the execution fails. 47 * 48 * @since 6.0 49 * @version 1.0 50 */ 51 CreateSyncMgr([out] ILppSyncManagerAdapter syncMgrAdapter); 52 53 /** 54 * @brief Creates a low power player audio sink adapter adapter. 55 * 56 * 57 * 58 * @param audioSinkAdapter Indicates the pointer to the audio sink adapter created. 59 * @param audioSinkId Indicates the ID of the adapter created. 60 * 61 * @return Returns <b>HDF_SUCCESS</b> if the operation is successful. 62 * @return Returns <b>HDF_FAILURE</b> if the execution fails. 63 * 64 * @since 6.0 65 * @version 1.0 66 */ 67 CreateAudioSink([out] ILppAudioSinkAdapter audioSinkAdapter); 68 69 /** 70 * @brief Gets the capabilities of lpplayer. 71 * 72 * 73 * 74 * @param cap Indicates the capabilities of lpplayer. 75 * 76 * @return Returns <b>HDF_SUCCESS</b> if the operation is successful. 77 * @return Returns <b>HDF_FAILURE</b> if the execution fails. 78 * 79 * @since 6.0 80 * @version 1.0 81 */ 82 GetAVCapability([out] struct LppAVCap avCap); 83}