iphone - GPUImageMovie 播放控件

标签 iphone avplayer gpuimage

我正在尝试控制 GPUImageMovie 的播放。 我想要存档的是从一帧跳转到另一帧(来回查找时间,滑动控制),而不是播放视频,但我不明白它的组件是否是为此用途而设计的。

GPUImageMovie -> 滤镜 -> GPUImageView

我尝试在playerItem上使用AVPlayer,但显然它是空的。

最佳答案

您可以使用AVPlayer来控制视频:使用AVPlayerItem创建GPUImageMovie,这样您就可以使用AVPlayer来控制您的视频 方法。

示例:

NSURL *mediaURL = ...
AVPlayer *mainPlayer = [[AVPlayer alloc] init];
AVPlayerItem *playerItem = [[AVPlayerItem alloc] initWithURL:mediaUrl];
[mainPlayer replaceCurrentItemWithPlayerItem:playerItem];

GPUImageMovie *currentMovieFile = [[GPUImageMovie alloc] initWithPlayerItem:playerItem];
[currentMovieFile addTarget:...];
[currentMovieFile startProcessing];

关于iphone - GPUImageMovie 播放控件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21781359/

相关文章:

ios - 如何在avplayer中获取直播的准确时间位置

ios - GPUImage + Touch 模糊效果

ios - 崩溃 : AVAudioSession Notify Thread in iOS

ios - 如何在 UITableView 的单元格内添加 KASlideShow

iPhone 应用程序增加摇动手势灵敏度

iphone - 将 TextView 添加到 UIAlertView

ios - AVPlayerViewController 中的完成按钮单击事件

ios - GPUImage 不同的预览输出

ios - 来自 gpuimage lib 的 imageFromCurrentFramebuffer 保存黑帧

android - 开源移动应用程序