| Index: remoting/protocol/protobuf_video_reader.cc
|
| diff --git a/remoting/protocol/protobuf_video_reader.cc b/remoting/protocol/protobuf_video_reader.cc
|
| index 827a63f49262bd74ea55e66f200f0d38dbfd0fb2..1c0a74a1643825aa185a2c8aca4711e8643f2c56 100644
|
| --- a/remoting/protocol/protobuf_video_reader.cc
|
| +++ b/remoting/protocol/protobuf_video_reader.cc
|
| @@ -8,30 +8,31 @@
|
| #include "net/socket/stream_socket.h"
|
| #include "remoting/base/constants.h"
|
| #include "remoting/proto/video.pb.h"
|
| +#include "remoting/protocol/channel_factory.h"
|
| #include "remoting/protocol/session.h"
|
|
|
| namespace remoting {
|
| namespace protocol {
|
|
|
| ProtobufVideoReader::ProtobufVideoReader(VideoPacketFormat::Encoding encoding)
|
| - : session_(NULL),
|
| + : channel_factory_(NULL),
|
| encoding_(encoding),
|
| video_stub_(NULL) {
|
| }
|
|
|
| ProtobufVideoReader::~ProtobufVideoReader() {
|
| - if (session_)
|
| - session_->CancelChannelCreation(kVideoChannelName);
|
| + if (channel_factory_)
|
| + channel_factory_->CancelChannelCreation(kVideoChannelName);
|
| }
|
|
|
| void ProtobufVideoReader::Init(protocol::Session* session,
|
| VideoStub* video_stub,
|
| const InitializedCallback& callback) {
|
| - session_ = session;
|
| + channel_factory_ = session->GetMainChannelFactory();
|
| initialized_callback_ = callback;
|
| video_stub_ = video_stub;
|
|
|
| - session_->CreateStreamChannel(
|
| + channel_factory_->CreateStreamChannel(
|
| kVideoChannelName,
|
| base::Bind(&ProtobufVideoReader::OnChannelReady, base::Unretained(this)));
|
| }
|
|
|