1 /* 2 * Copyright (c) 2025 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 METADATAHELPER_FFI_H 17 #define METADATAHELPER_FFI_H 18 #include "cj_avimagegenerator.h" 19 #include "cj_avmetadataextractor.h" 20 #include "cj_common_ffi.h" 21 #include "ffi_remote_data.h" 22 #include "metadatahelper_util.h" 23 24 namespace OHOS { 25 namespace Media { 26 extern "C" { 27 FFI_EXPORT int64_t FfiCreateAVImageGenerator(); 28 FFI_EXPORT int32_t FfiAVImageGeneratorGetFdSrc(int64_t id, CAVFileDescriptor* fd); 29 FFI_EXPORT int32_t FfiAVImageGeneratorSetFdSrc(int64_t id, CAVFileDescriptor fd); 30 FFI_EXPORT int64_t FfiFetchFrameByTime(int64_t id, int64_t timeUs, int32_t option, CPixelMapParams param); 31 FFI_EXPORT int32_t FfiAVImageGeneratorRelease(int64_t id); 32 33 FFI_EXPORT int64_t FfiCreateAVMetadataExtractor(); 34 FFI_EXPORT int32_t FfiFetchMetadata(int64_t id, CAVMetadata* data); 35 FFI_EXPORT int64_t FfiFetchAlbumCover(int64_t id); 36 FFI_EXPORT int32_t FfiAVMetadataExtractorGetFdSrc(int64_t id, CAVFileDescriptor* fd); 37 FFI_EXPORT int32_t FfiAVMetadataExtractorSetFdSrc(int64_t id, CAVFileDescriptor fd); 38 FFI_EXPORT int32_t FfiAVMetadataExtractorGetDataSrc(int64_t id, CAVDataSrcDescriptor* data); 39 FFI_EXPORT int32_t FfiAVMetadataExtractorSetDataSrc(int64_t id, CAVDataSrcDescriptor data); 40 FFI_EXPORT int32_t FfiAVMetadataExtractorRelease(int64_t id); 41 } 42 } // namespace Media 43 } // namespace OHOS 44 #endif // METADATAHELPER_FFI_H 45