1 /* 2 * Copyright (c) 2021-2021 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 #include "UtAudioSinkTest2.h" 17 18 using namespace OHOS::Media::Plugin; 19 PluginCreator(const std::string & name)20static std::shared_ptr<AudioSinkPlugin> PluginCreator(const std::string &name) 21 { 22 return std::make_shared<UtAudioSinkTest2>(name); 23 } 24 AudioSinkRegister(const std::shared_ptr<Register> & reg)25static Status AudioSinkRegister(const std::shared_ptr<Register> ®) 26 { 27 AudioSinkPluginDef definition; 28 definition.name = "UtAudioSinkTest2"; 29 definition.description = "unit test audio sink test2"; 30 definition.rank = 100; // 100 31 definition.creator = PluginCreator; 32 return reg->AddPlugin(definition); 33 } 34 __anone2dc558a0102null35PLUGIN_DEFINITION(UtAudioSinkTest2, LicenseType::APACHE_V2, AudioSinkRegister, [] {}); 36 GetMute(bool & mute)37Status UtAudioSinkTest2::GetMute(bool &mute) 38 { 39 return Status::OK; 40 } 41 SetMute(bool mute)42Status UtAudioSinkTest2::SetMute(bool mute) 43 { 44 return Status::OK; 45 } 46 GetVolume(float & volume)47Status UtAudioSinkTest2::GetVolume(float &volume) 48 { 49 return Status::OK; 50 } 51 SetVolume(float volume)52Status UtAudioSinkTest2::SetVolume(float volume) 53 { 54 return Status::OK; 55 } 56 GetSpeed(float & speed)57Status UtAudioSinkTest2::GetSpeed(float &speed) 58 { 59 return Status::OK; 60 } 61 SetSpeed(float speed)62Status UtAudioSinkTest2::SetSpeed(float speed) 63 { 64 return Status::OK; 65 } 66 Pause()67Status UtAudioSinkTest2::Pause() 68 { 69 return Status::OK; 70 } 71 Resume()72Status UtAudioSinkTest2::Resume() 73 { 74 return Status::OK; 75 } 76 GetLatency(uint64_t & ms)77Status UtAudioSinkTest2::GetLatency(uint64_t &ms) 78 { 79 return Status::OK; 80 } 81 GetFrameSize(size_t & size)82Status UtAudioSinkTest2::GetFrameSize(size_t &size) 83 { 84 return Status::OK; 85 } 86 GetFrameCount(uint32_t & count)87Status UtAudioSinkTest2::GetFrameCount(uint32_t &count) 88 { 89 return Status::OK; 90 } 91 Write(const std::shared_ptr<Buffer> & input)92Status UtAudioSinkTest2::Write(const std::shared_ptr<Buffer> &input) 93 { 94 return Status::OK; 95 } 96 Flush()97Status UtAudioSinkTest2::Flush() 98 { 99 return Status::OK; 100 } 101 Drain()102Status UtAudioSinkTest2::Drain() 103 { 104 return Status::OK; 105 } 106 GetAllocator()107std::shared_ptr<Allocator> UtAudioSinkTest2::GetAllocator() 108 { 109 return std::shared_ptr<Allocator>(); 110 } 111 SetCallback(Callback * cb)112Status UtAudioSinkTest2::SetCallback(Callback* cb) 113 { 114 return Status::OK; 115 } 116