mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 12:45:35 +08:00
[fix] fix crash due to unsupported bitrate limits
This commit is contained in:
@@ -30,11 +30,6 @@ class VideoChannelSend {
|
||||
on_sent_packet_func_);
|
||||
~VideoChannelSend();
|
||||
|
||||
void SetEnqueuePacketsFunc(
|
||||
std::function<
|
||||
void(std::vector<std::unique_ptr<webrtc::RtpPacketToSend>>&)>
|
||||
enqueue_packets_func);
|
||||
|
||||
void OnSentRtpPacket(std::unique_ptr<webrtc::RtpPacketToSend> packet);
|
||||
|
||||
void OnReceiveNack(const std::vector<uint16_t>& nack_sequence_numbers);
|
||||
@@ -46,18 +41,20 @@ class VideoChannelSend {
|
||||
void Initialize(rtp::PAYLOAD_TYPE payload_type);
|
||||
void Destroy();
|
||||
|
||||
uint32_t GetSsrc() {
|
||||
if (rtp_video_sender_) {
|
||||
return rtp_video_sender_->GetSsrc();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
uint32_t GetSsrc() { return ssrc_; }
|
||||
|
||||
uint32_t GetRtxSsrc() { return rtx_ssrc_; }
|
||||
|
||||
int SendVideo(const EncodedFrame& encoded_frame);
|
||||
|
||||
void OnReceiverReport(const ReceiverReport& receiver_report) {
|
||||
if (rtp_video_sender_) {
|
||||
rtp_video_sender_->OnReceiverReport(receiver_report);
|
||||
std::vector<RtcpReportBlock> reports = receiver_report.GetReportBlocks();
|
||||
for (auto r : reports) {
|
||||
LOG_WARN(
|
||||
"r_ssrc [{}], f_lost [{}], c_lost [{}], h_seq [{}], jitter [{}], "
|
||||
"lsr [{}], dlsr [{}] ",
|
||||
r.SourceSsrc(), r.FractionLost() / 255.0, r.CumulativeLost(),
|
||||
r.ExtendedHighSeqNum(), r.Jitter(), r.LastSr(), r.DelaySinceLastSr());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,12 +66,13 @@ class VideoChannelSend {
|
||||
std::shared_ptr<IceAgent> ice_agent_ = nullptr;
|
||||
std::shared_ptr<IOStatistics> ice_io_statistics_ = nullptr;
|
||||
std::unique_ptr<RtpPacketizer> rtp_packetizer_ = nullptr;
|
||||
std::unique_ptr<RtpVideoSender> rtp_video_sender_ = nullptr;
|
||||
|
||||
std::function<void(const webrtc::RtpPacketToSend& packet)>
|
||||
on_sent_packet_func_ = nullptr;
|
||||
|
||||
private:
|
||||
uint32_t ssrc_ = 0;
|
||||
uint32_t rtx_ssrc_ = 0;
|
||||
std::shared_ptr<SystemClock> clock_;
|
||||
RtpPacketHistory rtp_packet_history_;
|
||||
int64_t delta_ntp_internal_ms_;
|
||||
|
||||
Reference in New Issue
Block a user