当前位置:网站首页>How does webrtc obtain video stream data on the C ++ side?
How does webrtc obtain video stream data on the C ++ side?
2022-06-24 13:22:00 【Tsingsee green rhino video】
WebRTC Is an open source technology , It can realize voice and video communication through web pages , Without having to install any plug-ins in the browser . Now ,WebRTC The technology is mature , It integrates the best sound / Video Engine , This technology has been widely used in video calls .
stay WebRTC Development process , Will be far away sdp Once you set it up , Then you can get the video data stream . If it is js End , So the operation is actually relatively simple . however C++ The end is a little troublesome . because WebRTC With a... On the top Javascript API layer , You can use it in your browser . This makes it easier to develop and integrate real-time communications anywhere . In the internal ,WebRTC Still mainly used C / C ++ Realization .
Some developers don't know how to get WebRTC C++ Video stream data at the end . Today we will share this development skill with you :WebRTC How to get C ++ Video stream data at the end .
1、 First , stay WebRTC in src/api/create_peerconnection_factory.h There is a function to create a peer-to-peer connection factory , And return an instance interface . The code is as follows :
2、 After the peer factory is created , stay src/api/peer_connection_interface There are peer connections in , Use a peer factory to create this peer connection instance . The code is as follows :
3、 See here , We just need to pay attention CreatePeerConnection The last argument to the function . This parameter needs to be overridden , There are many virtual functions that need to be rewritten . Roughly rewritten ICE、 Track and connection status, etc .
4、 At this step, you should find out how to obtain video data stream . There is a method of audio rewriting OnTrack function , This function is responsible for monitoring the video stream instance .
5、 Responsible for rewriting webrtc::PeerConnectionObserver The virtual function in the function , The implementation can monitor the transmitted stream information . Get video stream data , Just pay attention OnTrack function :
webrtc::RtpTransceiverInterface Interface found receiver() Method , In from receiver() Method track() Method ,track() The method is to get the information of the video stream .
WebRTC Not just voice and video , It's powerful and versatile , That's why WebRTC Because technology is becoming more and more popular .
Based on open source WebRTC Technical development EasyRTC Video conferencing cloud services , It's widely used in education 、 Finance 、 Health care 、 Enterprise training 、 Telecommuting, etc , All browsers that support current technology include Google Chrome,Mozilla Firefox,Apple Safari and Microsoft Edge. Not just browsers ,EasyRTC It can also support wechat applet 、H5 page 、APP、PC Interworking between client and other access methods , Building real-time audio and video communication from scratch ; Support video calls from multiple to one million people , Meet voice and video social .
边栏推荐
- 我从根上解决了微信占用手机内存问题
- Implement Domain Driven Design - use ABP framework - create entities
- [2022 national tournament simulation] BigBen -- determinant, Du Jiao sieve
- 【数据挖掘】期末复习(样卷题目+少量知识点)
- The difference between apt and apt get
- go Cobra命令行工具入门
- Sinomeni vine was selected as the "typical solution for digital technology integration and innovative application in 2021" of the network security center of the Ministry of industry and information te
- Why did the audio and video based cloud conference usher in a big explosion of development?
- 面试官:MySQL 数据库查询慢,除了索引问题还可能是什么原因?
- CVPR 2022 | 美團技術團隊精選論文解讀
猜你喜欢
go Cobra命令行工具入门
Getting started with the lvgl Library - colors and images
Babbitt | metauniverse daily must read: 618 scores have been announced. How much contribution has the digital collection made behind this satisfactory answer
Parse NC format file and GRB format file dependent package edu ucar. API learning of netcdfall
Codereview tool chain for micro medicine
Use abp Zero builds a third-party login module (I): Principles
Getting started with the go Cobra command line tool
Understanding openstack network
Main steps of system test
Pycharm中使用Terminal激活conda服务(终极方法,铁定可以)
随机推荐
关于被黑数据库那些事
青藤入选工信部网安中心“2021年数字技术融合创新应用典型解决方案”
Gateway processing flow of zuul source code analysis
Optimization of MP4 file missing seconds caused by TS files when downloading videos from easydss video platform
线程同步的基石AbstractQueuedSynchronizer详解
“有趣” 是新时代的竞争力
3. Caller 服务调用 - dapr
一文讲透研发效能!您关心的问题都在
“我这个白痴,招到了一堆只会“谷歌”的程序员!”
Open source monitoring system Prometheus
Istio Troubleshooting: uneven grpc service load
Experience of IOS interview strategy - App testing and launching
IIS WCF 808 port service access exception
申请MIMIC数据库失败怎么办?从失败到成功的经验分享给你~
1、贪吃蛇游戏设计
Beauty of script │ VBS introduction interactive practice
[data mining] final review (sample questions + a few knowledge points)
Getting started with the go Cobra command line tool
面试官:MySQL 数据库查询慢,除了索引问题还可能是什么原因?
Attack Science: ARP attack