Skip to content

Instantly share code, notes, and snippets.

@nareix
Last active December 17, 2018 08:53
Show Gist options
  • Save nareix/78e45449cf5718bfa2c2d778cb5a53cf to your computer and use it in GitHub Desktop.
Save nareix/78e45449cf5718bfa2c2d778cb5a53cf to your computer and use it in GitHub Desktop.
webrtc VideoSendStream/VideoReceiveStream procedure
VideoSendStream
VideoSendStreamImpl::VideoSendStreamImpl
video_stream_encoder_->SetSink register VideoSendStreamImpl::OnEncodedImage callback (output)
VideoSendStream::SetSource
video_stream_encoder_->SetSource(source, degradation_preference);
register rtc::VideoSourceInterface<VideoFrame>* source (input)
VideoStreamEncoder procedure
OnFrame: encoder_queue_.PostTask(EncodeTask)
in task: EncodeVideoFrame() video_sender_.AddVideoFrame(frame)
call encoder, do encode and callback OnEncodedImage
VideoSendStream
OnEncodedImage callback: -> ... -> PacedSender::InsertPacket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment