| 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_LOGGING_STATS_EVENT_SUBSCRIBER_H_ | 5 #ifndef MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_ |
| 6 #define MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_ | 6 #define MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_ |
| 7 | 7 |
| 8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "base/memory/linked_ptr.h" | 9 #include "base/memory/linked_ptr.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // and aggregates them into stats. | 28 // and aggregates them into stats. |
| 29 class StatsEventSubscriber : public RawEventSubscriber { | 29 class StatsEventSubscriber : public RawEventSubscriber { |
| 30 public: | 30 public: |
| 31 StatsEventSubscriber(EventMediaType event_media_type, | 31 StatsEventSubscriber(EventMediaType event_media_type, |
| 32 base::TickClock* clock, | 32 base::TickClock* clock, |
| 33 ReceiverTimeOffsetEstimator* offset_estimator); | 33 ReceiverTimeOffsetEstimator* offset_estimator); |
| 34 | 34 |
| 35 virtual ~StatsEventSubscriber(); | 35 virtual ~StatsEventSubscriber(); |
| 36 | 36 |
| 37 // RawReventSubscriber implementations. | 37 // RawReventSubscriber implementations. |
| 38 virtual void OnReceiveFrameEvent(const FrameEvent& frame_event) OVERRIDE; | 38 virtual void OnReceiveFrameEvent(const FrameEvent& frame_event) override; |
| 39 virtual void OnReceivePacketEvent(const PacketEvent& packet_event) OVERRIDE; | 39 virtual void OnReceivePacketEvent(const PacketEvent& packet_event) override; |
| 40 | 40 |
| 41 // Returns stats as a DictionaryValue. The dictionary contains one entry - | 41 // Returns stats as a DictionaryValue. The dictionary contains one entry - |
| 42 // "audio" or "video" pointing to an inner dictionary. | 42 // "audio" or "video" pointing to an inner dictionary. |
| 43 // The inner dictionary consists of string - double entries, where the string | 43 // The inner dictionary consists of string - double entries, where the string |
| 44 // describes the name of the stat, and the double describes | 44 // describes the name of the stat, and the double describes |
| 45 // the value of the stat. See CastStat and StatsMap below. | 45 // the value of the stat. See CastStat and StatsMap below. |
| 46 scoped_ptr<base::DictionaryValue> GetStats() const; | 46 scoped_ptr<base::DictionaryValue> GetStats() const; |
| 47 | 47 |
| 48 // Resets stats in this object. | 48 // Resets stats in this object. |
| 49 void Reset(); | 49 void Reset(); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 HistogramMap histograms_; | 254 HistogramMap histograms_; |
| 255 | 255 |
| 256 base::ThreadChecker thread_checker_; | 256 base::ThreadChecker thread_checker_; |
| 257 DISALLOW_COPY_AND_ASSIGN(StatsEventSubscriber); | 257 DISALLOW_COPY_AND_ASSIGN(StatsEventSubscriber); |
| 258 }; | 258 }; |
| 259 | 259 |
| 260 } // namespace cast | 260 } // namespace cast |
| 261 } // namespace media | 261 } // namespace media |
| 262 | 262 |
| 263 #endif // MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_ | 263 #endif // MEDIA_CAST_LOGGING_STATS_EVENT_SUBSCRIBER_H_ |
| OLD | NEW |