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 #ifndef I_LPP_AUDIO_PLAYER_SERVICE_H 17 #define I_LPP_AUDIO_PLAYER_SERVICE_H 18 19 #include "lpp_audio_streamer.h" 20 #include "refbase.h" 21 #include "lpp_common.h" 22 // client/server 23 24 namespace OHOS { 25 namespace Media { 26 class ILppAudioStreamerService { 27 public: 28 virtual ~ILppAudioStreamerService() = default; 29 30 virtual int32_t Init(const std::string &mime) = 0; 31 32 virtual int32_t SetParameter(const Format ¶m) = 0; 33 34 virtual int32_t Configure(const Format ¶m) = 0; 35 36 virtual int32_t Prepare() = 0; 37 38 virtual int32_t Start() = 0; 39 40 virtual int32_t Pause() = 0; 41 42 virtual int32_t Resume() = 0; 43 44 virtual int32_t Flush() = 0; 45 46 virtual int32_t Stop() = 0; 47 48 virtual int32_t Reset() = 0; 49 50 virtual int32_t Release() = 0; 51 52 virtual int32_t SetVolume(float volume) = 0; 53 54 virtual int32_t SetPlaybackSpeed(float speed) = 0; 55 56 virtual int32_t ReturnFrames(sptr<LppDataPacket> framePacket) = 0; 57 58 virtual int32_t RegisterCallback() = 0; 59 60 virtual int32_t SetLppAudioStreamerCallback(const std::shared_ptr<AudioStreamerCallback> &callback) = 0; 61 62 virtual int32_t SetLppVideoStreamerId(const std::string videoStreamId) = 0; 63 64 virtual std::string GetStreamerId() = 0; 65 }; 66 } // namespace Media 67 } // namespace OHOS 68 #endif // I_LPP_AUDIO_PLAYER_SERVICE_H 69