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

Side by Side Diff: media/cast/net/rtp/receiver_stats.h

Issue 1515433002: Replace uses of raw uint32's with a type-checked RtpTimeTicks data type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Speculative workaround fix for win8_chromium_ng compile error. Created 4 years, 11 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
« no previous file with comments | « media/cast/net/rtp/frame_buffer_unittest.cc ('k') | media/cast/net/rtp/receiver_stats.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_CAST_NET_RTP_RECEIVER_STATS_H_ 5 #ifndef MEDIA_CAST_NET_RTP_RECEIVER_STATS_H_
6 #define MEDIA_CAST_NET_RTP_RECEIVER_STATS_H_ 6 #define MEDIA_CAST_NET_RTP_RECEIVER_STATS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/time/tick_clock.h" 11 #include "base/time/tick_clock.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "media/cast/common/rtp_time.h"
13 #include "media/cast/net/rtcp/rtcp.h" 14 #include "media/cast/net/rtcp/rtcp.h"
14 #include "media/cast/net/rtp/rtp_defines.h" 15 #include "media/cast/net/rtp/rtp_defines.h"
15 16
16 namespace media { 17 namespace media {
17 namespace cast { 18 namespace cast {
18 19
20 // TODO(miu): Document this class.
19 class ReceiverStats { 21 class ReceiverStats {
20 public: 22 public:
21 explicit ReceiverStats(base::TickClock* clock); 23 explicit ReceiverStats(base::TickClock* clock);
22 24
23 RtpReceiverStatistics GetStatistics(); 25 RtpReceiverStatistics GetStatistics();
24 void UpdateStatistics(const RtpCastHeader& header); 26 void UpdateStatistics(const RtpCastHeader& header, int rtp_timebase);
25 27
26 private: 28 private:
27 base::TickClock* const clock_; // Not owned by this class. 29 base::TickClock* const clock_; // Not owned by this class.
28 30
29 // Global metrics. 31 // Global metrics.
30 uint16_t min_sequence_number_; 32 uint16_t min_sequence_number_;
31 uint16_t max_sequence_number_; 33 uint16_t max_sequence_number_;
32 uint32_t total_number_packets_; 34 uint32_t total_number_packets_;
33 uint16_t sequence_number_cycles_; 35 uint16_t sequence_number_cycles_;
34 base::TimeDelta last_received_timestamp_; 36 RtpTimeTicks last_received_rtp_timestamp_;
35 base::TimeTicks last_received_packet_time_; 37 base::TimeTicks last_received_packet_time_;
36 base::TimeDelta jitter_; 38 base::TimeDelta jitter_;
37 39
38 // Intermediate metrics - between RTCP reports. 40 // Intermediate metrics - between RTCP reports.
39 int interval_min_sequence_number_; 41 int interval_min_sequence_number_;
40 int interval_number_packets_; 42 int interval_number_packets_;
41 int interval_wrap_count_; 43 int interval_wrap_count_;
42 44
43 DISALLOW_COPY_AND_ASSIGN(ReceiverStats); 45 DISALLOW_COPY_AND_ASSIGN(ReceiverStats);
44 }; 46 };
45 47
46 } // namespace cast 48 } // namespace cast
47 } // namespace media 49 } // namespace media
48 50
49 #endif // MEDIA_CAST_NET_RTP_RECEIVER_STATS_H_ 51 #endif // MEDIA_CAST_NET_RTP_RECEIVER_STATS_H_
OLDNEW
« no previous file with comments | « media/cast/net/rtp/frame_buffer_unittest.cc ('k') | media/cast/net/rtp/receiver_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698