美文网首页
AVSampleBufferDisplayLayer 更新 vi

AVSampleBufferDisplayLayer 更新 vi

作者: yxibng | 来源:发表于2020-11-26 18:06 被阅读0次

参考 stackoverflow

setting the AVPlayerLayer's bounds to the AVPlayerLayer's bound seemed to do the trick. although i don't really get why.

self.displayLayer.videoGravity = gravity;
//通过改变bounds, 触发gravity 生效
CGRect bounds = self.displayLayer.bounds;
self.displayLayer.bounds = CGRectZero;
self.displayLayer.bounds = bounds;

相关文章

网友评论

      本文标题:AVSampleBufferDisplayLayer 更新 vi

      本文链接:https://www.haomeiwen.com/subject/wndziktx.html