webrtc代码走读三(视频数据处理流程汇总)

一、概述

二、视频采集到发包

  • 创建编码线程

VideoStreamEncoder::VideoStreamEncoder
->TaskQueue::TaskQueue("EncoderQueue")//创建编码任务encoder_queue_

VideoStreamEncoder::OnFrame
->encoder_queue_.PostTask(EncodeTask)//从摄像头接收到一帧视频直接推到编码队列中
  • 创建编码器

VideoStreamEncoder::EncodeTask::Run
VideoStreamEncoder::EncodeVideoFrame
VideoStreamEncoder::ReconfigureEncoder
VideoSender::RegisterSendCodec
VCMCodecDataBase::SetSendCodec
VCMGenericEncoder::InitEncode
H264EncoderImpl::InitEncode

  • 创建RTP发送视频流

        RTP视频流发送,需要两个线程共同配合工作:1、PacerThread控制发送报文节奏;2、network_thread发送报文。

  • PacerThread创建
Call::Call
->ProcessThread::Create("PacerThread")//创建pacer平滑线程
->pacer_thread_->RegisterModule(transport_send_->pacer(), RTC_FROM_HERE)//挂载定时调用函数

->PacedSender::TimeUntilNextProcess//按照这里指的的时间,定时调用PacedSender::Process函数
->PacedSender::Process //定时处理函数
  • network_thread创建

       network_thread可以由外部创建,也可以由内部创建。

       外部创建的接口:

CreatePeerConnectionFactoryWithAudioMixer(
    rtc::Thread* network_thread,   //自定义network线程
    rtc::Thread* worker_thread,    //自定义worker线程
    rtc::Thread* signaling_thread, //自定义signaling线程
    AudioDeviceModule* default_adm,
    rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,
    rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,
    cricket::WebRtcVideoEncoderFactory* video_encoder_factory,
    cricket::WebRtcVideoDecoderFactory* video_decoder_factory,
    rtc::scoped_refptr<AudioMixer> audio_mixer)

      内部创建的流程

      在PeerConnectionFactory::PeerConnectionFactory函数实现。

三、视频接收到渲染

  • 创建解码线程

VideoReceiveStream::VideoReceiveStream
->PlatformThread::PlatformThread(&DecodeThreadFunction,this,"DecodingThread",rtc::kHighestPriority)
->VideoReceiveStream::DecodeThreadFunction
->VideoReceiveStream::Decode
  • 创建解码器

解码器是当有rtp报文输入的时候,动态创建的。

->H264DecoderImpl::InitDecode
->VCMGenericDecoder::InitDecode          //初始化解码器
->VCMCodecDataBase::CreateAndInitDecoder //根据PT查找map表,确定解码格式,创建对应解码器
->VCMCodecDataBase::GetDecoder           //每来一包,判断一下视频解码器是否创建,已经创建,用原有的。没有创建,创建新解码器
->VideoReceiver::Decode
->VideoReceiver::Decode
->VideoReceiveStream::Decode             //解码线程读取RTP数据
VideoReceiveStream::DecodeThreadFunction
  • 创建渲染线程

IncomingVideoStream::IncomingVideoStream
->TaskQueue::TaskQueue("IncomingVideoStream", rtc::TaskQueue::Priority::HIGH)//创建渲染任务

IncomingVideoStream::OnFrame
->incoming_render_queue_.PostTask(NewFrameTask)//每解码一帧,直接推YUV数据到渲染队列
  • 创建RTP接收视频流

->RtpVideoStreamReceiver :: RtpVideoStreamReceiver
->VideoReceiveStream :: VideoReceiveStream 
->Call:: CreateVideoReceiveStream 
->WebRtcVideoChannel :: WebRtcVideoReceiveStream :: RecreateWebRtcVideoStream
->WebRtcVideoChannel :: WebRtcVideoReceiveStream :: WebRtcVideoReceiveStream
->WebRtcVideoChannel :: AddRecvStream
->WebRtcVideoChannel :: AddRecvStream
->BaseChannel :: AddRecvStream_w   //创建接收流资源。
->BaseChannel :: UpdateRemoteStreams_w 
VideoChannel :: SetRemoteContent_w  //根据SDP协议,创建接收的音视频、数据报文资源

