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