Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(743)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.cc

Issue 1363573002: Wire up transport sequence number / send time callbacks to webrtc via libjingle. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add missing updated_options Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 options.packet_id = 927 options.packet_id =
928 UpdateTransportSequenceNumber(buffer_to_send_ptr, length, rtp_header); 928 UpdateTransportSequenceNumber(buffer_to_send_ptr, length, rtp_header);
929 } 929 }
930 930
931 bool ret = SendPacketToNetwork(buffer_to_send_ptr, length, options); 931 bool ret = SendPacketToNetwork(buffer_to_send_ptr, length, options);
932 if (ret) { 932 if (ret) {
933 CriticalSectionScoped lock(send_critsect_.get()); 933 CriticalSectionScoped lock(send_critsect_.get());
934 media_has_been_sent_ = true; 934 media_has_been_sent_ = true;
935 } 935 }
936 if (using_transport_seq && transport_feedback_observer_) { 936 if (using_transport_seq && transport_feedback_observer_) {
937 transport_feedback_observer_->OnPacketSent( 937 transport_feedback_observer_->OnSentPacket(
938 PacketInfo(0, now_ms, options.packet_id, length, true)); 938 PacketInfo(0, now_ms, options.packet_id, length, true));
939 } 939 }
940 UpdateRtpStats(buffer_to_send_ptr, length, rtp_header, send_over_rtx, 940 UpdateRtpStats(buffer_to_send_ptr, length, rtp_header, send_over_rtx,
941 is_retransmit); 941 is_retransmit);
942 return ret; 942 return ret;
943 } 943 }
944 944
945 void RTPSender::UpdateRtpStats(const uint8_t* buffer, 945 void RTPSender::UpdateRtpStats(const uint8_t* buffer,
946 size_t packet_length, 946 size_t packet_length,
947 const RTPHeader& header, 947 const RTPHeader& header,
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 CriticalSectionScoped lock(send_critsect_.get()); 1891 CriticalSectionScoped lock(send_critsect_.get());
1892 1892
1893 RtpState state; 1893 RtpState state;
1894 state.sequence_number = sequence_number_rtx_; 1894 state.sequence_number = sequence_number_rtx_;
1895 state.start_timestamp = start_timestamp_; 1895 state.start_timestamp = start_timestamp_;
1896 1896
1897 return state; 1897 return state;
1898 } 1898 }
1899 1899
1900 } // namespace webrtc 1900 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698