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

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

Issue 1369263002: Unify Transport and newapi::Transport interfaces. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: self-review 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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 if (!PrepareAndSendPacket(data_buffer, length, capture_time_ms, 728 if (!PrepareAndSendPacket(data_buffer, length, capture_time_ms,
729 (rtx & kRtxRetransmitted) > 0, true)) { 729 (rtx & kRtxRetransmitted) > 0, true)) {
730 return -1; 730 return -1;
731 } 731 }
732 return static_cast<int32_t>(length); 732 return static_cast<int32_t>(length);
733 } 733 }
734 734
735 bool RTPSender::SendPacketToNetwork(const uint8_t *packet, size_t size) { 735 bool RTPSender::SendPacketToNetwork(const uint8_t *packet, size_t size) {
736 int bytes_sent = -1; 736 int bytes_sent = -1;
737 if (transport_) { 737 if (transport_) {
738 bytes_sent = transport_->SendPacket(packet, size); 738 bytes_sent =
739 transport_->SendRtp(packet, size) ? static_cast<int>(size) : -1;
739 } 740 }
740 TRACE_EVENT_INSTANT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), 741 TRACE_EVENT_INSTANT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"),
741 "RTPSender::SendPacketToNetwork", "size", size, "sent", 742 "RTPSender::SendPacketToNetwork", "size", size, "sent",
742 bytes_sent); 743 bytes_sent);
743 // TODO(pwestin): Add a separate bitrate for sent bitrate after pacer. 744 // TODO(pwestin): Add a separate bitrate for sent bitrate after pacer.
744 if (bytes_sent <= 0) { 745 if (bytes_sent <= 0) {
745 LOG(LS_WARNING) << "Transport failed to send packet"; 746 LOG(LS_WARNING) << "Transport failed to send packet";
746 return false; 747 return false;
747 } 748 }
748 return true; 749 return true;
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1900 CriticalSectionScoped lock(send_critsect_.get()); 1901 CriticalSectionScoped lock(send_critsect_.get());
1901 1902
1902 RtpState state; 1903 RtpState state;
1903 state.sequence_number = sequence_number_rtx_; 1904 state.sequence_number = sequence_number_rtx_;
1904 state.start_timestamp = start_timestamp_; 1905 state.start_timestamp = start_timestamp_;
1905 1906
1906 return state; 1907 return state;
1907 } 1908 }
1908 1909
1909 } // namespace webrtc 1910 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698