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 // Resolution of the frame. Only set for video FRAME_CAPTURE_END events.
62 // Size of encoded frame in bytes. Only set for FRAME_ENCODED event.
65 // Time of event logged.
66 base::TimeTicks timestamp
;
68 CastLoggingEvent type
;
70 EventMediaType media_type
;
72 // Only set for FRAME_PLAYOUT events.
73 // If this value is zero the frame is rendered on time.
74 // If this value is positive it means the frame is rendered late.
75 // If this value is negative it means the frame is rendered early.
76 base::TimeDelta delay_delta
;
78 // Whether the frame is a key frame. Only set for video FRAME_ENCODED event.
81 // The requested target bitrate of the encoder at the time the frame is
82 // encoded. Only set for video FRAME_ENCODED event.
85 // Encoding performance metrics. See media/cast/sender/sender_encoded_frame.h
86 // for a description of these values.
87 double encoder_cpu_utilization
;
88 double idealized_bitrate_utilization
;
95 RtpTimestamp rtp_timestamp
;
101 // Time of event logged.
102 base::TimeTicks timestamp
;
103 CastLoggingEvent type
;
104 EventMediaType media_type
;
110 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_