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 #include "remoting/protocol/video_reader.h" | 5 #include "remoting/protocol/video_reader.h" |
6 | 6 |
7 #include "remoting/protocol/session_config.h" | 7 #include "remoting/protocol/session_config.h" |
8 #include "remoting/protocol/protobuf_video_reader.h" | 8 #include "remoting/protocol/protobuf_video_reader.h" |
9 #include "remoting/protocol/rtp_video_reader.h" | 9 #include "remoting/protocol/rtp_video_reader.h" |
10 | 10 |
11 namespace remoting { | 11 namespace remoting { |
12 namespace protocol { | 12 namespace protocol { |
13 | 13 |
14 VideoReader::~VideoReader() { } | 14 VideoReader::~VideoReader() { } |
15 | 15 |
16 // static | 16 // static |
17 VideoReader* VideoReader::Create(const SessionConfig* config) { | 17 VideoReader* VideoReader::Create(const SessionConfig* config) { |
18 const ChannelConfig& video_config = config->video_config(); | 18 const ChannelConfig& video_config = config->video_config(); |
19 LOG(ERROR) << "Creating " << video_config.codec; | |
Wez
2011/08/04 23:49:52
nit: Errant logging.
Sergey Ulanov
2011/08/09 19:41:10
Done.
| |
19 if (video_config.transport == ChannelConfig::TRANSPORT_SRTP) { | 20 if (video_config.transport == ChannelConfig::TRANSPORT_SRTP) { |
20 return new RtpVideoReader(); | 21 return new RtpVideoReader(); |
21 } else if (video_config.transport == ChannelConfig::TRANSPORT_STREAM) { | 22 } else if (video_config.transport == ChannelConfig::TRANSPORT_STREAM) { |
22 if (video_config.codec == ChannelConfig::CODEC_VP8) | 23 if (video_config.codec == ChannelConfig::CODEC_VP8) |
23 return new ProtobufVideoReader(VideoPacketFormat::ENCODING_VP8); | 24 return new ProtobufVideoReader(VideoPacketFormat::ENCODING_VP8); |
24 else if (video_config.codec == ChannelConfig::CODEC_ZIP) | 25 else if (video_config.codec == ChannelConfig::CODEC_ZIP) |
25 return new ProtobufVideoReader(VideoPacketFormat::ENCODING_ZLIB); | 26 return new ProtobufVideoReader(VideoPacketFormat::ENCODING_ZLIB); |
26 else if (video_config.codec == ChannelConfig::CODEC_VERBATIM) | 27 else if (video_config.codec == ChannelConfig::CODEC_VERBATIM) |
27 return new ProtobufVideoReader(VideoPacketFormat::ENCODING_VERBATIM); | 28 return new ProtobufVideoReader(VideoPacketFormat::ENCODING_VERBATIM); |
28 } | 29 } |
29 NOTREACHED(); | 30 NOTREACHED(); |
30 return NULL; | 31 return NULL; |
31 } | 32 } |
32 | 33 |
33 } // namespace protocol | 34 } // namespace protocol |
34 } // namespace remoting | 35 } // namespace remoting |
OLD | NEW |