如何在iOS 8和Yosemite之间设置镜像会话? [英] How do I set up a mirroring session between iOS 8 and Yosemite?

查看:235
本文介绍了如何在iOS 8和Yosemite之间设置镜像会话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在OS X Yosemite上,可以将iOS 8设备的屏幕镜像到OS X计算机并保存为媒体文件。这可以使用QuickTime Player手动完成,但我想以编程方式执行相同操作。

On OS X Yosemite, the screen of an iOS 8 device can be mirrored to the OS X machine and saved as a media file. This can be done manually using QuickTime Player, but I want to do the same programatically.

阅读文档时,iOS 8设备应作为网络摄像头公开。

Reading the docs, the iOS 8 device should be exposed as a webcam.

在我的Mac上调用 [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo] 会返回 NSArray 没有元素。

Calling [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo] on my Mac returns an NSArray with no elements.

如何使用iOS 8和Yosemite设置镜像会话?如何检测镜像会话的捕获设备?

How can I setup a mirroring session using iOS 8 and Yosemite? How can I detect the capture device for the mirroring session?

推荐答案

WWDC 2014会议#508的PDF成绩单相机捕获:手动控制


iOS设备显示为CoreMedia IODAL插件

iOS devices are presented as CoreMedia IO "DAL" plug-ins

您必须选择加入在OS X应用程序中查看iOS屏幕设备

You must opt in to see iOS screen devices in your OS X app

CMIOObjectPropertyAddress prop =
                           { kCMIOHardwarePropertyAllowScreenCaptureDevices,
                             kCMIOObjectPropertyScopeGlobal,
                             kCMIOObjectPropertyElementMaster };
UInt32 allow = 1;
CMIOObjectSetPropertyData( kCMIOObjectSystemObject,
                           &prop, 0, NULL,
                           sizeof(allow), &allow );


此外,请参阅我的博客 CoreMediaIO捕获示例直接拦截从设备发出的原始压缩有效载荷

Also, see my blog for CoreMediaIO capture sample to directly intercept the raw compressed payload sent out from the device

如果您发现使用完整,请立即投票。

Please up-vote this post if you find it use-full

这篇关于如何在iOS 8和Yosemite之间设置镜像会话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