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