Commit 87595a6b authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #9779 from Lightricks:feature/assetslibrary-remove-link

parents 56fe2dc1 0d979a74
...@@ -222,10 +222,7 @@ if(IOS) ...@@ -222,10 +222,7 @@ if(IOS)
${CMAKE_CURRENT_LIST_DIR}/src/cap_ios_photo_camera.mm ${CMAKE_CURRENT_LIST_DIR}/src/cap_ios_photo_camera.mm
${CMAKE_CURRENT_LIST_DIR}/src/cap_ios_video_camera.mm) ${CMAKE_CURRENT_LIST_DIR}/src/cap_ios_video_camera.mm)
list(APPEND VIDEOIO_LIBRARIES "-framework Accelerate" "-framework AVFoundation" "-framework CoreGraphics" "-framework CoreImage" "-framework CoreMedia" "-framework CoreVideo" "-framework QuartzCore" "-framework AssetsLibrary") list(APPEND VIDEOIO_LIBRARIES "-framework Accelerate" "-framework AVFoundation" "-framework CoreGraphics" "-framework CoreImage" "-framework CoreMedia" "-framework CoreVideo" "-framework QuartzCore" "-framework UIKit")
if(APPLE_FRAMEWORK)
list(APPEND VIDEOIO_LIBRARIES "-framework UIKit")
endif()
endif() endif()
if(WIN32) if(WIN32)
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#import "opencv2/videoio/cap_ios.h" #import "opencv2/videoio/cap_ios.h"
#include "precomp.hpp" #include "precomp.hpp"
#import <AssetsLibrary/AssetsLibrary.h> #import <UIKit/UIKit.h>
static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;} static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
...@@ -626,11 +626,7 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;} ...@@ -626,11 +626,7 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
return; return;
} }
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; UISaveVideoAtPathToSavedPhotosAlbum([self videoFileString], nil, nil, NULL);
if ([library videoAtPathIsCompatibleWithSavedPhotosAlbum:[self videoFileURL]]) {
[library writeVideoAtPathToSavedPhotosAlbum:[self videoFileURL]
completionBlock:^(NSURL *assetURL, NSError *error){ (void)assetURL; (void)error; }];
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment