1 /* 2 * Copyright (c) 2024 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 IPC_OFFLINE_STREAM_PROXY_H 17 #define IPC_OFFLINE_STREAM_PROXY_H 18 19 #include "message_parcel.h" 20 21 #include "ipc_offline_stream.h" 22 23 namespace OHOS { 24 namespace AudioStandard { 25 class IpcOfflineStreamProxy : public IRemoteProxy<IpcOfflineStream> { 26 public: 27 explicit IpcOfflineStreamProxy(const sptr<IRemoteObject> &impl); 28 virtual ~IpcOfflineStreamProxy(); 29 30 // override for IpcOfflineStream 31 #ifdef FEATURE_OFFLINE_EFFECT 32 int32_t CreateOfflineEffectChain(const std::string &chainName) override; 33 34 int32_t ConfigureOfflineEffectChain(const AudioStreamInfo &inInfo, 35 const AudioStreamInfo &outInfo) override; 36 37 int32_t PrepareOfflineEffectChain(std::shared_ptr<AudioSharedMemory> &inBuffer, 38 std::shared_ptr<AudioSharedMemory> &outBuffer) override; 39 40 int32_t ProcessOfflineEffectChain(uint32_t inSize, uint32_t outSize) override; 41 42 void ReleaseOfflineEffectChain() override; 43 #endif 44 private: 45 static inline BrokerDelegator<IpcOfflineStreamProxy> delegator_; 46 }; 47 } // namespace AudioStandard 48 } // namespace OHOS 49 #endif // IPC_OFFLINE_STREAM_PROXY_H 50