OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef MEDIA_CAST_LOGGING_LOGGING_IMPL_H_ | 4 #ifndef MEDIA_CAST_LOGGING_LOGGING_IMPL_H_ |
5 #define MEDIA_CAST_LOGGING_LOGGING_IMPL_H_ | 5 #define MEDIA_CAST_LOGGING_LOGGING_IMPL_H_ |
6 | 6 |
7 // Generic class that handles event logging for the cast library. | 7 // Generic class that handles event logging for the cast library. |
8 // Logging has three possible optional forms: | 8 // Logging has three possible optional forms: |
9 // 1. Raw data and stats accessible by the application. | 9 // 1. Raw data and stats accessible by the application. |
10 // 2. UMA stats. | 10 // 2. UMA stats. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 uint32 frame_id, | 55 uint32 frame_id, |
56 uint16 packet_id, | 56 uint16 packet_id, |
57 uint16 max_packet_id, | 57 uint16 max_packet_id, |
58 size_t size); | 58 size_t size); |
59 | 59 |
60 void InsertGenericEvent(const base::TimeTicks& time_of_event, | 60 void InsertGenericEvent(const base::TimeTicks& time_of_event, |
61 CastLoggingEvent event, | 61 CastLoggingEvent event, |
62 int value); | 62 int value); |
63 | 63 |
64 // Get raw data. | 64 // Get raw data. |
65 FrameRawMap GetFrameRawData(); | 65 FrameRawMap GetFrameRawData() const; |
66 PacketRawMap GetPacketRawData(); | 66 PacketRawMap GetPacketRawData() const; |
67 GenericRawMap GetGenericRawData(); | 67 GenericRawMap GetGenericRawData() const; |
68 AudioRtcpRawMap GetAudioRtcpRawData(); | 68 AudioRtcpRawMap GetAudioRtcpRawData(); |
imcheng
2014/01/22 21:03:37
GetAudioRtcpRawData() and GetVideoRtcpRawData() be
hguihot1
2014/01/22 21:13:05
Or could it be consistent and not Reset()?
On 201
mikhal1
2014/01/23 19:53:11
Get and reset makes more sense for this use case,
mikhal1
2014/01/23 19:53:11
Done.
| |
69 VideoRtcpRawMap GetVideoRtcpRawData(); | 69 VideoRtcpRawMap GetVideoRtcpRawData(); |
70 | 70 |
71 // Get stats only (computed when called). Triggers UMA stats when enabled. | 71 // Get stats only (computed when called). Triggers UMA stats when enabled. |
72 const FrameStatsMap* GetFrameStatsData(const base::TimeTicks& now); | 72 const FrameStatsMap* GetFrameStatsData() const; |
73 const PacketStatsMap* GetPacketStatsData(const base::TimeTicks& now); | 73 const PacketStatsMap* GetPacketStatsData() const; |
74 const GenericStatsMap* GetGenericStatsData(); | 74 const GenericStatsMap* GetGenericStatsData() const; |
75 | 75 |
76 // Reset raw logging data. | 76 // Reset raw logging data. |
imcheng
2014/01/22 21:03:37
Document that this does not reset AudioRtcpRawMap
mikhal1
2014/01/23 19:53:11
Done.
| |
77 void ResetRaw(); | 77 void ResetRaw(); |
78 // Reset stats logging data. | 78 // Reset stats logging data. |
79 void ResetStats(); | 79 void ResetStats(); |
80 | 80 |
81 private: | 81 private: |
82 void InsertGenericUmaEvent(CastLoggingEvent event, int value); | 82 void InsertGenericUmaEvent(CastLoggingEvent event, int value); |
83 scoped_refptr<base::TaskRunner> main_thread_proxy_; | 83 scoped_refptr<base::TaskRunner> main_thread_proxy_; |
84 const CastLoggingConfig config_; | 84 const CastLoggingConfig config_; |
85 LoggingRaw raw_; | 85 LoggingRaw raw_; |
86 LoggingStats stats_; | 86 LoggingStats stats_; |
87 | 87 |
88 DISALLOW_COPY_AND_ASSIGN(LoggingImpl); | 88 DISALLOW_COPY_AND_ASSIGN(LoggingImpl); |
89 }; | 89 }; |
90 | 90 |
91 } // namespace cast | 91 } // namespace cast |
92 } // namespace media | 92 } // namespace media |
93 | 93 |
94 #endif // MEDIA_CAST_LOGGING_LOGGING_IMPL_H_ | 94 #endif // MEDIA_CAST_LOGGING_LOGGING_IMPL_H_ |
OLD | NEW |