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

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

Issue 1888593004: Delete all use of tick_util.h. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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
11 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h" 11 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h"
12 12
13 #include <stdlib.h> // srand 13 #include <stdlib.h> // srand
14 #include <algorithm> 14 #include <algorithm>
15 #include <utility> 15 #include <utility>
16 16
17 #include "webrtc/base/checks.h" 17 #include "webrtc/base/checks.h"
18 #include "webrtc/base/logging.h" 18 #include "webrtc/base/logging.h"
19 #include "webrtc/base/trace_event.h" 19 #include "webrtc/base/trace_event.h"
20 #include "webrtc/base/timeutils.h"
20 #include "webrtc/call.h" 21 #include "webrtc/call.h"
21 #include "webrtc/call/rtc_event_log.h" 22 #include "webrtc/call/rtc_event_log.h"
22 #include "webrtc/modules/rtp_rtcp/include/rtp_cvo.h" 23 #include "webrtc/modules/rtp_rtcp/include/rtp_cvo.h"
23 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" 24 #include "webrtc/modules/rtp_rtcp/source/byte_io.h"
24 #include "webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h" 25 #include "webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h"
25 #include "webrtc/modules/rtp_rtcp/source/rtp_sender_video.h" 26 #include "webrtc/modules/rtp_rtcp/source/rtp_sender_video.h"
26 #include "webrtc/modules/rtp_rtcp/source/time_util.h" 27 #include "webrtc/modules/rtp_rtcp/source/time_util.h"
27 #include "webrtc/system_wrappers/include/tick_util.h"
28 28
29 namespace webrtc { 29 namespace webrtc {
30 30
31 // Max in the RFC 3550 is 255 bytes, we limit it to be modulus 32 for SRTP. 31 // Max in the RFC 3550 is 255 bytes, we limit it to be modulus 32 for SRTP.
32 static const size_t kMaxPaddingLength = 224; 32 static const size_t kMaxPaddingLength = 224;
33 static const int kSendSideDelayWindowMs = 1000; 33 static const int kSendSideDelayWindowMs = 1000;
34 static const uint32_t kAbsSendTimeFraction = 18; 34 static const uint32_t kAbsSendTimeFraction = 18;
35 35
36 namespace { 36 namespace {
37 37
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 Transport* transport, 109 Transport* transport,
110 RtpPacketSender* paced_sender, 110 RtpPacketSender* paced_sender,
111 TransportSequenceNumberAllocator* sequence_number_allocator, 111 TransportSequenceNumberAllocator* sequence_number_allocator,
112 TransportFeedbackObserver* transport_feedback_observer, 112 TransportFeedbackObserver* transport_feedback_observer,
113 BitrateStatisticsObserver* bitrate_callback, 113 BitrateStatisticsObserver* bitrate_callback,
114 FrameCountObserver* frame_count_observer, 114 FrameCountObserver* frame_count_observer,
115 SendSideDelayObserver* send_side_delay_observer, 115 SendSideDelayObserver* send_side_delay_observer,
116 RtcEventLog* event_log) 116 RtcEventLog* event_log)
117 : clock_(clock), 117 : clock_(clock),
118 // TODO(holmer): Remove this conversion when we remove the use of 118 // TODO(holmer): Remove this conversion when we remove the use of
119 // TickTime. 119 // TickTime. TODO(nisse): Is that now?
stefan-webrtc 2016/04/19 09:19:12 Not sure. We should remove it when the same clock
nisse-webrtc 2016/04/19 12:19:25 I expect more changes to timestamps. I'm dropping
120 clock_delta_ms_(clock_->TimeInMilliseconds() - 120 clock_delta_ms_(clock_->TimeInMilliseconds() - rtc::Time64()),
121 TickTime::MillisecondTimestamp()),
122 random_(clock_->TimeInMicroseconds()), 121 random_(clock_->TimeInMicroseconds()),
123 bitrates_(bitrate_callback), 122 bitrates_(bitrate_callback),
124 total_bitrate_sent_(clock, bitrates_.total_bitrate_observer()), 123 total_bitrate_sent_(clock, bitrates_.total_bitrate_observer()),
125 audio_configured_(audio), 124 audio_configured_(audio),
126 audio_(audio ? new RTPSenderAudio(clock, this) : nullptr), 125 audio_(audio ? new RTPSenderAudio(clock, this) : nullptr),
127 video_(audio ? nullptr : new RTPSenderVideo(clock, this)), 126 video_(audio ? nullptr : new RTPSenderVideo(clock, this)),
128 paced_sender_(paced_sender), 127 paced_sender_(paced_sender),
129 transport_sequence_number_allocator_(sequence_number_allocator), 128 transport_sequence_number_allocator_(sequence_number_allocator),
130 transport_feedback_observer_(transport_feedback_observer), 129 transport_feedback_observer_(transport_feedback_observer),
131 last_capture_time_ms_sent_(0), 130 last_capture_time_ms_sent_(0),
(...skipping 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 rtc::CritScope lock(&send_critsect_); 1900 rtc::CritScope lock(&send_critsect_);
1902 1901
1903 RtpState state; 1902 RtpState state;
1904 state.sequence_number = sequence_number_rtx_; 1903 state.sequence_number = sequence_number_rtx_;
1905 state.start_timestamp = start_timestamp_; 1904 state.start_timestamp = start_timestamp_;
1906 1905
1907 return state; 1906 return state;
1908 } 1907 }
1909 1908
1910 } // namespace webrtc 1909 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698