| 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_reader.h" | 5 #include "remoting/protocol/protobuf_video_reader.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" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 return; | 46 return; |
| 47 } | 47 } |
| 48 | 48 |
| 49 DCHECK(!channel_.get()); | 49 DCHECK(!channel_.get()); |
| 50 channel_ = socket.Pass(); | 50 channel_ = socket.Pass(); |
| 51 reader_.Init(channel_.get(), base::Bind(&ProtobufVideoReader::OnNewData, | 51 reader_.Init(channel_.get(), base::Bind(&ProtobufVideoReader::OnNewData, |
| 52 base::Unretained(this))); | 52 base::Unretained(this))); |
| 53 initialized_callback_.Run(true); | 53 initialized_callback_.Run(true); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void ProtobufVideoReader::OnNewData(VideoPacket* packet, | 56 void ProtobufVideoReader::OnNewData(scoped_ptr<VideoPacket> packet, |
| 57 const base::Closure& done_task) { | 57 const base::Closure& done_task) { |
| 58 video_stub_->ProcessVideoPacket(packet, done_task); | 58 video_stub_->ProcessVideoPacket(packet.Pass(), done_task); |
| 59 } | 59 } |
| 60 | 60 |
| 61 } // namespace protocol | 61 } // namespace protocol |
| 62 } // namespace remoting | 62 } // namespace remoting |
| OLD | NEW |