Ios 如何在AVPlayer中显示实时摄像机馈送?
有没有办法将手机摄像头的实时视频流直接传输到AVPlayer?它似乎只接受NSURL参数。如何访问摄像头馈送并将其导入视频播放器 下面是一个例子:Ios 如何在AVPlayer中显示实时摄像机馈送?,ios,objective-c,camera,avplayer,Ios,Objective C,Camera,Avplayer,有没有办法将手机摄像头的实时视频流直接传输到AVPlayer?它似乎只接受NSURL参数。如何访问摄像头馈送并将其导入视频播放器 下面是一个例子: NSString *videoPath = [[NSBundle mainBundle] pathForResource:@"congo" ofType:@"mp4"]; NSURL *videoURL = [[NSURL alloc] initFileURLWithPath:videoPath]; _player = [AVPlayer playe
NSString *videoPath = [[NSBundle mainBundle] pathForResource:@"congo" ofType:@"mp4"];
NSURL *videoURL = [[NSURL alloc] initFileURLWithPath:videoPath];
_player = [AVPlayer playerWithURL:videoURL];
这很接近,但我不想播放电影文件。为什么要使用
AVPlayer
来显示实时视频源?我使用的是谷歌VR示例代码。我应该用什么来代替呢?我不能与谷歌VR示例代码对话,但通常你会使用AVCaptureVideoPreviewLayer
和AVCaptureSession
来显示一个实时视频源。好的,太好了!我有一个现场的摄像机。有没有办法显示同一摄像机的两个实例?