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

Side by Side Diff: media/cast/logging/logging_impl.h

Issue 130423007: Cast:Updating logging stats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Responding to Review Created 6 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 | Annotate | Revision Log
OLDNEW
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
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 // Pointers are owned by the logging class, and are assumed valid on the main
imcheng 2014/01/23 21:17:18 You are returning a copy of the data though, so th
mikhal1 2014/01/23 23:02:17 Done.
66 PacketRawMap GetPacketRawData(); 66 // thread until Reset is called.
67 GenericRawMap GetGenericRawData(); 67 FrameRawMap GetFrameRawData() const;
68 AudioRtcpRawMap GetAudioRtcpRawData(); 68 PacketRawMap GetPacketRawData() const;
69 VideoRtcpRawMap GetVideoRtcpRawData(); 69 GenericRawMap GetGenericRawData() const;
70 70
71 // Get stats only (computed when called). Triggers UMA stats when enabled. 71 // Get the RTCP data and reset the data.
72 const FrameStatsMap* GetFrameStatsData(const base::TimeTicks& now); 72 AudioRtcpRawMap GetAndResetAudioRtcpRawData();
73 const PacketStatsMap* GetPacketStatsData(const base::TimeTicks& now); 73 VideoRtcpRawMap GetAndResetVideoRtcpRawData();
74 const GenericStatsMap* GetGenericStatsData();
75 74
76 // Reset raw logging data. 75 // Get stats only.
76 // Pointers are owned by the logging class, and are assumed valid on the main
imcheng 2014/01/23 21:17:18 Same here, the code was changed from returning a p
mikhal1 2014/01/23 23:02:17 Done.
77 // thread until Reset is called.
78 FrameStatsMap GetFrameStatsData() const;
79 PacketStatsMap GetPacketStatsData() const;
80 GenericStatsMap GetGenericStatsData() const;
81
82 // Reset raw logging data (this does not reset the RTCP raw data).
77 void ResetRaw(); 83 void ResetRaw();
78 // Reset stats logging data. 84 // Reset stats logging data.
79 void ResetStats(); 85 void ResetStats();
80 86
81 private: 87 private:
82 void InsertGenericUmaEvent(CastLoggingEvent event, int value); 88 void InsertGenericUmaEvent(CastLoggingEvent event, int value);
83 scoped_refptr<base::TaskRunner> main_thread_proxy_; 89 scoped_refptr<base::TaskRunner> main_thread_proxy_;
84 const CastLoggingConfig config_; 90 const CastLoggingConfig config_;
85 LoggingRaw raw_; 91 LoggingRaw raw_;
86 LoggingStats stats_; 92 LoggingStats stats_;
87 93
88 DISALLOW_COPY_AND_ASSIGN(LoggingImpl); 94 DISALLOW_COPY_AND_ASSIGN(LoggingImpl);
89 }; 95 };
90 96
91 } // namespace cast 97 } // namespace cast
92 } // namespace media 98 } // namespace media
93 99
94 #endif // MEDIA_CAST_LOGGING_LOGGING_IMPL_H_ 100 #endif // MEDIA_CAST_LOGGING_LOGGING_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698