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

Side by Side Diff: media/cast/net/rtcp/receiver_rtcp_event_subscriber.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: Created 5 years 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 // 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_RTCP_RECEIVER_RTCP_EVENT_SUBSCRIBER_H_ 5 #ifndef MEDIA_CAST_RTCP_RECEIVER_RTCP_EVENT_SUBSCRIBER_H_
6 #define MEDIA_CAST_RTCP_RECEIVER_RTCP_EVENT_SUBSCRIBER_H_ 6 #define MEDIA_CAST_RTCP_RECEIVER_RTCP_EVENT_SUBSCRIBER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 13 matching lines...) Expand all
24 // - Only processes raw event types that are relevant for sending from cast 24 // - Only processes raw event types that are relevant for sending from cast
25 // receiver to cast sender via RTCP. 25 // receiver to cast sender via RTCP.
26 // - Captures information to be sent over to RTCP from raw event logs into the 26 // - Captures information to be sent over to RTCP from raw event logs into the
27 // more compact RtcpEvent struct. 27 // more compact RtcpEvent struct.
28 // - Orders events by RTP timestamp with a multimap. 28 // - Orders events by RTP timestamp with a multimap.
29 // - Internally, the map is capped at a maximum size configurable by the caller. 29 // - Internally, the map is capped at a maximum size configurable by the caller.
30 // The subscriber only keeps the most recent events (determined by RTP 30 // The subscriber only keeps the most recent events (determined by RTP
31 // timestamp) up to the size limit. 31 // timestamp) up to the size limit.
32 class ReceiverRtcpEventSubscriber : public RawEventSubscriber { 32 class ReceiverRtcpEventSubscriber : public RawEventSubscriber {
33 public: 33 public:
34 typedef std::pair<RtpTimestamp, RtcpEvent> RtcpEventPair; 34 typedef std::pair<RtpTimeTicks, RtcpEvent> RtcpEventPair;
35 typedef std::vector<std::pair<RtpTimestamp, RtcpEvent> > RtcpEvents; 35 typedef std::vector<std::pair<RtpTimeTicks, RtcpEvent>> RtcpEvents;
36 36
37 // |max_size_to_retain|: The object will keep up to |max_size_to_retain| 37 // |max_size_to_retain|: The object will keep up to |max_size_to_retain|
38 // events 38 // events
39 // in the map. Once threshold has been reached, an event with the smallest 39 // in the map. Once threshold has been reached, an event with the smallest
40 // RTP timestamp will be removed. 40 // RTP timestamp will be removed.
41 // |type|: Determines whether the subscriber will process only audio or video 41 // |type|: Determines whether the subscriber will process only audio or video
42 // events. 42 // events.
43 ReceiverRtcpEventSubscriber(const size_t max_size_to_retain, 43 ReceiverRtcpEventSubscriber(const size_t max_size_to_retain,
44 EventMediaType type); 44 EventMediaType type);
45 45
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // Ensures methods are only called on the main thread. 93 // Ensures methods are only called on the main thread.
94 base::ThreadChecker thread_checker_; 94 base::ThreadChecker thread_checker_;
95 95
96 DISALLOW_COPY_AND_ASSIGN(ReceiverRtcpEventSubscriber); 96 DISALLOW_COPY_AND_ASSIGN(ReceiverRtcpEventSubscriber);
97 }; 97 };
98 98
99 } // namespace cast 99 } // namespace cast
100 } // namespace media 100 } // namespace media
101 101
102 #endif // MEDIA_CAST_RTCP_RECEIVER_RTCP_EVENT_SUBSCRIBER_H_ 102 #endif // MEDIA_CAST_RTCP_RECEIVER_RTCP_EVENT_SUBSCRIBER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698