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