四、附录

一、RTP接收线程是收到http承载的sdp命令中的m行,根据m行的信息创建的(No FlexFEC)

Received session description :{
   "sdp" : "v=0\r\no=- 3138862463696765007 2 IN IP4 127.0.0.1\r\n
            s=-\r\nt=0 0\r\n
			a=group:BUNDLE audio video\r\n
			a=msid-semantic: WMS stream_label\r\n
			m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126\r\n
			c=IN IP4 0.0.0.0\r\n
			a=rtcp:9 IN IP4 0.0.0.0\r\n
			a=ice-ufrag:xxx\r\n
			a=ice-pwd:xxxx\r\n
			a=ice-options:trickle\r\n
			a=fingerprint:sha-256 xxxx\r\n
			a=setup:active\r\n
			a=mid:audio\r\n
			a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n
			a=sendrecv\r\n
			a=rtcp-mux\r\n
			a=rtpmap:111 opus/48000/2\r\n
			a=rtcp-fb:111 transport-cc\r\n
			a=fmtp:111 minptime=10;useinbandfec=1\r\n
			a=rtpmap:103 ISAC/16000\r\n
			a=rtpmap:104 ISAC/32000\r\n
			a=rtpmap:9 G722/8000\r\n
			a=rtpmap:102 ILBC/8000\r\n
			a=rtpmap:0 PCMU/8000\r\n
			a=rtpmap:8 PCMA/8000\r\n
			a=rtpmap:106 CN/32000\r\n
			a=rtpmap:105 CN/16000\r\n
			a=rtpmap:13 CN/8000\r\n
			a=rtpmap:110 telephone-event/48000\r\n
			a=rtpmap:112 telephone-event/32000\r\n
			a=rtpmap:113 telephone-event/16000\r\n
			a=rtpmap:126 telephone-event/8000\r\n
			a=ssrc:1737881718 cname:xxxx\r\n
			a=ssrc:1737881718 msid:stream_label audio_label\r\n
			a=ssrc:1737881718 mslabel:stream_label\r\n
			a=ssrc:1737881718 label:audio_label\r\n
			m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 124 125\r\n
			c=IN IP4 0.0.0.0\r\n
			a=rtcp:9 IN IP4 0.0.0.0\r\n
			a=ice-ufrag:xxxx\r\n
			a=ice-pwd:+xxxx\r\n
			a=ice-options:trickle\r\n
			a=fingerprint:sha-256 xxxx\r\n
			a=setup:active\r\n
			a=mid:video\r\n
			a=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\n
			a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n
			a=extmap:4 urn:3gpp:video-orientation\r\n
			a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n
			a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\n
			a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\n
			a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\n
			a=sendrecv\r\n
			a=rtcp-mux\r\n
			a=rtcp-rsize\r\n
			a=rtpmap:96 H264/90000\r\n
			a=rtcp-fb:96 ccm fir\r\n
			a=rtcp-fb:96 nack\r\n
			a=rtcp-fb:96 nack pli\r\n
			a=rtcp-fb:96 goog-remb\r\n
			a=rtcp-fb:96 transport-cc\r\n
			a=fmtp:96 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\n
			a=rtpmap:97 rtx/90000\r\n
			a=fmtp:97 apt=96\r\n
			a=rtpmap:98 VP8/90000\r\n
			a=rtcp-fb:98 ccm fir\r\n
			a=rtcp-fb:98 nack\r\n
			a=rtcp-fb:98 nack pli\r\n
			a=rtcp-fb:98 goog-remb\r\n
			a=rtcp-fb:98 transport-cc\r\n
			a=rtpmap:99 rtx/90000\r\n
			a=fmtp:99 apt=98\r\n
			a=rtpmap:100 VP9/90000\r\n
			a=rtcp-fb:100 ccm fir\r\n
			a=rtcp-fb:100 nack\r\n
			a=rtcp-fb:100 nack pli\r\n
			a=rtcp-fb:100 goog-remb\r\n
			a=rtcp-fb:100 transport-cc\r\n
			a=rtpmap:101 rtx/90000\r\n
			a=fmtp:101 apt=100\r\n
			a=rtpmap:127 red/90000\r\n
			a=rtpmap:124 rtx/90000\r\n
			a=fmtp:124 apt=127\r\n
			a=rtpmap:125 ulpfec/90000\r\n
			a=ssrc-group:FID 489266959 3672397520\r\n
			a=ssrc:489266959 cname:xxxx\r\n
			a=ssrc:489266959 msid:stream_label 1111\r\n
			a=ssrc:489266959 mslabel:stream_label\r\n
			a=ssrc:489266959 label:1111\r\n
			a=ssrc:3672397520 cname:xxxx\r\n
			a=ssrc:3672397520 msid:stream_label 1111\r\n
			a=ssrc:3672397520 mslabel:stream_label\r\n
			a=ssrc:3672397520 label:1111\r\n
			a=ssrc-group:FID 3677845131 3184560832\r\n
			a=ssrc:3677845131 cname:xxxx\r\n
			a=ssrc:3677845131 msid:stream_label 2222\r\n
			a=ssrc:3677845131 mslabel:stream_label\r\n
			a=ssrc:3677845131 label:2222\r\n
			a=ssrc:3184560832 cname:xxxx\r\n
			a=ssrc:3184560832 msid:stream_label 2222\r\n
			a=ssrc:3184560832 mslabel:stream_label\r\n
			a=ssrc:3184560832 label:2222\r\n",
   "type" : "answer"
}

