Delete chrome.mediaGalleriesPrivate because the functionality unique to it has since...
[chromium-blink-merge.git] / media / cast / logging / logging_defines.h
blob0f57fe982d8268bea956bcc7c32777aef38329ac
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 PACKET_RTX_REJECTED,
36 // Receiver side packet events.
37 PACKET_RECEIVED,
38 kNumOfLoggingEvents = PACKET_RECEIVED
41 const char* CastLoggingToString(CastLoggingEvent event);
43 // CastLoggingEvent are classified into one of three following types.
44 enum EventMediaType {
45 AUDIO_EVENT,
46 VIDEO_EVENT,
47 UNKNOWN_EVENT,
48 EVENT_MEDIA_TYPE_LAST = UNKNOWN_EVENT
51 struct FrameEvent {
52 FrameEvent();
53 ~FrameEvent();
55 RtpTimestamp rtp_timestamp;
56 uint32 frame_id;
58 // Size of encoded frame. Only set for FRAME_ENCODED event.
59 size_t size;
61 // Time of event logged.
62 base::TimeTicks timestamp;
64 CastLoggingEvent type;
66 EventMediaType media_type;
68 // Only set for FRAME_PLAYOUT events.
69 // If this value is zero the frame is rendered on time.
70 // If this value is positive it means the frame is rendered late.
71 // If this value is negative it means the frame is rendered early.
72 base::TimeDelta delay_delta;
74 // Whether the frame is a key frame. Only set for video FRAME_ENCODED event.
75 bool key_frame;
77 // The requested target bitrate of the encoder at the time the frame is
78 // encoded. Only set for video FRAME_ENCODED event.
79 int target_bitrate;
82 struct PacketEvent {
83 PacketEvent();
84 ~PacketEvent();
86 RtpTimestamp rtp_timestamp;
87 uint32 frame_id;
88 uint16 max_packet_id;
89 uint16 packet_id;
90 size_t size;
92 // Time of event logged.
93 base::TimeTicks timestamp;
94 CastLoggingEvent type;
95 EventMediaType media_type;
98 } // namespace cast
99 } // namespace media
101 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_