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 INTERFACE_INNERKITS_INCLUDE_AUXILIARY_GENERATOR_H 17 #define INTERFACE_INNERKITS_INCLUDE_AUXILIARY_GENERATOR_H 18 19 #include "abs_image_decoder.h" 20 #include "auxiliary_picture.h" 21 #include "image_type.h" 22 #include "image/input_data_stream.h" 23 #include "plugin_server.h" 24 25 namespace OHOS { 26 namespace Media { 27 using namespace ImagePlugin; 28 using namespace MultimediaPlugin; 29 30 struct MainPictureInfo { 31 ImageHdrType hdrType; 32 ImageInfo imageInfo; 33 }; 34 35 class AuxiliaryGenerator { 36 public: 37 static std::shared_ptr<AuxiliaryPicture> GenerateHeifAuxiliaryPicture(const MainPictureInfo &mainInfo, 38 AuxiliaryPictureType type, std::unique_ptr<AbsImageDecoder> &extDecoder, uint32_t &errorCode); 39 static std::shared_ptr<AuxiliaryPicture> GenerateJpegAuxiliaryPicture( 40 const MainPictureInfo &mainInfo, AuxiliaryPictureType type, std::unique_ptr<InputDataStream> &auxStream, 41 std::unique_ptr<AbsImageDecoder> &extDecoder, uint32_t &errorCode); 42 }; 43 } // namespace Media 44 } // namespace OHOS 45 46 #endif //INTERFACE_INNERKITS_INCLUDE_AUXILIARY_GENERATOR_H