OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 PacketOptions options; | 665 PacketOptions options; |
666 if (using_transport_seq) { | 666 if (using_transport_seq) { |
667 options.packet_id = | 667 options.packet_id = |
668 UpdateTransportSequenceNumber(padding_packet, length, rtp_header); | 668 UpdateTransportSequenceNumber(padding_packet, length, rtp_header); |
669 } | 669 } |
670 | 670 |
671 if (!SendPacketToNetwork(padding_packet, length, options)) | 671 if (!SendPacketToNetwork(padding_packet, length, options)) |
672 break; | 672 break; |
673 | 673 |
674 if (using_transport_seq && transport_feedback_observer_) { | 674 if (using_transport_seq && transport_feedback_observer_) { |
675 transport_feedback_observer_->OnPacketSent(PacketInfo( | 675 transport_feedback_observer_->OnSentPacket( |
676 0, now_ms, options.packet_id, length, true)); | 676 PacketInfo(0, now_ms, options.packet_id, length, true)); |
677 } | 677 } |
678 | 678 |
679 bytes_sent += padding_bytes_in_packet; | 679 bytes_sent += padding_bytes_in_packet; |
680 UpdateRtpStats(padding_packet, length, rtp_header, over_rtx, false); | 680 UpdateRtpStats(padding_packet, length, rtp_header, over_rtx, false); |
681 } | 681 } |
682 | 682 |
683 return bytes_sent; | 683 return bytes_sent; |
684 } | 684 } |
685 | 685 |
686 void RTPSender::SetStorePacketsStatus(bool enable, uint16_t number_to_store) { | 686 void RTPSender::SetStorePacketsStatus(bool enable, uint16_t number_to_store) { |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 options.packet_id = | 929 options.packet_id = |
930 UpdateTransportSequenceNumber(buffer_to_send_ptr, length, rtp_header); | 930 UpdateTransportSequenceNumber(buffer_to_send_ptr, length, rtp_header); |
931 } | 931 } |
932 | 932 |
933 bool ret = SendPacketToNetwork(buffer_to_send_ptr, length, options); | 933 bool ret = SendPacketToNetwork(buffer_to_send_ptr, length, options); |
934 if (ret) { | 934 if (ret) { |
935 CriticalSectionScoped lock(send_critsect_.get()); | 935 CriticalSectionScoped lock(send_critsect_.get()); |
936 media_has_been_sent_ = true; | 936 media_has_been_sent_ = true; |
937 } | 937 } |
938 if (using_transport_seq && transport_feedback_observer_) { | 938 if (using_transport_seq && transport_feedback_observer_) { |
939 transport_feedback_observer_->OnPacketSent( | 939 transport_feedback_observer_->OnSentPacket( |
940 PacketInfo(0, now_ms, options.packet_id, length, true)); | 940 PacketInfo(0, now_ms, options.packet_id, length, true)); |
941 } | 941 } |
942 UpdateRtpStats(buffer_to_send_ptr, length, rtp_header, send_over_rtx, | 942 UpdateRtpStats(buffer_to_send_ptr, length, rtp_header, send_over_rtx, |
943 is_retransmit); | 943 is_retransmit); |
944 return ret; | 944 return ret; |
945 } | 945 } |
946 | 946 |
947 void RTPSender::UpdateRtpStats(const uint8_t* buffer, | 947 void RTPSender::UpdateRtpStats(const uint8_t* buffer, |
948 size_t packet_length, | 948 size_t packet_length, |
949 const RTPHeader& header, | 949 const RTPHeader& header, |
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1904 CriticalSectionScoped lock(send_critsect_.get()); | 1904 CriticalSectionScoped lock(send_critsect_.get()); |
1905 | 1905 |
1906 RtpState state; | 1906 RtpState state; |
1907 state.sequence_number = sequence_number_rtx_; | 1907 state.sequence_number = sequence_number_rtx_; |
1908 state.start_timestamp = start_timestamp_; | 1908 state.start_timestamp = start_timestamp_; |
1909 | 1909 |
1910 return state; | 1910 return state; |
1911 } | 1911 } |
1912 | 1912 |
1913 } // namespace webrtc | 1913 } // namespace webrtc |
OLD | NEW |