1 /*
2 * Copyright (C) 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 "gst_plugin_fw.h"
17 #include "hilog/log.h"
18 #include "log_tags.h"
19
20 namespace OHOS {
21 namespace MultimediaPlugin {
22 using std::map;
23 using std::mutex;
24 using std::string;
25 using std::vector;
26 using namespace OHOS::HiviewDFX;
27
28 static constexpr HiLogLabel LABEL = { LOG_CORE, LOG_TAG_DOMAIN_ID_PLUGIN, "GstPluginFw" };
29
Register(const vector<string> & canonicalPaths)30 uint32_t GstPluginFw::Register(const vector<string> &canonicalPaths)
31 {
32 (void) canonicalPaths;
33 HiLog::Debug(LABEL, "register called.");
34 return SUCCESS;
35 }
36
CreateObject(uint16_t interfaceID,const string & className,uint32_t & errorCode)37 PluginClassBase *GstPluginFw::CreateObject(uint16_t interfaceID, const string &className, uint32_t &errorCode)
38 {
39 (void) interfaceID;
40 (void) className;
41 HiLog::Debug(LABEL, "CreateObject by name called.");
42 errorCode = ERR_MATCHING_PLUGIN;
43
44 return nullptr;
45 }
46
CreateObject(uint16_t interfaceID,uint16_t serviceType,const map<string,AttrData> & capabilities,const PriorityScheme & priorityScheme,uint32_t & errorCode)47 PluginClassBase *GstPluginFw::CreateObject(uint16_t interfaceID, uint16_t serviceType,
48 const map<string, AttrData> &capabilities,
49 const PriorityScheme &priorityScheme, uint32_t &errorCode)
50 {
51 (void) interfaceID;
52 (void) serviceType;
53 (void) capabilities;
54 (void) priorityScheme;
55 HiLog::Debug(LABEL, "CreateObject by serviceType called.");
56 errorCode = ERR_MATCHING_PLUGIN;
57
58 return nullptr;
59 }
60
GstPluginFwGetClassInfo(uint16_t interfaceID,uint16_t serviceType,const map<std::string,AttrData> & capabilities,vector<ClassInfo> & classesInfo)61 uint32_t GstPluginFw::GstPluginFwGetClassInfo(uint16_t interfaceID, uint16_t serviceType,
62 const map<std::string, AttrData> &capabilities,
63 vector<ClassInfo> &classesInfo)
64 {
65 (void) interfaceID;
66 (void) serviceType;
67 (void) capabilities;
68 (void) classesInfo;
69 HiLog::Debug(LABEL, "GetClassInfo by serviceType called.");
70 return ERR_MATCHING_PLUGIN;
71 }
72
73 // ------------------------------- private method -------------------------------
GstPluginFw()74 GstPluginFw::GstPluginFw() {}
~GstPluginFw()75 GstPluginFw::~GstPluginFw() {}
76 } // namespace MultimediaPlugin
77 } // namespace OHOS
78