MobileVLCKit 缩略图问题
MobileVLCKit thumbnailer issue
我想创建一个 CVPixelBuffer
,因为它需要一个 CGImageRef
我使用了 [VLCThumbnailer fetchThumbnail]
方法并因
而崩溃
"Assertion failed: ([thumbnailer dataPointer] == *p_pixels), function
unlock, file
/Users/apple/opensource/vlc-ios/ImportedSources/VLCKit/Sources/VLCMediaThumbnailer.m,
line 74." neither can I find the route"/Users/apple".
代码如下:
- (void)viewDidLoad {NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(catchThumbnail) userInfo:nil repeats:YES];
[[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];}
- (void)catchThumbnail {
if (self.vlcPlayer.hasVideoOut) {
[self.thumbnailer fetchThumbnail];
}}
// VLCMediaThumbnailerDelegate
-(void)mediaThumbnailer:(VLCMediaThumbnailer *)mediaThumbnailer didFinishThumbnail:(CGImageRef)thumbnail {
NSLog(@"-----%@------",thumbnail);
}
值得一提:第一次登录:MobileVLCKitPlayer[2736:1068033] -----<CGImage 0x7f803bed56e0>------,
但第二次崩溃
谁能帮帮我,非常感谢! :)
我已经修复了,如果有人遇到同样的问题,记得每次处理后设置thumbnailer.thumbnail = nil
:)
我想创建一个 CVPixelBuffer
,因为它需要一个 CGImageRef
我使用了 [VLCThumbnailer fetchThumbnail]
方法并因
"Assertion failed: ([thumbnailer dataPointer] == *p_pixels), function unlock, file /Users/apple/opensource/vlc-ios/ImportedSources/VLCKit/Sources/VLCMediaThumbnailer.m, line 74." neither can I find the route"/Users/apple".
代码如下:
- (void)viewDidLoad {NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(catchThumbnail) userInfo:nil repeats:YES];
[[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];}
- (void)catchThumbnail {
if (self.vlcPlayer.hasVideoOut) {
[self.thumbnailer fetchThumbnail];
}}
// VLCMediaThumbnailerDelegate
-(void)mediaThumbnailer:(VLCMediaThumbnailer *)mediaThumbnailer didFinishThumbnail:(CGImageRef)thumbnail {
NSLog(@"-----%@------",thumbnail);
}
值得一提:第一次登录:MobileVLCKitPlayer[2736:1068033] -----<CGImage 0x7f803bed56e0>------,
但第二次崩溃
谁能帮帮我,非常感谢! :)
我已经修复了,如果有人遇到同样的问题,记得每次处理后设置thumbnailer.thumbnail = nil
:)