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
3 // found in the LICENSE file.
4 #ifndef MEDIA_CAST_LOGGING_LOGGING_IMPL_H_
5 #define MEDIA_CAST_LOGGING_LOGGING_IMPL_H_
7 // Generic class that handles event logging for the cast library.
8 // Logging has three possible optional forms:
9 // 1. Raw data and stats accessible by the application.
11 // 3. Tracing of raw events.
13 #include "media/cast/logging/logging_defines.h"
14 #include "media/cast/logging/logging_raw.h"
15 #include "media/cast/logging/logging_stats.h"
22 LoggingImpl(base::TickClock* clock,
23 bool enable_data_collection,
24 bool enable_uma_stats,
29 void InsertFrameEvent(CastLoggingEvent event,
32 void InsertFrameEventWithSize(CastLoggingEvent event,
36 void InsertFrameEventWithDelay(CastLoggingEvent event,
39 base::TimeDelta delay);
40 void InsertPacketEvent(CastLoggingEvent event,
46 void InsertGenericEvent(CastLoggingEvent event, int value);
49 FrameRawMap GetFrameRawData();
50 PacketRawMap GetPacketRawData();
51 GenericRawMap GetGenericRawData();
52 // Get stats only (computed when called). Triggers UMA stats when enabled.
53 const FrameStatsMap* GetFrameStatsData();
54 const PacketStatsMap* GetPacketStatsData();
55 const GenericStatsMap* GetGenericStatsData();
62 bool enable_data_collection_;
63 bool enable_uma_stats_;
66 DISALLOW_COPY_AND_ASSIGN(LoggingImpl);
72 #endif // MEDIA_CAST_LOGGING_LOGGING_IMPL_H_