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_RECEIVED
);
34 FrameEvent::FrameEvent()
35 : rtp_timestamp(0u), frame_id(kFrameIdUnknown
), size(0u), type(UNKNOWN
),
36 media_type(UNKNOWN_EVENT
), key_frame(false), target_bitrate(0) {}
37 FrameEvent::~FrameEvent() {}
39 PacketEvent::PacketEvent()
41 frame_id(kFrameIdUnknown
),
46 media_type(UNKNOWN_EVENT
) {}
47 PacketEvent::~PacketEvent() {}