1 /* 2 * Copyright (c) 2024-2024 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 IE_PIPELINE_CORE_CAPABILITY_H 17 #define IE_PIPELINE_CORE_CAPABILITY_H 18 19 #include <memory> 20 #include <utility> 21 22 #include "effect_info.h" 23 #include "effect_buffer.h" 24 25 namespace OHOS { 26 namespace Media { 27 namespace Effect { 28 struct MemNegotiatedCap { 29 IEffectFormat format = IEffectFormat::DEFAULT; 30 uint32_t width = 0; 31 uint32_t height = 0; 32 bool isSupportEditSrc = true; 33 }; 34 35 struct PixelFormatCap { 36 std::map<IEffectFormat, std::vector<IPType>> formats; 37 }; 38 39 struct ColorSpaceCap { 40 std::vector<EffectColorSpace> colorSpaces; 41 }; 42 43 struct Capability { CapabilityCapability44 Capability(std::string &name):name_(name) {} 45 46 std::string &name_; 47 std::shared_ptr<PixelFormatCap> pixelFormatCap_ = nullptr; 48 std::shared_ptr<MemNegotiatedCap> memNegotiatedCap_ = nullptr; 49 std::shared_ptr<ColorSpaceCap> colorSpaceCap_ = nullptr; 50 }; 51 } // namespace Effect 52 } // namespace Media 53 } // namespace OHOS 54 #endif // IE_PIPELINE_CORE_CAPABILITY_H 55