How to set up a mirroring session between iOS 8 and Yosemite?

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

Reading documents, the iOS 8 device should be open as a webcam.

A call [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]on my Mac returns NSArrayno items.

How to set up a mirroring session using iOS 8 and Yosemite? How to identify a capture device for a mirroring session?

+3
source share
1 answer

Quote from p28 decoding PDF for WWDC 2014 session # 508 "Camera capture: manual controls" :

iOS- CoreMedia IO "DAL"

, iOS OS X

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

. CoreMediaIO, ,

, ,

+15

All Articles