How can i get the screenshot of a streaming video on iphone. I tried several methods.
UIGetScreenImage() -> This is private. The app will be rejected if I use it.
UIGraphicsBeginImageContext(CGSizeMake(1024, 768)); [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();
The code above cannot take the screenshot of video layer.
MPMoviePlayerController *movie = [[MPMoviePlayerController alloc] initWithContentURL [NSURL URLWithString:@"myMovie.mp4"]]; UIImage *singleFrameImage = [movie thumbnailImageAtTime:10 timeOption:MPMovieTimeOptionExact];
The code above does not work on a streaming video.
What else can I try besides AVFoundation. Thank you.