Xcode中使用unity3D生成專案(Easy Movie Texture)執行出現的問題

weixin_34075551發表於2016-11-08

執行後,首先報的錯需要改 -fno-objc-arc
編譯後出現的新的錯。

需要將
CustomVideoPlayer.mm
_lastFrameTimestamp = _curFrameTimestamp;
curTex = CMVideoSampling_SampleBuffer(&_videoSampling, _cmSampleBuffer, (int)_videoSize.width, (int)_video
改成
_lastFrameTimestamp = _curFrameTimestamp;
size_t w, h;
w =(int)_videoSize.width;
h =(int)_videoSize.height;
curTex = CMVideoSampling_SampleBuffer(&_videoSampling, _cmSampleBuffer, &w, &h);

還有將
CustomVideoPlayer.mm中的
AVPlayerStatus status = [[change objectForKey:NSKeyValueChangeNewKey] integerValue];
改成
AVPlayerStatus status = (AVPlayerStatus)[[change objectForKey:NSKeyValueChangeNewKey] integerValue];

相關文章