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

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

Issue 2067673004: Style cleanups in RtpSender. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fix compilation Created 4 years, 6 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 27 matching lines...) Expand all
38 if (extension == RtpExtension::kVideoRotationUri) 38 if (extension == RtpExtension::kVideoRotationUri)
39 return kRtpExtensionVideoRotation; 39 return kRtpExtensionVideoRotation;
40 if (extension == RtpExtension::kTransportSequenceNumberUri) 40 if (extension == RtpExtension::kTransportSequenceNumberUri)
41 return kRtpExtensionTransportSequenceNumber; 41 return kRtpExtensionTransportSequenceNumber;
42 if (extension == RtpExtension::kPlayoutDelayUri) 42 if (extension == RtpExtension::kPlayoutDelayUri)
43 return kRtpExtensionPlayoutDelay; 43 return kRtpExtensionPlayoutDelay;
44 RTC_NOTREACHED() << "Looking up unsupported RTP extension."; 44 RTC_NOTREACHED() << "Looking up unsupported RTP extension.";
45 return kRtpExtensionNone; 45 return kRtpExtensionNone;
46 } 46 }
47 47
48 RtpRtcp::Configuration::Configuration() 48 RtpRtcp::Configuration::Configuration() {}
danilchap 2016/06/15 13:40:01 : receive_statistics(NullObjectReceiveStatistics()
Sergey Ulanov 2016/06/15 18:27:53 Thanks for catching it - I meant to leave it, but
49 : audio(false),
50 receiver_only(false),
51 clock(nullptr),
52 receive_statistics(NullObjectReceiveStatistics()),
53 outgoing_transport(nullptr),
54 intra_frame_callback(nullptr),
55 bandwidth_callback(nullptr),
56 transport_feedback_callback(nullptr),
57 rtt_stats(nullptr),
58 rtcp_packet_type_counter_observer(nullptr),
59 remote_bitrate_estimator(nullptr),
60 paced_sender(nullptr),
61 transport_sequence_number_allocator(nullptr),
62 send_bitrate_observer(nullptr),
63 send_frame_count_observer(nullptr),
64 send_side_delay_observer(nullptr),
65 event_log(nullptr),
66 send_packet_observer(nullptr) {}
67 49
68 RtpRtcp* RtpRtcp::CreateRtpRtcp(const RtpRtcp::Configuration& configuration) { 50 RtpRtcp* RtpRtcp::CreateRtpRtcp(const RtpRtcp::Configuration& configuration) {
69 if (configuration.clock) { 51 if (configuration.clock) {
70 return new ModuleRtpRtcpImpl(configuration); 52 return new ModuleRtpRtcpImpl(configuration);
71 } else { 53 } else {
72 // No clock implementation provided, use default clock. 54 // No clock implementation provided, use default clock.
73 RtpRtcp::Configuration configuration_copy; 55 RtpRtcp::Configuration configuration_copy;
74 memcpy(&configuration_copy, &configuration, 56 memcpy(&configuration_copy, &configuration,
75 sizeof(RtpRtcp::Configuration)); 57 sizeof(RtpRtcp::Configuration));
76 configuration_copy.clock = Clock::GetRealTimeClock(); 58 configuration_copy.clock = Clock::GetRealTimeClock();
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 } 391 }
410 392
411 int32_t ModuleRtpRtcpImpl::SendOutgoingData( 393 int32_t ModuleRtpRtcpImpl::SendOutgoingData(
412 FrameType frame_type, 394 FrameType frame_type,
413 int8_t payload_type, 395 int8_t payload_type,
414 uint32_t time_stamp, 396 uint32_t time_stamp,
415 int64_t capture_time_ms, 397 int64_t capture_time_ms,
416 const uint8_t* payload_data, 398 const uint8_t* payload_data,
417 size_t payload_size, 399 size_t payload_size,
418 const RTPFragmentationHeader* fragmentation, 400 const RTPFragmentationHeader* fragmentation,
419 const RTPVideoHeader* rtp_video_hdr) { 401 const RTPVideoHeader* rtp_video_header) {
420 rtcp_sender_.SetLastRtpTime(time_stamp, capture_time_ms); 402 rtcp_sender_.SetLastRtpTime(time_stamp, capture_time_ms);
421 // Make sure an RTCP report isn't queued behind a key frame. 403 // Make sure an RTCP report isn't queued behind a key frame.
422 if (rtcp_sender_.TimeToSendRTCPReport(kVideoFrameKey == frame_type)) { 404 if (rtcp_sender_.TimeToSendRTCPReport(kVideoFrameKey == frame_type)) {
423 rtcp_sender_.SendRTCP(GetFeedbackState(), kRtcpReport); 405 rtcp_sender_.SendRTCP(GetFeedbackState(), kRtcpReport);
424 } 406 }
425 return rtp_sender_.SendOutgoingData( 407 return rtp_sender_.SendOutgoingData(
426 frame_type, payload_type, time_stamp, capture_time_ms, payload_data, 408 frame_type, payload_type, time_stamp, capture_time_ms, payload_data,
427 payload_size, fragmentation, rtp_video_hdr); 409 payload_size, fragmentation, rtp_video_header);
428 } 410 }
429 411
430 bool ModuleRtpRtcpImpl::TimeToSendPacket(uint32_t ssrc, 412 bool ModuleRtpRtcpImpl::TimeToSendPacket(uint32_t ssrc,
431 uint16_t sequence_number, 413 uint16_t sequence_number,
432 int64_t capture_time_ms, 414 int64_t capture_time_ms,
433 bool retransmission, 415 bool retransmission,
434 int probe_cluster_id) { 416 int probe_cluster_id) {
435 if (SendingMedia() && ssrc == rtp_sender_.SSRC()) { 417 if (SendingMedia() && ssrc == rtp_sender_.SSRC()) {
436 return rtp_sender_.TimeToSendPacket(sequence_number, capture_time_ms, 418 return rtp_sender_.TimeToSendPacket(sequence_number, capture_time_ms,
437 retransmission, probe_cluster_id); 419 retransmission, probe_cluster_id);
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( 978 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback(
997 StreamDataCountersCallback* callback) { 979 StreamDataCountersCallback* callback) {
998 rtp_sender_.RegisterRtpStatisticsCallback(callback); 980 rtp_sender_.RegisterRtpStatisticsCallback(callback);
999 } 981 }
1000 982
1001 StreamDataCountersCallback* 983 StreamDataCountersCallback*
1002 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { 984 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const {
1003 return rtp_sender_.GetRtpStatisticsCallback(); 985 return rtp_sender_.GetRtpStatisticsCallback();
1004 } 986 }
1005 } // namespace webrtc 987 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698