1 /* 2 * Copyright (c) 2023-2023 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 #ifndef HISTREAMER_PLUGINS_INTF_GENERIC_PLUGIN_H 17 #define HISTREAMER_PLUGINS_INTF_GENERIC_PLUGIN_H 18 19 #include "plugin_caps.h" 20 #include "plugin_base.h" 21 #include "plugin_definition.h" 22 23 namespace OHOS { 24 namespace Media { 25 namespace Plugins { 26 /** 27 * @brief Generic plugin definition. 28 * It can be used to represent any user defined plugin (T), which must derived from PluginBase. 29 * 30 * @since 1.0 31 * @version 1.0 32 */ 33 struct GenericPluginDef : public PluginDefBase { 34 CapabilitySet inCaps {}; ///< Plug-in input capability, For details, @see Capability. 35 CapabilitySet outCaps {}; ///< Plug-in output capability, For details, @see Capability. 36 PluginCreatorFunc<PluginBase> creator {nullptr}; ///< Generic plugin create function. 37 uint32_t pkgVersion {}; 38 std::string pkgName {}; 39 LicenseType license {LicenseType::APACHE_V2}; GenericPluginDefGenericPluginDef40 GenericPluginDef() 41 { 42 apiVersion = 0; ///< Generic plugin version. 43 pluginType = PluginType::GENERIC_PLUGIN; ///< Plugin type, MUST be GENERIC_PLUGIN. 44 } 45 }; 46 } // namespace Plugins 47 } // namespace Media 48 } // namespace OHOS 49 #endif // HISTREAMER_PLUGINS_INTF_GENERIC_PLUGIN_H