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 // Generic events. These are no longer used.
27 kVideoAckReceived
, // Sender side frame event.
28 kRembBitrate
, // Generic event. No longer used.
29 // Receiver side frame events.
33 kAudioFrameCaptureBegin
,
34 kAudioFrameCaptureEnd
,
40 kVideoFrameCaptureBegin
,
41 kVideoFrameCaptureEnd
,
42 kVideoFrameSentToEncoder
, // Deprecated
47 // Send-side packet events.
48 kAudioPacketSentToNetwork
,
49 kVideoPacketSentToNetwork
,
50 kAudioPacketRetransmitted
,
51 kVideoPacketRetransmitted
,
52 // Receive-side packet events.
55 kDuplicateAudioPacketReceived
,
56 kDuplicateVideoPacketReceived
,
57 kNumOfLoggingEvents
= kDuplicateVideoPacketReceived
60 const char* CastLoggingToString(CastLoggingEvent event
);
62 // CastLoggingEvent are classified into one of three following types.
63 enum EventMediaType
{ AUDIO_EVENT
, VIDEO_EVENT
, OTHER_EVENT
};
65 EventMediaType
GetEventMediaType(CastLoggingEvent event
);
71 RtpTimestamp rtp_timestamp
;
73 // Size of encoded frame. Only set for kVideoFrameEncoded event.
76 // Time of event logged.
77 base::TimeTicks timestamp
;
79 CastLoggingEvent type
;
81 // Render / playout delay. Only set for kAudioPlayoutDelay and
82 // kVideoRenderDelay events.
83 base::TimeDelta delay_delta
;
85 // Whether the frame is a key frame. Only set for kVideoFrameEncoded event.
88 // The requested target bitrate of the encoder at the time the frame is
89 // encoded. Only set for kVideoFrameEncoded event.
97 RtpTimestamp rtp_timestamp
;
103 // Time of event logged.
104 base::TimeTicks timestamp
;
105 CastLoggingEvent type
;
111 #endif // MEDIA_CAST_LOGGING_LOGGING_DEFINES_H_