@@ -10,16 +10,16 @@ namespace owt {
1010namespace wasm {
1111
1212RtpVideoReceiver::RtpVideoReceiver (
13+ webrtc::TaskQueueBase* current_queue,
1314 webrtc::Transport* transport,
1415 const webrtc::VideoReceiveStream::Config* config,
1516 webrtc::ReceiveStatistics* rtp_receive_statistics,
16- webrtc::ProcessThread* process_thread,
17- webrtc::NackSender* nack_sender)
17+ webrtc::ProcessThread* process_thread)
1818 : receiver_(nullptr ), complete_frame_callback_(emscripten::val::null()) {
1919 receiver_ = std::make_unique<webrtc::RtpVideoStreamReceiver2>(
20- nullptr , webrtc::Clock::GetRealTimeClock (), transport, nullptr , nullptr ,
21- config, rtp_receive_statistics, nullptr , nullptr , process_thread,
22- nack_sender , nullptr , this , nullptr , nullptr );
20+ current_queue , webrtc::Clock::GetRealTimeClock (), transport, nullptr ,
21+ nullptr , config, rtp_receive_statistics, nullptr , nullptr , process_thread,
22+ this , nullptr , this , nullptr , nullptr );
2323 webrtc::VideoCodec codec;
2424 codec.codecType = webrtc::VideoCodecType::kVideoCodecH264 ;
2525 // TODO: Assign payload value dynamically according to server side
@@ -53,5 +53,14 @@ void RtpVideoReceiver::SetCompleteFrameCallback(emscripten::val callback) {
5353 complete_frame_callback_ = callback;
5454}
5555
56+ void RtpVideoReceiver::SendNack (const std::vector<uint16_t >& sequence_numbers,
57+ bool buffering_allowed) {
58+ // Only buffering_allowed == true is supported. Same as
59+ // https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/video/video_receive_stream2.h;l=157;bpv=1;bpt=1
60+ RTC_DCHECK (buffering_allowed);
61+ RTC_LOG (LS_INFO)<<" Request packet rtx" ;
62+ receiver_->RequestPacketRetransmit (sequence_numbers);
63+ }
64+
5665} // namespace wasm
5766} // namespace owt
0 commit comments