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