Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / media / cast / rtcp / rtcp_utility.h
index e314a1a..fa85744 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "media/cast/cast_config.h"
 #include "media/cast/cast_defines.h"
+#include "media/cast/logging/logging_defines.h"
 #include "media/cast/rtcp/rtcp_defines.h"
 
 namespace media {
@@ -152,7 +153,10 @@ struct RtcpFieldApplicationSpecificCastReceiverLogItem {
   uint32 rtp_timestamp;
   uint32 event_timestamp_base;
   uint8 event;
-  uint16 delay_delta_or_packet_id;
+  union {
+    uint16 packet_id;
+    int16 delay_delta;
+  } delay_delta_or_packet_id;
   uint16 event_timestamp_delta;
 };
 
@@ -340,6 +344,14 @@ class RtcpParser {
   DISALLOW_COPY_AND_ASSIGN(RtcpParser);
 };
 
+// Converts a log event type to an integer value.
+// NOTE: We have only allocated 4 bits to represent the type of event over the
+// wire. Therefore, this function can only return values from 0 to 15.
+uint8 ConvertEventTypeToWireFormat(CastLoggingEvent event);
+
+// The inverse of |ConvertEventTypeToWireFormat()|.
+CastLoggingEvent TranslateToLogEventFromWireFormat(uint8 event);
+
 }  // namespace cast
 }  // namespace media