mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
[fix] fix timestamp in congestion control feedback
This commit is contained in:
@@ -430,15 +430,6 @@ void RtpVideoReceiver::SendCombinedRtcpPacket(
|
||||
|
||||
RTCPSender rtcp_sender(
|
||||
[this](const uint8_t* buffer, size_t size) -> int {
|
||||
webrtc::rtcp::CommonHeader rtcp_block;
|
||||
// bool valid = true;
|
||||
// if (!rtcp_block.Parse(buffer, size)) {
|
||||
// valid = false;
|
||||
// }
|
||||
|
||||
webrtc::rtcp::CongestionControlFeedback feedback;
|
||||
feedback.Parse(rtcp_block);
|
||||
|
||||
return data_send_func_((const char*)buffer, size);
|
||||
},
|
||||
1200);
|
||||
|
||||
@@ -82,11 +82,12 @@ int VideoChannelSend::SendVideo(char* data, size_t size) {
|
||||
}
|
||||
|
||||
void VideoChannelSend::OnCongestionControlFeedback(
|
||||
int64_t recv_ts, const webrtc::rtcp::CongestionControlFeedback& feedback) {
|
||||
Timestamp recv_ts,
|
||||
const webrtc::rtcp::CongestionControlFeedback& feedback) {
|
||||
++feedback_count_;
|
||||
std::optional<webrtc::TransportPacketsFeedback> feedback_msg =
|
||||
transport_feedback_adapter_.ProcessCongestionControlFeedback(
|
||||
feedback, webrtc::Timestamp::Micros(recv_ts));
|
||||
transport_feedback_adapter_.ProcessCongestionControlFeedback(feedback,
|
||||
recv_ts);
|
||||
if (feedback_msg) {
|
||||
HandleTransportPacketsFeedback(*feedback_msg);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#define _VIDEO_CHANNEL_SEND_H_
|
||||
|
||||
#include "api/transport/network_types.h"
|
||||
#include "api/units/timestamp.h"
|
||||
#include "clock.h"
|
||||
#include "congestion_control.h"
|
||||
#include "congestion_control_feedback.h"
|
||||
@@ -32,7 +33,8 @@ class VideoChannelSend {
|
||||
int SendVideo(char* data, size_t size);
|
||||
|
||||
void OnCongestionControlFeedback(
|
||||
int64_t recv_ts, const webrtc::rtcp::CongestionControlFeedback& feedback);
|
||||
Timestamp recv_ts,
|
||||
const webrtc::rtcp::CongestionControlFeedback& feedback);
|
||||
|
||||
void HandleTransportPacketsFeedback(
|
||||
const webrtc::TransportPacketsFeedback& feedback);
|
||||
|
||||
Reference in New Issue
Block a user