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 "UtCodecTest2.h"
17fa7767c5Sopenharmony_ci
18fa7767c5Sopenharmony_ciusing namespace OHOS::Media::Plugin;
19fa7767c5Sopenharmony_ci
20fa7767c5Sopenharmony_cistatic std::shared_ptr<CodecPlugin> PluginCreator(const std::string &name)
21fa7767c5Sopenharmony_ci{
22fa7767c5Sopenharmony_ci    return std::make_shared<UtCodecTest2>(name);
23fa7767c5Sopenharmony_ci}
24fa7767c5Sopenharmony_ci
25fa7767c5Sopenharmony_cistatic Status CodecRegister(const std::shared_ptr<Register> &reg)
26fa7767c5Sopenharmony_ci{
27fa7767c5Sopenharmony_ci    CodecPluginDef definition;
28fa7767c5Sopenharmony_ci    definition.name = "UtCodecTest2";
29fa7767c5Sopenharmony_ci    definition.pluginType = PluginType::AUDIO_DECODER;
30fa7767c5Sopenharmony_ci    definition.description = "unit test codec test2";
31fa7767c5Sopenharmony_ci    definition.rank = 100; // 100
32fa7767c5Sopenharmony_ci    definition.creator = PluginCreator;
33fa7767c5Sopenharmony_ci    return reg->AddPlugin(definition);
34fa7767c5Sopenharmony_ci}
35fa7767c5Sopenharmony_ci
36fa7767c5Sopenharmony_ciPLUGIN_DEFINITION(UtCodecTest2, LicenseType::APACHE_V2, CodecRegister, [] {});
37fa7767c5Sopenharmony_ci
38fa7767c5Sopenharmony_ciStatus UtCodecTest2::QueueInputBuffer(const std::shared_ptr<Buffer> &inputBuffer, int32_t timeoutMs)
39fa7767c5Sopenharmony_ci{
40fa7767c5Sopenharmony_ci    return Status::OK;
41fa7767c5Sopenharmony_ci}
42fa7767c5Sopenharmony_ci
43fa7767c5Sopenharmony_ciStatus UtCodecTest2::QueueOutputBuffer(const std::shared_ptr<Buffer> &outputBuffers, int32_t timeoutMs)
44fa7767c5Sopenharmony_ci{
45fa7767c5Sopenharmony_ci    return Status::OK;
46fa7767c5Sopenharmony_ci}
47fa7767c5Sopenharmony_ci
48fa7767c5Sopenharmony_ciStatus UtCodecTest2::Flush()
49fa7767c5Sopenharmony_ci{
50fa7767c5Sopenharmony_ci    return Status::OK;
51fa7767c5Sopenharmony_ci}
52fa7767c5Sopenharmony_ci
53fa7767c5Sopenharmony_ciStatus UtCodecTest2::SetDataCallback(DataCallback* dataCallback)
54fa7767c5Sopenharmony_ci{
55fa7767c5Sopenharmony_ci    return Status::OK;
56fa7767c5Sopenharmony_ci}
57fa7767c5Sopenharmony_ci
58fa7767c5Sopenharmony_cistd::shared_ptr<Allocator> UtCodecTest2::GetAllocator()
59fa7767c5Sopenharmony_ci{
60fa7767c5Sopenharmony_ci    return std::shared_ptr<Allocator>();
61fa7767c5Sopenharmony_ci}
62fa7767c5Sopenharmony_ci
63fa7767c5Sopenharmony_ciStatus UtCodecTest2::SetCallback(Callback* cb)
64fa7767c5Sopenharmony_ci{
65fa7767c5Sopenharmony_ci    return Status::OK;
66fa7767c5Sopenharmony_ci}
67