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
,
35 // Receiver side packet events.
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
};
49 RtpTimestamp rtp_timestamp
;
52 // Size of encoded frame. Only set for FRAME_ENCODED event.
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.
68 // The requested target bitrate of the encoder at the time the frame is
69 // encoded. Only set for video FRAME_ENCODED event.
77 RtpTimestamp rtp_timestamp
;
83 // Time of event logged.
84 base::TimeTicks timestamp
;
85 CastLoggingEvent type
;
86 EventMediaType media_type
;
92 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_