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_SERIALIZER_H_
6 #define MEDIA_CAST_LOGGING_LOG_SERIALIZER_H_
10 #include "media/cast/logging/encoding_event_subscriber.h"
15 // Serialize |frame_events|, |packet_events|, |log_metadata|
16 // returned from EncodingEventSubscriber.
17 // Result is written to |output|, which can hold |max_output_bytes| of data.
18 // If |compress| is true, |output| will be set with data compresssed in
20 // |output_bytes| will be set to number of bytes written.
22 // Returns |true| if serialization is successful. This function
23 // returns |false| if the serialized string will exceed |max_output_bytes|.
25 // See .cc file for format specification.
26 bool SerializeEvents(const media::cast::proto::LogMetadata
& log_metadata
,
27 const FrameEventList
& frame_events
,
28 const PacketEventList
& packet_events
,
37 #endif // MEDIA_CAST_LOGGING_LOG_SERIALIZER_H_