Ignore title parameter for navigator.registerProtocolHandler
[chromium-blink-merge.git] / media / cast / logging / logging_impl.h
blobba453c8c8eebd02b8e21eed11d146ae346735ae6
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.
10 // 2. Tracing of raw events.
12 #include "base/memory/ref_counted.h"
13 #include "base/threading/thread_checker.h"
14 #include "media/cast/cast_config.h"
15 #include "media/cast/logging/logging_defines.h"
16 #include "media/cast/logging/logging_raw.h"
18 namespace media {
19 namespace cast {
21 class LoggingImpl {
22 public:
23 LoggingImpl();
24 ~LoggingImpl();
26 // Note: All methods below should be called from the same thread.
28 void InsertFrameEvent(const base::TimeTicks& time_of_event,
29 CastLoggingEvent event, EventMediaType event_media_type,
30 uint32 rtp_timestamp, uint32 frame_id);
32 void InsertEncodedFrameEvent(const base::TimeTicks& time_of_event,
33 CastLoggingEvent event,
34 EventMediaType event_media_type,
35 uint32 rtp_timestamp, uint32 frame_id,
36 int frame_size, bool key_frame,
37 int target_bitrate);
39 void InsertFrameEventWithDelay(const base::TimeTicks& time_of_event,
40 CastLoggingEvent event,
41 EventMediaType event_media_type,
42 uint32 rtp_timestamp, uint32 frame_id,
43 base::TimeDelta delay);
45 void InsertSinglePacketEvent(const base::TimeTicks& time_of_event,
46 CastLoggingEvent event,
47 EventMediaType event_media_type,
48 const Packet& packet);
50 void InsertPacketListEvent(const base::TimeTicks& time_of_event,
51 CastLoggingEvent event,
52 EventMediaType event_media_type,
53 const PacketList& packets);
55 void InsertPacketEvent(const base::TimeTicks& time_of_event,
56 CastLoggingEvent event,
57 EventMediaType event_media_type, uint32 rtp_timestamp,
58 uint32 frame_id, uint16 packet_id,
59 uint16 max_packet_id, size_t size);
61 // Delegates to |LoggingRaw::AddRawEventSubscriber()|.
62 void AddRawEventSubscriber(RawEventSubscriber* subscriber);
64 // Delegates to |LoggingRaw::RemoveRawEventSubscriber()|.
65 void RemoveRawEventSubscriber(RawEventSubscriber* subscriber);
67 private:
68 base::ThreadChecker thread_checker_;
69 LoggingRaw raw_;
71 DISALLOW_COPY_AND_ASSIGN(LoggingImpl);
74 } // namespace cast
75 } // namespace media
77 #endif // MEDIA_CAST_LOGGING_LOGGING_IMPL_H_