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
3 // found in the LICENSE file.
5 #ifndef MEDIA_CAST_RTP_RECEIVER_RECEIVER_STATS_H_
6 #define MEDIA_CAST_RTP_RECEIVER_RECEIVER_STATS_H_
8 #include "base/time/tick_clock.h"
9 #include "base/time/time.h"
10 #include "media/cast/net/rtcp/rtcp.h"
11 #include "media/cast/net/rtp/rtp_receiver_defines.h"
18 explicit ReceiverStats(base::TickClock
* clock
);
20 RtpReceiverStatistics
GetStatistics();
21 void UpdateStatistics(const RtpCastHeader
& header
);
24 base::TickClock
* const clock_
; // Not owned by this class.
27 uint16 min_sequence_number_
;
28 uint16 max_sequence_number_
;
29 uint32 total_number_packets_
;
30 uint16 sequence_number_cycles_
;
31 base::TimeDelta last_received_timestamp_
;
32 base::TimeTicks last_received_packet_time_
;
33 base::TimeDelta jitter_
;
35 // Intermediate metrics - between RTCP reports.
36 int interval_min_sequence_number_
;
37 int interval_number_packets_
;
38 int interval_wrap_count_
;
40 DISALLOW_COPY_AND_ASSIGN(ReceiverStats
);
46 #endif // MEDIA_CAST_RTP_RECEIVER_RECEIVER_STATS_H_