Home
last modified time | relevance | path

Searched refs:imageFd (Results 1 - 5 of 5) sorted by relevance

/foundation/multimedia/media_library/frameworks/native/c_api/
H A Dmoving_photo_impl.cpp123 int32_t imageFd = OpenReadOnlyFile(movingPhotoUri, true); in RequestContentToSandbox() local
124 CHECK_AND_RETURN_RET_LOG(HandleFd(imageFd), imageFd, "Open source image file failed"); in RequestContentToSandbox() local
126 int32_t ret = WriteToSandboxUri(imageFd, imageUri); in RequestContentToSandbox()
/foundation/multimedia/media_library/frameworks/innerkitsimpl/media_library_helper/src/
H A Dmoving_photo_file_utils.cpp298 static int32_t MergeFile(const UniqueFd& imageFd, const UniqueFd& videoFd, const UniqueFd& livePhotoFd, in MergeFile() argument
301 if (WriteContentTofile(livePhotoFd, imageFd) == E_ERR) { in MergeFile()
359 UniqueFd imageFd(open(absImagePath.c_str(), O_RDONLY)); in ConvertToLivePhoto()
360 if (imageFd.Get() == E_ERR) { in ConvertToLivePhoto()
384 if (MergeFile(imageFd, videoFd, livePhotoFd, extraPath, GetFrameIndex(coverPosition, videoFd.Get())) == E_ERR) { in ConvertToLivePhoto()
413 UniqueFd imageFd(open(absSourceImagePath.c_str(), O_RDONLY)); in ConvertToSourceLivePhoto()
414 CHECK_AND_RETURN_RET_LOG(imageFd.Get() >= 0, E_HAS_FS_ERROR, in ConvertToSourceLivePhoto()
431 if (MergeFile(imageFd, videoFd, livePhotoFd, extraDataPath, 0) != E_OK) { in ConvertToSourceLivePhoto()
/foundation/multimedia/media_library/frameworks/js/src/
H A Dmoving_photo_napi.cpp242 int32_t imageFd = MovingPhotoNapi::OpenReadOnlyFile(movingPhotoUri, true); in RequestContentToSandbox() local
243 CHECK_COND_RET(HandleFd(imageFd), imageFd, "Open source image file failed"); in RequestContentToSandbox() local
244 int32_t ret = WriteToSandboxUri(imageFd, context->destImageUri); in RequestContentToSandbox()
H A Dmedia_asset_manager_napi.cpp1485 int imageFd = UserFileClient::OpenFile(uri, MEDIA_FILEMODE_READONLY); in GetByteArrayNapiObject() local
1486 if (imageFd < 0) { in GetByteArrayNapiObject()
1490 ssize_t imgLen = lseek(imageFd, 0, SEEK_END); in GetByteArrayNapiObject()
1493 lseek(imageFd, 0, SEEK_SET); in GetByteArrayNapiObject()
1494 ssize_t readRet = read(imageFd, buffer, imgLen); in GetByteArrayNapiObject()
1495 close(imageFd); in GetByteArrayNapiObject()
/foundation/multimedia/media_library/frameworks/innerkitsimpl/test/unittest/medialibrary_photo_operations_test/src/
H A Dmedialibrary_photo_operations_test.cpp3160 int32_t imageFd = MediaLibraryPhotoOperations::Open(openImageCmd, "w"); in HWTEST_F() local
3161 ASSERT_GE(imageFd, 0); in HWTEST_F()
3162 int32_t resWrite = write(imageFd, FILE_TEST_JPG, sizeof(FILE_TEST_JPG)); in HWTEST_F()

Completed in 13 milliseconds