1 // Copyright 2014 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_LOG_DESERIALIZER_H_
6 #define MEDIA_CAST_LOGGING_LOG_DESERIALIZER_H_
11 #include "base/memory/linked_ptr.h"
12 #include "media/cast/logging/logging_defines.h"
13 #include "media/cast/logging/proto/raw_events.pb.h"
18 typedef std::map
<RtpTimestamp
,
19 linked_ptr
<media::cast::proto::AggregatedFrameEvent
> >
21 typedef std::map
<RtpTimestamp
,
22 linked_ptr
<media::cast::proto::AggregatedPacketEvent
> >
25 // Represents deserialized raw event logs for a particular stream.
26 struct DeserializedLog
{
29 proto::LogMetadata metadata
;
30 FrameEventMap frame_events
;
31 PacketEventMap packet_events
;
34 // This function takes the output of LogSerializer and deserializes it into
35 // its original format. Returns true if deserialization is successful. All
36 // output arguments are valid if this function returns true.
37 // |data|: Serialized event logs with length |data_bytes|.
38 // |compressed|: true if |data| is compressed in gzip format.
39 // |log_metadata|: This will be populated with deserialized LogMetadata proto.
40 // |audio_log|, |video_log|: These will be populated with deserialized
41 // log data for audio and video streams, respectively.
42 bool DeserializeEvents(const char* data
,
45 DeserializedLog
* audio_log
,
46 DeserializedLog
* video_log
);
51 #endif // MEDIA_CAST_LOGGING_LOG_DESERIALIZER_H_