Ignore title parameter for navigator.registerProtocolHandler
[chromium-blink-merge.git] / media / cast / logging / logging_defines.h
blob2af95d62d3f51174c8c823a1d9a7e260609beeb2
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.
5 #ifndef MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_
6 #define MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_
8 #include <map>
9 #include <string>
10 #include <vector>
12 #include "base/time/time.h"
14 namespace media {
15 namespace cast {
17 static const uint32 kFrameIdUnknown = 0xFFFFFFFF;
19 typedef uint32 RtpTimestamp;
21 enum CastLoggingEvent {
22 UNKNOWN,
23 // Sender side frame events.
24 FRAME_CAPTURE_BEGIN,
25 FRAME_CAPTURE_END,
26 FRAME_ENCODED,
27 FRAME_ACK_RECEIVED,
28 // Receiver side frame events.
29 FRAME_ACK_SENT,
30 FRAME_DECODED,
31 FRAME_PLAYOUT,
32 // Sender side packet events.
33 PACKET_SENT_TO_NETWORK,
34 PACKET_RETRANSMITTED,
35 // Receiver side packet events.
36 PACKET_RECEIVED,
37 kNumOfLoggingEvents = PACKET_RECEIVED
40 const char* CastLoggingToString(CastLoggingEvent event);
42 // CastLoggingEvent are classified into one of three following types.
43 enum EventMediaType { AUDIO_EVENT, VIDEO_EVENT, UNKNOWN_EVENT };
45 struct FrameEvent {
46 FrameEvent();
47 ~FrameEvent();
49 RtpTimestamp rtp_timestamp;
50 uint32 frame_id;
52 // Size of encoded frame. Only set for FRAME_ENCODED event.
53 size_t size;
55 // Time of event logged.
56 base::TimeTicks timestamp;
58 CastLoggingEvent type;
60 EventMediaType media_type;
62 // Render / playout delay. Only set for FRAME_PLAYOUT events.
63 base::TimeDelta delay_delta;
65 // Whether the frame is a key frame. Only set for video FRAME_ENCODED event.
66 bool key_frame;
68 // The requested target bitrate of the encoder at the time the frame is
69 // encoded. Only set for video FRAME_ENCODED event.
70 int target_bitrate;
73 struct PacketEvent {
74 PacketEvent();
75 ~PacketEvent();
77 RtpTimestamp rtp_timestamp;
78 uint32 frame_id;
79 uint16 max_packet_id;
80 uint16 packet_id;
81 size_t size;
83 // Time of event logged.
84 base::TimeTicks timestamp;
85 CastLoggingEvent type;
86 EventMediaType media_type;
89 } // namespace cast
90 } // namespace media
92 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_