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) \
16 const char* CastLoggingToString(CastLoggingEvent 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
);
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()
44 frame_id(kFrameIdUnknown
),
49 media_type(UNKNOWN_EVENT
) {}
50 PacketEvent::~PacketEvent() {}