with FlexFEC offer

Received session description :{
   "sdp" : "v=0\r\n
   o=- 9188610095201803893 2 IN IP4 127.0.0.1\r\n
   s=-\r\nt=0 0\r\n
   a=group:BUNDLE 0 1\r\n
   a=extmap-allow-mixed\r\n
   a=msid-semantic: WMS stream_id\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\n
   a=rtcp:9 IN IP4 0.0.0.0\r\n
   a=ice-ufrag:r616\r\n
   a=ice-pwd:xxxxxxxxx\r\n
   a=ice-options:trickle\r\n
   a=fingerprint:sha-256 25:54:81:11:9C:EA:26:64:CB\r\n
   a=setup:actpass\r\n
   a=mid:0\r\n
   a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n
   a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n
   a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n
   a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\n
   a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\n
   a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\n
   a=sendrecv\r\n
   a=msid:stream_id audio_label\r\n
   a=rtcp-mux\r\n
   a=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\n
   a=fmtp:111 minptime=10;useinbandfec=1\r\n
   a=rtpmap:103 ISAC/16000\r\n
   a=rtpmap:104 ISAC/32000\r\n
   a=rtpmap:9 G722/8000\r\n
   a=rtpmap:102 ILBC/8000\r\n
   a=rtpmap:0 PCMU/8000\r\n
   a=rtpmap:8 PCMA/8000\r\n
   a=rtpmap:106 CN/32000\r\n
   a=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\n
   a=rtpmap:110 telephone-event/48000\r\n
   a=rtpmap:112 telephone-event/32000\r\n
   a=rtpmap:113 telephone-event/16000\r\n
   a=rtpmap:126 telephone-event/8000\r\n
   a=ssrc:2282106407 cname:XXXX+YYY\r\n
   a=ssrc:2282106407 msid:stream_id audio_label\r\n
   a=ssrc:2282106407 mslabel:stream_id\r\n
   a=ssrc:2282106407 label:audio_label\r\nm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 120 125 119 124 107 108 109 35 36 123 118 122 37\r\n
   c=IN IP4 0.0.0.0\r\n
   a=rtcp:9 IN IP4 0.0.0.0\r\n
   a=ice-ufrag:r616\r\n
   a=ice-pwd:xxxxxxx\r\n
   a=ice-options:trickle\r\n
   a=fingerprint:sha-256 25:54:81:11:9C:EA:26:\r\n
   a=setup:actpass\r\n
   a=mid:1\r\n
   a=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r\n
   a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n
   a=extmap:13 urn:3gpp:video-orientation\r\n
   a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n
   a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\n
   a=extmap:11 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\n
   a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\n
   a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r\n
   a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\n
   a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\n
   a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\n
   a=sendrecv\r\na=msid:stream_id video_label\r\n
   a=rtcp-mux\r\na=rtcp-rsize\r\n
   a=rtpmap:96 VP8/90000\r\na=rtcp-fb:96 goog-remb\r\n
   a=rtcp-fb:96 transport-cc\r\n
   a=rtcp-fb:96 ccm fir\r\n
   a=rtcp-fb:96 nack\r\n
   a=rtcp-fb:96 nack pli\r\n
   a=rtpmap:97 rtx/90000\r\n
   a=fmtp:97 apt=96\r\n
   a=rtpmap:98 VP9/90000\r\n
   a=rtcp-fb:98 goog-remb\r\n
   a=rtcp-fb:98 transport-cc\r\n
   a=rtcp-fb:98 ccm fir\r\n
   a=rtcp-fb:98 nack\r\n
   a=rtcp-fb:98 nack pli\r\n
   a=fmtp:98 profile-id=0\r\n
   a=rtpmap:99 rtx/90000\r\n
   a=fmtp:99 apt=98\r\n
   a=rtpmap:100 VP9/90000\r\n
   a=rtcp-fb:100 goog-remb\r\n
   a=rtcp-fb:100 transport-cc\r\n
   a=rtcp-fb:100 ccm fir\r\n
   a=rtcp-fb:100 nack\r\n
   a=rtcp-fb:100 nack pli\r\n
   a=fmtp:100 profile-id=2\r\n
   a=rtpmap:101 rtx/90000\r\n
   a=fmtp:101 apt=100\r\n
   a=rtpmap:127 H264/90000\r\n
   a=rtcp-fb:127 goog-remb\r\n
   a=rtcp-fb:127 transport-cc\r\n
   a=rtcp-fb:127 ccm fir\r\n
   a=rtcp-fb:127 nack\r\n
   a=rtcp-fb:127 nack pli\r\n
   a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\r\n
   a=rtpmap:120 rtx/90000\r\n
   a=fmtp:120 apt=127\r\n
   a=rtpmap:125 H264/90000\r\n
   a=rtcp-fb:125 goog-remb\r\n
   a=rtcp-fb:125 transport-cc\r\n
   a=rtcp-fb:125 ccm fir\r\n
   a=rtcp-fb:125 nack\r\n
   a=rtcp-fb:125 nack pli\r\n
   a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f\r\n
   a=rtpmap:119 rtx/90000\r\n
   a=fmtp:119 apt=125\r\na=rtpmap:124 H264/90000\r\n
   a=rtcp-fb:124 goog-remb\r\n
   a=rtcp-fb:124 transport-cc\r\n
   a=rtcp-fb:124 ccm fir\r\n
   a=rtcp-fb:124 nack\r\na=rtcp-fb:124 nack pli\r\n
   a=fmtp:124 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\n
   a=rtpmap:107 rtx/90000\r\n
   a=fmtp:107 apt=124\r\n
   a=rtpmap:108 H264/90000\r\n
   a=rtcp-fb:108 goog-remb\r\n
   a=rtcp-fb:108 transport-cc\r\n
   a=rtcp-fb:108 ccm fir\r\n
   a=rtcp-fb:108 nack\r\n
   a=rtcp-fb:108 nack pli\r\n
   a=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f\r\n
   a=rtpmap:109 rtx/90000\r\n
   a=fmtp:109 apt=108\r\n
   a=rtpmap:35 AV1X/90000\r\n
   a=rtcp-fb:35 goog-remb\r\n
   a=rtcp-fb:35 transport-cc\r\n
   a=rtcp-fb:35 ccm fir\r\n
   a=rtcp-fb:35 nack\r\n
   a=rtcp-fb:35 nack pli\r\n
   a=rtpmap:36 rtx/90000\r\n
   a=fmtp:36 apt=35\r\n
   a=rtpmap:123 red/90000\r\n
   a=rtpmap:118 rtx/90000\r\n
   a=fmtp:118 apt=123\r\n
   a=rtpmap:122 ulpfec/90000\r\n
   a=rtpmap:37 flexfec-03/90000\r\n
   a=rtcp-fb:37 goog-remb\r\n
   a=rtcp-fb:37 transport-cc\r\n
   a=fmtp:37 repair-window=10000000\r\n
   a=ssrc-group:FID 3993610102 1758227274\r\n
   a=ssrc-group:FEC-FR 3993610102 2991490316\r\n
   a=ssrc:3993610102 cname:XXXX+YYY\r\n
   a=ssrc:3993610102 msid:stream_id video_label\r\n
   a=ssrc:3993610102 mslabel:stream_id\r\n
   a=ssrc:3993610102 label:video_label\r\n
   a=ssrc:1758227274 cname:XXXX+YYY\r\n
   a=ssrc:1758227274 msid:stream_id video_label\r\n
   a=ssrc:1758227274 mslabel:stream_id\r\n
   a=ssrc:1758227274 label:video_label\r\n
   a=ssrc:2991490316 cname:XXXX+YYY\r\n
   a=ssrc:2991490316 msid:stream_id video_label\r\n
   a=ssrc:2991490316 mslabel:stream_id\r\n
   a=ssrc:2991490316 label:video_label\r\n",
   "type" : "offer"
}

