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

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

Issue 2131913003: Revert of Refactor NACK bitrate allocation (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 5 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 transport_feedback_callback(nullptr), 56 transport_feedback_callback(nullptr),
57 rtt_stats(nullptr), 57 rtt_stats(nullptr),
58 rtcp_packet_type_counter_observer(nullptr), 58 rtcp_packet_type_counter_observer(nullptr),
59 remote_bitrate_estimator(nullptr), 59 remote_bitrate_estimator(nullptr),
60 paced_sender(nullptr), 60 paced_sender(nullptr),
61 transport_sequence_number_allocator(nullptr), 61 transport_sequence_number_allocator(nullptr),
62 send_bitrate_observer(nullptr), 62 send_bitrate_observer(nullptr),
63 send_frame_count_observer(nullptr), 63 send_frame_count_observer(nullptr),
64 send_side_delay_observer(nullptr), 64 send_side_delay_observer(nullptr),
65 event_log(nullptr), 65 event_log(nullptr),
66 send_packet_observer(nullptr), 66 send_packet_observer(nullptr) {}
67 retransmission_rate_limiter(nullptr) {}
68 67
69 RtpRtcp* RtpRtcp::CreateRtpRtcp(const RtpRtcp::Configuration& configuration) { 68 RtpRtcp* RtpRtcp::CreateRtpRtcp(const RtpRtcp::Configuration& configuration) {
70 if (configuration.clock) { 69 if (configuration.clock) {
71 return new ModuleRtpRtcpImpl(configuration); 70 return new ModuleRtpRtcpImpl(configuration);
72 } else { 71 } else {
73 // No clock implementation provided, use default clock. 72 // No clock implementation provided, use default clock.
74 RtpRtcp::Configuration configuration_copy; 73 RtpRtcp::Configuration configuration_copy;
75 memcpy(&configuration_copy, &configuration, 74 memcpy(&configuration_copy, &configuration,
76 sizeof(RtpRtcp::Configuration)); 75 sizeof(RtpRtcp::Configuration));
77 configuration_copy.clock = Clock::GetRealTimeClock(); 76 configuration_copy.clock = Clock::GetRealTimeClock();
78 return new ModuleRtpRtcpImpl(configuration_copy); 77 return new ModuleRtpRtcpImpl(configuration_copy);
79 } 78 }
80 } 79 }
81 80
82 ModuleRtpRtcpImpl::ModuleRtpRtcpImpl(const Configuration& configuration) 81 ModuleRtpRtcpImpl::ModuleRtpRtcpImpl(const Configuration& configuration)
83 : rtp_sender_(configuration.audio, 82 : rtp_sender_(configuration.audio,
84 configuration.clock, 83 configuration.clock,
85 configuration.outgoing_transport, 84 configuration.outgoing_transport,
86 configuration.paced_sender, 85 configuration.paced_sender,
87 configuration.transport_sequence_number_allocator, 86 configuration.transport_sequence_number_allocator,
88 configuration.transport_feedback_callback, 87 configuration.transport_feedback_callback,
89 configuration.send_bitrate_observer, 88 configuration.send_bitrate_observer,
90 configuration.send_frame_count_observer, 89 configuration.send_frame_count_observer,
91 configuration.send_side_delay_observer, 90 configuration.send_side_delay_observer,
92 configuration.event_log, 91 configuration.event_log,
93 configuration.send_packet_observer, 92 configuration.send_packet_observer),
94 configuration.retransmission_rate_limiter),
95 rtcp_sender_(configuration.audio, 93 rtcp_sender_(configuration.audio,
96 configuration.clock, 94 configuration.clock,
97 configuration.receive_statistics, 95 configuration.receive_statistics,
98 configuration.rtcp_packet_type_counter_observer, 96 configuration.rtcp_packet_type_counter_observer,
99 configuration.event_log, 97 configuration.event_log,
100 configuration.outgoing_transport), 98 configuration.outgoing_transport),
101 rtcp_receiver_(configuration.clock, 99 rtcp_receiver_(configuration.clock,
102 configuration.receiver_only, 100 configuration.receiver_only,
103 configuration.rtcp_packet_type_counter_observer, 101 configuration.rtcp_packet_type_counter_observer,
104 configuration.bandwidth_callback, 102 configuration.bandwidth_callback,
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 int32_t ModuleRtpRtcpImpl::SetSendREDPayloadType( 813 int32_t ModuleRtpRtcpImpl::SetSendREDPayloadType(
816 const int8_t payload_type) { 814 const int8_t payload_type) {
817 return rtp_sender_.SetRED(payload_type); 815 return rtp_sender_.SetRED(payload_type);
818 } 816 }
819 817
820 // Get payload type for Redundant Audio Data RFC 2198. 818 // Get payload type for Redundant Audio Data RFC 2198.
821 int32_t ModuleRtpRtcpImpl::SendREDPayloadType(int8_t* payload_type) const { 819 int32_t ModuleRtpRtcpImpl::SendREDPayloadType(int8_t* payload_type) const {
822 return rtp_sender_.RED(payload_type); 820 return rtp_sender_.RED(payload_type);
823 } 821 }
824 822
823 void ModuleRtpRtcpImpl::SetTargetSendBitrate(uint32_t bitrate_bps) {
824 rtp_sender_.SetTargetBitrate(bitrate_bps);
825 }
826
825 int32_t ModuleRtpRtcpImpl::SetKeyFrameRequestMethod( 827 int32_t ModuleRtpRtcpImpl::SetKeyFrameRequestMethod(
826 const KeyFrameRequestMethod method) { 828 const KeyFrameRequestMethod method) {
827 key_frame_req_method_ = method; 829 key_frame_req_method_ = method;
828 return 0; 830 return 0;
829 } 831 }
830 832
831 int32_t ModuleRtpRtcpImpl::RequestKeyFrame() { 833 int32_t ModuleRtpRtcpImpl::RequestKeyFrame() {
832 switch (key_frame_req_method_) { 834 switch (key_frame_req_method_) {
833 case kKeyFrameReqPliRtcp: 835 case kKeyFrameReqPliRtcp:
834 return SendRTCP(kRtcpPli); 836 return SendRTCP(kRtcpPli);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( 996 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback(
995 StreamDataCountersCallback* callback) { 997 StreamDataCountersCallback* callback) {
996 rtp_sender_.RegisterRtpStatisticsCallback(callback); 998 rtp_sender_.RegisterRtpStatisticsCallback(callback);
997 } 999 }
998 1000
999 StreamDataCountersCallback* 1001 StreamDataCountersCallback*
1000 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { 1002 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const {
1001 return rtp_sender_.GetRtpStatisticsCallback(); 1003 return rtp_sender_.GetRtpStatisticsCallback();
1002 } 1004 }
1003 } // namespace webrtc 1005 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698