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 #ifndef HISTREAMER_PIPELINE_FILTER_PLUGIN_SETTINGS_H 17 #define HISTREAMER_PIPELINE_FILTER_PLUGIN_SETTINGS_H 18 19 #include <functional> 20 #include <tuple> 21 22 #include "pipeline/core/filter_type.h" 23 #include "plugin/common/plugin_tags.h" 24 #include "plugin/common/plugin_types.h" 25 26 namespace OHOS { 27 namespace Media { 28 namespace Pipeline { 29 constexpr uint8_t PARAM_GET = 0x01; 30 constexpr uint8_t PARAM_SET = 0x02; 31 using PluginParaAllowedMap = std::map<Plugin::Tag, 32 std::pair<std::function<bool(Plugin::Tag, const Plugin::ValueType&)>, uint8_t>>; 33 34 struct PluginParameterTable { 35 static const PluginParaAllowedMap& FindAllowedParameterMap(FilterType category); 36 private: 37 static const std::map<FilterType, PluginParaAllowedMap> table_; 38 }; 39 } // Pipeline 40 } // Media 41 } // OHOS 42 #endif // HISTREAMER_PIPELINE_FILTER_PLUGIN_SETTINGS_H 43