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