answer

Received session description :{
   "sdp" : "v=0\r\n
   o=- 4522807614768766421 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n
   a=group:BUNDLE 0 1\r\n
   a=extmap-allow-mixed\r\n
   a=msid-semantic: WMS stream_id\r\n
   m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\n
   a=rtcp:9 IN IP4 0.0.0.0\r\n
   a=ice-ufrag:Ge5w\r\n
   a=ice-pwd:xxxx\r\n
   a=ice-options:trickle\r\n
   a=fingerprint:sha-256 35:E9:97:17:A3:49:41:BB:E5:93:88:BD:DB\r\n
   a=setup:active\r\n
   a=mid:0\r\n
   a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n
   a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n
   a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n
   a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\n
   a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\n
   a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\n
   a=sendrecv\r\n
   a=msid:stream_id audio_label\r\n
   a=rtcp-mux\r\n
   a=rtpmap:111 opus/48000/2\r\n
   a=rtcp-fb:111 transport-cc\r\n
   a=fmtp:111 minptime=10;useinbandfec=1\r\n
   a=rtpmap:103 ISAC/16000\r\n
   a=rtpmap:104 ISAC/32000\r\n
   a=rtpmap:9 G722/8000\r\n
   a=rtpmap:102 ILBC/8000\r\n
   a=rtpmap:0 PCMU/8000\r\n
   a=rtpmap:8 PCMA/8000\r\n
   a=rtpmap:106 CN/32000\r\n
   a=rtpmap:105 CN/16000\r\n
   a=rtpmap:13 CN/8000\r\n
   a=rtpmap:110 telephone-event/48000\r\n
   a=rtpmap:112 telephone-event/32000\r\n
   a=rtpmap:113 telephone-event/16000\r\n
   a=rtpmap:126 telephone-event/8000\r\n
   a=ssrc:1457010661 cname:11111\r\nm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 120 125 119 124 107 108 109 35 36 123 118 122 37\r\nc=IN IP4 0.0.0.0\r\n
   a=rtcp:9 IN IP4 0.0.0.0\r\n
   a=ice-ufrag:Ge5w\r\n
   a=ice-pwd:xxxx\r\n
   a=ice-options:trickle\r\n
   a=fingerprint:sha-256 35:E9:97:17:A3:49:41:BB:E5:93:88:BD:DB\r\n
   a=setup:active\r\n
   a=mid:1\r\n
   a=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r\n
   a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n
   a=extmap:13 urn:3gpp:video-orientation\r\n
   a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n
   a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\n
   a=extmap:11 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\n
   a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\n
   a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r\n
   a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\n
   a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\n
   a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\n
   a=sendrecv\r\n
   a=msid:stream_id video_label\r\n
   a=rtcp-mux\r\n
   a=rtcp-rsize\r\n
   a=rtpmap:96 VP8/90000\r\n
   a=rtcp-fb:96 goog-remb\r\n
   a=rtcp-fb:96 transport-cc\r\n
   a=rtcp-fb:96 ccm fir\r\n
   a=rtcp-fb:96 nack\r\n
   a=rtcp-fb:96 nack pli\r\n
   a=rtpmap:97 rtx/90000\r\n
   a=fmtp:97 apt=96\r\n
   a=rtpmap:98 VP9/90000\r\n
   a=rtcp-fb:98 goog-remb\r\n
   a=rtcp-fb:98 transport-cc\r\n
   a=rtcp-fb:98 ccm fir\r\n
   a=rtcp-fb:98 nack\r\n
   a=rtcp-fb:98 nack pli\r\n
   a=fmtp:98 profile-id=0\r\n
   a=rtpmap:99 rtx/90000\r\n
   a=fmtp:99 apt=98\r\n
   a=rtpmap:100 VP9/90000\r\n
   a=rtcp-fb:100 goog-remb\r\n
   a=rtcp-fb:100 transport-cc\r\n
   a=rtcp-fb:100 ccm fir\r\n
   a=rtcp-fb:100 nack\r\n
   a=rtcp-fb:100 nack pli\r\n
   a=fmtp:100 profile-id=2\r\n
   a=rtpmap:101 rtx/90000\r\n
   a=fmtp:101 apt=100\r\n
   a=rtpmap:127 H264/90000\r\n
   a=rtcp-fb:127 goog-remb\r\n
   a=rtcp-fb:127 transport-cc\r\n
   a=rtcp-fb:127 ccm fir\r\n
   a=rtcp-fb:127 nack\r\n
   a=rtcp-fb:127 nack pli\r\n
   a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\r\n
   a=rtpmap:120 rtx/90000\r\n
   a=fmtp:120 apt=127\r\n
   a=rtpmap:125 H264/90000\r\n
   a=rtcp-fb:125 goog-remb\r\n
   a=rtcp-fb:125 transport-cc\r\n
   a=rtcp-fb:125 ccm fir\r\n
   a=rtcp-fb:125 nack\r\n
   a=rtcp-fb:125 nack pli\r\n
   a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f\r\n
   a=rtpmap:119 rtx/90000\r\n
   a=fmtp:119 apt=125\r\n
   a=rtpmap:124 H264/90000\r\n
   a=rtcp-fb:124 goog-remb\r\n
   a=rtcp-fb:124 transport-cc\r\n
   a=rtcp-fb:124 ccm fir\r\n
   a=rtcp-fb:124 nack\r\n
   a=rtcp-fb:124 nack pli\r\n
   a=fmtp:124 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\n
   a=rtpmap:107 rtx/90000\r\n
   a=fmtp:107 apt=124\r\n
   a=rtpmap:108 H264/90000\r\n
   a=rtcp-fb:108 goog-remb\r\n
   a=rtcp-fb:108 transport-cc\r\n
   a=rtcp-fb:108 ccm fir\r\n
   a=rtcp-fb:108 nack\r\n
   a=rtcp-fb:108 nack pli\r\n
   a=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f\r\n
   a=rtpmap:109 rtx/90000\r\n
   a=fmtp:109 apt=108\r\n
   a=rtpmap:35 AV1X/90000\r\n
   a=rtcp-fb:35 goog-remb\r\n
   a=rtcp-fb:35 transport-cc\r\n
   a=rtcp-fb:35 ccm fir\r\n
   a=rtcp-fb:35 nack\r\n
   a=rtcp-fb:35 nack pli\r\n
   a=rtpmap:36 rtx/90000\r\n
   a=fmtp:36 apt=35\r\n
   a=rtpmap:123 red/90000\r\n
   a=rtpmap:118 rtx/90000\r\n
   a=fmtp:118 apt=123\r\n
   a=rtpmap:122 ulpfec/90000\r\n
   a=rtpmap:37 flexfec-03/90000\r\n
   a=rtcp-fb:37 goog-remb\r\n
   a=rtcp-fb:37 transport-cc\r\n
   a=fmtp:37 repair-window=10000000\r\n
   a=ssrc-group:FID 3065035168 2865392491\r\n
   a=ssrc-group:FEC-FR 3065035168 3327703901\r\n
   a=ssrc:3065035168 cname:11111\r\n
   a=ssrc:2865392491 cname:11111\r\n
   a=ssrc:3327703901 cname:11111\r\n",
   "type" : "answer"
}

ssrc-group:FID是svc编码时,分层svc的ssrc值。

ssrc-group:FEC-FR是flexfec编码时,冗余报文的ssrc值

StreamParams::GenerateSsrcs:

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值