OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PROTOCOL_PROTOBUF_VIDEO_WRITER_H_ | 5 #ifndef REMOTING_PROTOCOL_PROTOBUF_VIDEO_WRITER_H_ |
6 #define REMOTING_PROTOCOL_PROTOBUF_VIDEO_WRITER_H_ | 6 #define REMOTING_PROTOCOL_PROTOBUF_VIDEO_WRITER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 ProtobufVideoWriter(base::MessageLoopProxy* message_loop); | 31 ProtobufVideoWriter(base::MessageLoopProxy* message_loop); |
32 virtual ~ProtobufVideoWriter(); | 32 virtual ~ProtobufVideoWriter(); |
33 | 33 |
34 // VideoWriter interface. | 34 // VideoWriter interface. |
35 virtual void Init(protocol::Session* session, | 35 virtual void Init(protocol::Session* session, |
36 const InitializedCallback& callback) OVERRIDE; | 36 const InitializedCallback& callback) OVERRIDE; |
37 virtual void Close() OVERRIDE; | 37 virtual void Close() OVERRIDE; |
38 | 38 |
39 // VideoStub interface. | 39 // VideoStub interface. |
40 virtual void ProcessVideoPacket(const VideoPacket* packet, | 40 virtual void ProcessVideoPacket(const VideoPacket* packet, |
41 Task* done) OVERRIDE; | 41 const base::Closure& done) OVERRIDE; |
42 virtual int GetPendingPackets() OVERRIDE; | 42 virtual int GetPendingPackets() OVERRIDE; |
43 | 43 |
44 private: | 44 private: |
45 void OnChannelReady(net::StreamSocket* socket); | 45 void OnChannelReady(net::StreamSocket* socket); |
46 | 46 |
47 InitializedCallback initialized_callback_; | 47 InitializedCallback initialized_callback_; |
48 | 48 |
49 // TODO(sergeyu): Remove |channel_| and let |buffered_writer_| own it. | 49 // TODO(sergeyu): Remove |channel_| and let |buffered_writer_| own it. |
50 scoped_ptr<net::StreamSocket> channel_; | 50 scoped_ptr<net::StreamSocket> channel_; |
51 | 51 |
52 scoped_refptr<BufferedSocketWriter> buffered_writer_; | 52 scoped_refptr<BufferedSocketWriter> buffered_writer_; |
53 | 53 |
54 DISALLOW_COPY_AND_ASSIGN(ProtobufVideoWriter); | 54 DISALLOW_COPY_AND_ASSIGN(ProtobufVideoWriter); |
55 }; | 55 }; |
56 | 56 |
57 } // namespace protocol | 57 } // namespace protocol |
58 } // namespace remoting | 58 } // namespace remoting |
59 | 59 |
60 #endif // REMOTING_PROTOCOL_PROTOBUF_VIDEO_WRITER_H_ | 60 #endif // REMOTING_PROTOCOL_PROTOBUF_VIDEO_WRITER_H_ |
OLD | NEW |