OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "remoting/protocol/protobuf_video_writer.h" | 5 #include "remoting/protocol/protobuf_video_writer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "net/socket/stream_socket.h" | 8 #include "net/socket/stream_socket.h" |
9 #include "remoting/base/constants.h" | 9 #include "remoting/base/constants.h" |
10 #include "remoting/proto/video.pb.h" | 10 #include "remoting/proto/video.pb.h" |
| 11 #include "remoting/protocol/channel_factory.h" |
11 #include "remoting/protocol/message_serialization.h" | 12 #include "remoting/protocol/message_serialization.h" |
12 #include "remoting/protocol/session.h" | 13 #include "remoting/protocol/session.h" |
13 #include "remoting/protocol/stream_channel_factory.h" | |
14 | 14 |
15 namespace remoting { | 15 namespace remoting { |
16 namespace protocol { | 16 namespace protocol { |
17 | 17 |
18 ProtobufVideoWriter::ProtobufVideoWriter() | 18 ProtobufVideoWriter::ProtobufVideoWriter() |
19 : channel_factory_(NULL) { | 19 : channel_factory_(NULL) { |
20 } | 20 } |
21 | 21 |
22 ProtobufVideoWriter::~ProtobufVideoWriter() { | 22 ProtobufVideoWriter::~ProtobufVideoWriter() { |
23 Close(); | 23 Close(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 return channel_.get() != NULL; | 61 return channel_.get() != NULL; |
62 } | 62 } |
63 | 63 |
64 void ProtobufVideoWriter::ProcessVideoPacket(scoped_ptr<VideoPacket> packet, | 64 void ProtobufVideoWriter::ProcessVideoPacket(scoped_ptr<VideoPacket> packet, |
65 const base::Closure& done) { | 65 const base::Closure& done) { |
66 buffered_writer_.Write(SerializeAndFrameMessage(*packet), done); | 66 buffered_writer_.Write(SerializeAndFrameMessage(*packet), done); |
67 } | 67 } |
68 | 68 |
69 } // namespace protocol | 69 } // namespace protocol |
70 } // namespace remoting | 70 } // namespace remoting |
OLD | NEW |