how to take snapshot on iOS
Posted: 09 Dec 2013 08:26
I want to take snapshot on iOS, I have found the method
here is my codes:
but I got the error:
[0xd445870] main video output error: Encoding support not compiled-in!
[0xd445870] main video output error: Failed to convert image for snapshot
Could anyone help me fix this problem?
Thanks a lot!
Code: Select all
- (void)saveVideoSnapshotAt: (NSString *)path withWidth:(NSUInteger)width andHeight:(NSUInteger)height;
Code: Select all
NSString *desPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject];
NSString *des = [desPath stringByAppendingPathComponent:@"lty.png"];
[_mediaPlayer saveVideoSnapshotAt:des withWidth:0 andHeight:0];
[0xd445870] main video output error: Encoding support not compiled-in!
[0xd445870] main video output error: Failed to convert image for snapshot
Could anyone help me fix this problem?
Thanks a lot!