1 // Copyright (c) 2010 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 REMOTING_BASE_PROTOCOL_UTIL_H_
6 #define REMOTING_BASE_PROTOCOL_UTIL_H_
8 #include "google/protobuf/message_lite.h"
9 #include "media/base/data_buffer.h"
10 #include "remoting/base/protocol/chromotocol.pb.h"
12 // This file defines utility methods used for encoding and decoding the protocol
13 // used in Chromoting.
16 // Serialize the Protocol Buffer message and provide sufficient framing for
17 // sending it over the wire.
18 // This will provide sufficient prefix and suffix for the receiver side to
19 // decode the message.
20 scoped_refptr
<media::DataBuffer
> SerializeAndFrameMessage(
21 const google::protobuf::MessageLite
& msg
);
23 int GetBytesPerPixel(PixelFormat format
);
25 } // namespace remoting
27 #endif // REMOTING_BASE_PROTOCOL_UTIL_H_