如何自定义WebRTC视频源? [英] How to custom WebRTC video source?

查看:354
本文介绍了如何自定义WebRTC视频源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何更改WebRTC( https://cocoapods.org/pods/libjingle_peerconnection )视频源?

Does someone know how to change WebRTC (https://cocoapods.org/pods/libjingle_peerconnection) video source?

我正在使用屏幕共享应用程序. 目前,我在CVPixelBuffer中实时检索渲染的帧.有人知道我如何将我的帧添加为视频源吗? 是否可以设置其他视频源而不是相机设备源?是的,视频必须是哪种格式以及如何制作?

I am working on an screen sharing app. At the moment, I retrieve the rendered frames in real-time in CVPixelBuffer. Does someone know how I could add my frames as video source please? Is it possible to set an other video source instead of camera device source ? Is yes, which format the video has to be and how to do it ?

谢谢.

推荐答案

var connectionFactory :  RTCPeerConnectionFactory = RTCPeerConnectionFactory()
let videoSource :  RTCVideoSource = factory.videoSource()
videoSource.capturer(videoCapturer, didCapture: videoFrame!)

这篇关于如何自定义WebRTC视频源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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