简体   繁体   English

IOS屏幕截图优胜美地

[英]Ios Screen Capture Yosemite

I have developed a mac application for Yosemite for IOS screen recording.The application mirrors the devices with MediaType Muxed like iPod and iphones to the Mac screen for recording along with a preview.The application works fine except that whenever I open the camera based applications on IOS device the preview starts lagging. 我为Yosemite开发了一个Mac应用程序用于IOS屏幕录制。该应用程序将具有iPod和iphone等MediaType Muxed的设备镜像到Mac屏幕上以进行预览录制。 iOS设备预览开始滞后。

These are the frameworks that are used to implement the application: 这些是用于实现应用程序的框架:
AVFoundation AVFoundation
CoreMediaIO 核心媒体IO
Cocoa 可可

To Implement the application: 要实施该应用程序:

1.Initially I had set the CoreMediaIO System Object's Property(Allow Screen capture devices) to 1 as specified in WWDC Video session 508 Camera Capture:Manual Controls in track media.This shows device with media type Muxed in the list of screen capture devices. 1,最初,我将WWDC视频会话508摄像头捕获:手动控件中的跟踪媒体中指定的CoreMediaIO系统对象的属性(允许屏幕捕获设备)设置为1。

2.Than I have created a session along with the preview layer to show the preview and provided interfaces for recording. 2.比起我创建一个会话和预览层来显示预览和提供录制界面。

Can anyone please help me to find a solution. 谁能帮我找到解决方案。

When you create a capture session using AVFoundation the payload coming out of the device is transcoded, assuming recent iOS device, the resolution is high and so is the CPU consumption req for transcoding, having high CPU consumption while transcoding can certainly cause the lagging, assuming that is the case, I would receommend you to Avoid transcoding al-together by directly using CoreMediaIO to intercept incoming h264 payload from the device, directly save it to the file when recording, and, devode it using eg. 当您使用AVFoundation创建捕获会话时,假设最近的iOS设备对来自设备的有效负载进行了转码,因此分辨率很高,转码时的CPU消耗要求也很高,具有高CPU消耗率,而转码时肯定会导致滞后,假设就是这种情况,我建议您避免使用直接使用CoreMediaIO截获设备中传入的h264有效负载,在记录时直接将其保存到文件中并使用例如eg。进行破坏的方法,从而对所有代码进行转码。 VideoToolBox for preview, this will req substantially less CPU and might resolve your problem. VideoToolBox进行预览,这将大大减少CPU需求,并可能解决您的问题。

  • See this link for details regarding VideoToolBox decoding 有关VideoToolBox解码的详细信息,请参见此链接
  • Check my Blog for CoreMediaIO capture examples 我的博客中查看CoreMediaIO捕获示例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM