1fa7767c5Sopenharmony_ci/*
2fa7767c5Sopenharmony_ci * Copyright (c) 2021-2021 Huawei Device Co., Ltd.
3fa7767c5Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4fa7767c5Sopenharmony_ci * you may not use this file except in compliance with the License.
5fa7767c5Sopenharmony_ci * You may obtain a copy of the License at
6fa7767c5Sopenharmony_ci *
7fa7767c5Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8fa7767c5Sopenharmony_ci *
9fa7767c5Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10fa7767c5Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11fa7767c5Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12fa7767c5Sopenharmony_ci * See the License for the specific language governing permissions and
13fa7767c5Sopenharmony_ci * limitations under the License.
14fa7767c5Sopenharmony_ci */
15fa7767c5Sopenharmony_ci
16fa7767c5Sopenharmony_ci#include "UtAudioSinkTest2.h"
17fa7767c5Sopenharmony_ci
18fa7767c5Sopenharmony_ciusing namespace OHOS::Media::Plugin;
19fa7767c5Sopenharmony_ci
20fa7767c5Sopenharmony_cistatic std::shared_ptr<AudioSinkPlugin> PluginCreator(const std::string &name)
21fa7767c5Sopenharmony_ci{
22fa7767c5Sopenharmony_ci    return std::make_shared<UtAudioSinkTest2>(name);
23fa7767c5Sopenharmony_ci}
24fa7767c5Sopenharmony_ci
25fa7767c5Sopenharmony_cistatic Status AudioSinkRegister(const std::shared_ptr<Register> &reg)
26fa7767c5Sopenharmony_ci{
27fa7767c5Sopenharmony_ci    AudioSinkPluginDef definition;
28fa7767c5Sopenharmony_ci    definition.name = "UtAudioSinkTest2";
29fa7767c5Sopenharmony_ci    definition.description = "unit test audio sink test2";
30fa7767c5Sopenharmony_ci    definition.rank = 100; // 100
31fa7767c5Sopenharmony_ci    definition.creator = PluginCreator;
32fa7767c5Sopenharmony_ci    return reg->AddPlugin(definition);
33fa7767c5Sopenharmony_ci}
34fa7767c5Sopenharmony_ci
35fa7767c5Sopenharmony_ciPLUGIN_DEFINITION(UtAudioSinkTest2, LicenseType::APACHE_V2, AudioSinkRegister, [] {});
36fa7767c5Sopenharmony_ci
37fa7767c5Sopenharmony_ciStatus UtAudioSinkTest2::GetMute(bool &mute)
38fa7767c5Sopenharmony_ci{
39fa7767c5Sopenharmony_ci    return Status::OK;
40fa7767c5Sopenharmony_ci}
41fa7767c5Sopenharmony_ci
42fa7767c5Sopenharmony_ciStatus UtAudioSinkTest2::SetMute(bool mute)
43fa7767c5Sopenharmony_ci{
44fa7767c5Sopenharmony_ci    return Status::OK;
45fa7767c5Sopenharmony_ci}
46fa7767c5Sopenharmony_ci
47fa7767c5Sopenharmony_ciStatus UtAudioSinkTest2::GetVolume(float &volume)
48fa7767c5Sopenharmony_ci{
49fa7767c5Sopenharmony_ci    return Status::OK;
50fa7767c5Sopenharmony_ci}
51fa7767c5Sopenharmony_ci
52fa7767c5Sopenharmony_ciStatus UtAudioSinkTest2::SetVolume(float volume)
53fa7767c5Sopenharmony_ci{
54fa7767c5Sopenharmony_ci    return Status::OK;
55fa7767c5Sopenharmony_ci}
56fa7767c5Sopenharmony_ci
57fa7767c5Sopenharmony_ciStatus UtAudioSinkTest2::GetSpeed(float &speed)
58fa7767c5Sopenharmony_ci{
59fa7767c5Sopenharmony_ci    return Status::OK;
60fa7767c5Sopenharmony_ci}
61fa7767c5Sopenharmony_ci
62fa7767c5Sopenharmony_ciStatus UtAudioSinkTest2::SetSpeed(float speed)
63fa7767c5Sopenharmony_ci{
64fa7767c5Sopenharmony_ci    return Status::OK;
65fa7767c5Sopenharmony_ci}
66fa7767c5Sopenharmony_ci
67fa7767c5Sopenharmony_ciStatus UtAudioSinkTest2::Pause()
68fa7767c5Sopenharmony_ci{
69fa7767c5Sopenharmony_ci    return Status::OK;
70fa7767c5Sopenharmony_ci}
71fa7767c5Sopenharmony_ci
72fa7767c5Sopenharmony_ciStatus UtAudioSinkTest2::Resume()
73fa7767c5Sopenharmony_ci{
74fa7767c5Sopenharmony_ci    return Status::OK;
75fa7767c5Sopenharmony_ci}
76fa7767c5Sopenharmony_ci
77fa7767c5Sopenharmony_ciStatus UtAudioSinkTest2::GetLatency(uint64_t &ms)
78fa7767c5Sopenharmony_ci{
79fa7767c5Sopenharmony_ci    return Status::OK;
80fa7767c5Sopenharmony_ci}
81fa7767c5Sopenharmony_ci
82fa7767c5Sopenharmony_ciStatus UtAudioSinkTest2::GetFrameSize(size_t &size)
83fa7767c5Sopenharmony_ci{
84fa7767c5Sopenharmony_ci    return Status::OK;
85fa7767c5Sopenharmony_ci}
86fa7767c5Sopenharmony_ci
87fa7767c5Sopenharmony_ciStatus UtAudioSinkTest2::GetFrameCount(uint32_t &count)
88fa7767c5Sopenharmony_ci{
89fa7767c5Sopenharmony_ci    return Status::OK;
90fa7767c5Sopenharmony_ci}
91fa7767c5Sopenharmony_ci
92fa7767c5Sopenharmony_ciStatus UtAudioSinkTest2::Write(const std::shared_ptr<Buffer> &input)
93fa7767c5Sopenharmony_ci{
94fa7767c5Sopenharmony_ci    return Status::OK;
95fa7767c5Sopenharmony_ci}
96fa7767c5Sopenharmony_ci
97fa7767c5Sopenharmony_ciStatus UtAudioSinkTest2::Flush()
98fa7767c5Sopenharmony_ci{
99fa7767c5Sopenharmony_ci    return Status::OK;
100fa7767c5Sopenharmony_ci}
101fa7767c5Sopenharmony_ci
102fa7767c5Sopenharmony_ciStatus UtAudioSinkTest2::Drain()
103fa7767c5Sopenharmony_ci{
104fa7767c5Sopenharmony_ci    return Status::OK;
105fa7767c5Sopenharmony_ci}
106fa7767c5Sopenharmony_ci
107fa7767c5Sopenharmony_cistd::shared_ptr<Allocator> UtAudioSinkTest2::GetAllocator()
108fa7767c5Sopenharmony_ci{
109fa7767c5Sopenharmony_ci    return std::shared_ptr<Allocator>();
110fa7767c5Sopenharmony_ci}
111fa7767c5Sopenharmony_ci
112fa7767c5Sopenharmony_ciStatus UtAudioSinkTest2::SetCallback(Callback* cb)
113fa7767c5Sopenharmony_ci{
114fa7767c5Sopenharmony_ci    return Status::OK;
115fa7767c5Sopenharmony_ci}
116