ios - 从 OS X 应用程序录制 iPhone/iPad 屏幕,就像 QuickTime Player
<p><p>我知道可以使用 QuickTime 播放器录制 iOS 屏幕。 (iOS 设备显示为相机)</p>
<p>我可以使用 AVFoundation for Mac OS X 录制 iOS 屏幕吗?</p>
<p>我想创建一个可以录制 iOS 设备屏幕的 OS X 应用。</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>归功于 <a href="https://stackoverflow.com/a/26814278/2648673" rel="noreferrer noopener nofollow">NadavRub</a> </p>
<p>引自 <a href="http://devstreaming.apple.com/videos/wwdc/2014/508xxfvaehrll14/508/508_camera_capture_manual_controls.pdf?dl=1" rel="noreferrer noopener nofollow">the PDF transcript for WWDC 2014 session #508 “Camera Capture: Manual Controls”</a> 的 p28 :</p>
<blockquote>
<p>iOS devices are presented as CoreMedia IO “DAL” plug-ins</p>
<p>You must opt in to see iOS screen devices in your OS X app </p>
<pre class="lang-c prettyprint-override"><code>CMIOObjectPropertyAddress prop =
{ kCMIOHardwarePropertyAllowScreenCaptureDevices,
kCMIOObjectPropertyScopeGlobal,
kCMIOObjectPropertyElementMaster };
UInt32 allow = 1;
CMIOObjectSetPropertyData( kCMIOObjectSystemObject,
&prop, 0, NULL,
sizeof(allow), &allow );
</code></pre>
</blockquote>
<p>另见 <a href="https://nadavrub.wordpress.com/2015/07/06/macos-media-capture-using-coremediaio/" rel="noreferrer noopener nofollow">my blog</a>用于CoreMediaIO捕获样本直接拦截设备发出的原始压缩有效载荷</p></p>
<p style="font-size: 20px;">关于ios - 从 OS X 应用程序录制 iPhone/iPad 屏幕,就像 QuickTime Player,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/32700632/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/32700632/
</a>
</p>
页:
[1]