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_
12 #include "base/time/time.h"
17 static const uint32 kFrameIdUnknown
= 0xFFFFFFFF;
19 typedef uint32 RtpTimestamp
;
21 enum CastLoggingEvent
{
23 // Sender side frame events.
28 // Receiver side frame events.
32 // Sender side packet events.
33 PACKET_SENT_TO_NETWORK
,
36 // Receiver side packet events.
38 kNumOfLoggingEvents
= PACKET_RECEIVED
41 const char* CastLoggingToString(CastLoggingEvent event
);
43 // CastLoggingEvent are classified into one of three following types.
48 EVENT_MEDIA_TYPE_LAST
= UNKNOWN_EVENT
55 RtpTimestamp rtp_timestamp
;
58 // Size of encoded frame. Only set for FRAME_ENCODED event.
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.
77 // The requested target bitrate of the encoder at the time the frame is
78 // encoded. Only set for video FRAME_ENCODED event.
86 RtpTimestamp rtp_timestamp
;
92 // Time of event logged.
93 base::TimeTicks timestamp
;
94 CastLoggingEvent type
;
95 EventMediaType media_type
;
101 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_