| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_CAST_LOGGING_LOG_DESERIALIZER_H_ | 5 #ifndef MEDIA_CAST_LOGGING_LOG_DESERIALIZER_H_ |
| 6 #define MEDIA_CAST_LOGGING_LOG_DESERIALIZER_H_ | 6 #define MEDIA_CAST_LOGGING_LOG_DESERIALIZER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "media/cast/logging/encoding_event_subscriber.h" | 11 #include "media/cast/logging/encoding_event_subscriber.h" |
| 12 | 12 |
| 13 namespace media { | 13 namespace media { |
| 14 namespace cast { | 14 namespace cast { |
| 15 | 15 |
| 16 // This function takes the output of LogSerializer and deserializes it into | 16 // This function takes the output of LogSerializer and deserializes it into |
| 17 // its original format. Returns true if deserialization is successful. All | 17 // its original format. Returns true if deserialization is successful. All |
| 18 // output arguments are valid if this function returns true. | 18 // output arguments are valid if this function returns true. |
| 19 // |data|: Serialized event logs. | 19 // |data|: Serialized event logs with length |data_bytes|. |
| 20 // |is_audio|: This will be set to true or false depending on whether the data | 20 // |compressed|: true if |data| is compressed in gzip format. |
| 21 // is for an audio or video stream. | 21 // |log_metadata|: This will be populated with deserialized LogMetadata proto. |
| 22 // |frame_events|: This will be populated with deserialized frame events. | 22 // |frame_events|: This will be populated with deserialized frame events. |
| 23 // |packet_events|: This will be populated with deserialized packet events. | 23 // |packet_events|: This will be populated with deserialized packet events. |
| 24 // |first_rtp_timestamp|: This will be populated with the first RTP timestamp | 24 bool DeserializeEvents(char* data, |
| 25 // of the events. | 25 int data_bytes, |
| 26 bool DeserializeEvents(const std::string& data, | 26 bool compressed, |
| 27 media::cast::proto::LogMetadata* metadata, | 27 media::cast::proto::LogMetadata* log_metadata, |
| 28 FrameEventMap* frame_events, | 28 FrameEventMap* frame_events, |
| 29 PacketEventMap* packet_events); | 29 PacketEventMap* packet_events); |
| 30 | 30 |
| 31 } // namespace cast | 31 } // namespace cast |
| 32 } // namespace media | 32 } // namespace media |
| 33 | 33 |
| 34 #endif // MEDIA_CAST_LOGGING_LOG_DESERIALIZER_H_ | 34 #endif // MEDIA_CAST_LOGGING_LOG_DESERIALIZER_H_ |
| OLD | NEW |