Updating XTBs based on .GRDs from branch master
[chromium-blink-merge.git] / media / cast / logging / logging_defines.cc
blobe240b2f5062016c3c6596adc14b3084af06cbbc3
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 #include "media/cast/logging/logging_defines.h"
7 #include "base/logging.h"
9 #define ENUM_TO_STRING(enum) \
10 case enum: \
11 return #enum
13 namespace media {
14 namespace cast {
16 const char* CastLoggingToString(CastLoggingEvent event) {
17 switch (event) {
18 ENUM_TO_STRING(UNKNOWN);
19 ENUM_TO_STRING(FRAME_CAPTURE_BEGIN);
20 ENUM_TO_STRING(FRAME_CAPTURE_END);
21 ENUM_TO_STRING(FRAME_ENCODED);
22 ENUM_TO_STRING(FRAME_ACK_RECEIVED);
23 ENUM_TO_STRING(FRAME_ACK_SENT);
24 ENUM_TO_STRING(FRAME_DECODED);
25 ENUM_TO_STRING(FRAME_PLAYOUT);
26 ENUM_TO_STRING(PACKET_SENT_TO_NETWORK);
27 ENUM_TO_STRING(PACKET_RETRANSMITTED);
28 ENUM_TO_STRING(PACKET_RTX_REJECTED);
29 ENUM_TO_STRING(PACKET_RECEIVED);
31 NOTREACHED();
32 return "";
35 FrameEvent::FrameEvent()
36 : rtp_timestamp(0u), frame_id(kFrameIdUnknown), width(0), height(0),
37 size(0u), type(UNKNOWN), media_type(UNKNOWN_EVENT), key_frame(false),
38 target_bitrate(0), encoder_cpu_utilization(-1.0),
39 idealized_bitrate_utilization(-1.0) {}
40 FrameEvent::~FrameEvent() {}
42 PacketEvent::PacketEvent()
43 : rtp_timestamp(0),
44 frame_id(kFrameIdUnknown),
45 max_packet_id(0),
46 packet_id(0),
47 size(0),
48 type(UNKNOWN),
49 media_type(UNKNOWN_EVENT) {}
50 PacketEvent::~PacketEvent() {}
52 } // namespace cast
53 } // namespace media