• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 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 IMAGE_EFFECT_EFFECT_CONTEXT_H
17 #define IMAGE_EFFECT_EFFECT_CONTEXT_H
18 
19 #include <unordered_set>
20 
21 #include "effect_info.h"
22 #include "effect_memory_manager.h"
23 #include "render_strategy.h"
24 #include "capability_negotiate.h"
25 #include "colorspace_manager.h"
26 #include "efilter_cache_negotiate.h"
27 #include "image_effect_marco_define.h"
28 #include "efilter_metainfo_negotiate.h"
29 
30 namespace OHOS {
31 namespace Media {
32 namespace Effect {
33 class RenderEnvironment;
34 struct EffectContext {
35 public:
36     std::shared_ptr<EffectMemoryManager> memoryManager_;
37     std::shared_ptr<RenderStrategy> renderStrategy_;
38     std::shared_ptr<CapabilityNegotiate> capNegotiate_;
39     std::shared_ptr<RenderEnvironment> renderEnvironment_;
40     std::shared_ptr<ColorSpaceManager> colorSpaceManager_;
41     std::shared_ptr<EFilterCacheNegotiate> cacheNegotiate_;
42     std::shared_ptr<EfilterMetaInfoNegotiate> metaInfoNegotiate_;
43 
44     IPType ipType_ = IPType::DEFAULT;
45     std::unordered_set<EffectColorSpace> filtersSupportedColorSpace_;
46 
47     IMAGE_EFFECT_EXPORT std::shared_ptr<ExifMetadata> GetExifMetadata();
48 
49     std::shared_ptr<ExifMetadata> exifMetadata_ = nullptr;
50 };
51 } // namespace Effect
52 } // namespace Media
53 } // namespace OHOS
54 #endif // IMAGE_EFFECT_EFFECT_CONTEXT_H
55