Local video transmission of WEBRTC

Source: Internet
Author: User

The main reference in this document is [1], which takes the code from the reference article. But [1] did not upload the complete code. Environment configuration can refer to the previous article [2]

The main realization of the video in the local transmission. It took a day.

As for WEBRTC video capture, codec, please refer to the online blog, here is not mentioned.

Compile using CMake to generate makefile, step cmake. Note the points that follow, and make.

Add: Packets received should be timestamp-stamped, so the two functions in Mainwindow.cpp are modified:

void Mainwindow::recvrtpdata (char*data,int length)
{
	Rtc::copyonwritebuffer packet (reinterpret_cast< Const uint8_t*> (data), length);
	Videochannel_->onpacketreceived (&packet,rtc::createpackettime (0));

}
void Mainwindow::recvrtcpdata (char*data,int length)
{
	Rtc::copyonwritebuffer packet (reinterpret_cast< Const uint8_t*> (data), length);
	Videochannel_->onrtcpreceived (&packet,rtc::createpackettime (0));
}
Rtc::createpackettime (0) This function can create time information associated with a packet.


[1] WEBRTC Learning Ten: The simplest video chat (using WebRtcVideoEngine2)

[2]WEBRTC video capture and display via QT

[3] Baidu network disk download address

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.