Giter VIP home page Giter VIP logo

applevideocapturer's Introduction

AppleVideoCapturer

demo shows how to capture video data from camera in macos and ios platform.

  1. 配置AVCaptureSession, 添加AVCaptureVideoDataOutput 采集视频数据
  2. 配置iOS 采集视频的方向(与statusbar的方向一致),镜像模式,响应屏幕旋转
  3. ios切换前后置摄像头,macOS切换采集设备
  4. 配置采集的帧率,分辨率, iOS支持高帧率采集
  5. 通过AVSampleBufferDisplayLayer来预览采集的数据
  6. iOS处理响应采集打断与恢复,运行错误等
  7. macOS 处理采集设备插拔事件
  8. 支持 metal 渲染, 使用了 https://github.com/libobjc/SGPlayer

applevideocapturer's People

Contributors

yxibng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

applevideocapturer's Issues

出现crash

在iOS 端调用 displayPixelBuffer:方法渲染摄像头回调的CVPixelBufferRef 数据时 可能会出现无规律的崩溃 报错信息包括
MTLCommandBuffer didCompleteWithStartTime:endTime:error
IOGPUMetalCommandBuffer didCompleteWithStartTime:endTime:error
MTLCommandBuffer presentDrawable:options:
MTLCommandBuffer didScheduleWithStartTime:endTime:error:
IOGPUNotificationQueueDispatchAvailableCompletionNotifications
实在是不太理解 可能是涉及了在渲染的runloop内持有了空指针
不知道作者能不能有时间回复一下 谢谢

Mac 帧率不可变

在 Mac 上测试了下,好像不能修改帧率,不知道作者是否遇到这个问题?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.