| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 VideoCodingModule::Create(clock_, null_event_factory_.get())); | 130 VideoCodingModule::Create(clock_, null_event_factory_.get())); |
| 131 if (vcm.get() == NULL) { | 131 if (vcm.get() == NULL) { |
| 132 return NULL; | 132 return NULL; |
| 133 } | 133 } |
| 134 | 134 |
| 135 const PayloadTypes& plt = stream->payload_types(); | 135 const PayloadTypes& plt = stream->payload_types(); |
| 136 for (PayloadTypesIterator it = plt.begin(); it != plt.end(); ++it) { | 136 for (PayloadTypesIterator it = plt.begin(); it != plt.end(); ++it) { |
| 137 if (it->codec_type() != kVideoCodecULPFEC && | 137 if (it->codec_type() != kVideoCodecULPFEC && |
| 138 it->codec_type() != kVideoCodecRED) { | 138 it->codec_type() != kVideoCodecRED) { |
| 139 VideoCodec codec; | 139 VideoCodec codec; |
| 140 if (VideoCodingModule::Codec(it->codec_type(), &codec) < 0) { | 140 VideoCodingModule::Codec(it->codec_type(), &codec); |
| 141 return NULL; | |
| 142 } | |
| 143 codec.plType = it->payload_type(); | 141 codec.plType = it->payload_type(); |
| 144 if (vcm->RegisterReceiveCodec(&codec, 1) < 0) { | 142 if (vcm->RegisterReceiveCodec(&codec, 1) < 0) { |
| 145 return NULL; | 143 return NULL; |
| 146 } | 144 } |
| 147 } | 145 } |
| 148 } | 146 } |
| 149 | 147 |
| 150 vcm->SetChannelParameters(0, 0, rtt_ms_); | 148 vcm->SetChannelParameters(0, 0, rtt_ms_); |
| 151 vcm->SetVideoProtection(protection_method_, protection_enabled_); | 149 vcm->SetVideoProtection(protection_method_, protection_enabled_); |
| 152 vcm->SetRenderDelay(render_delay_ms_); | 150 vcm->SetRenderDelay(render_delay_ms_); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 void VcmPayloadSinkFactory::Remove(VcmPayloadSink* sink) { | 195 void VcmPayloadSinkFactory::Remove(VcmPayloadSink* sink) { |
| 198 assert(sink); | 196 assert(sink); |
| 199 CriticalSectionScoped cs(crit_sect_.get()); | 197 CriticalSectionScoped cs(crit_sect_.get()); |
| 200 Sinks::iterator it = std::find(sinks_.begin(), sinks_.end(), sink); | 198 Sinks::iterator it = std::find(sinks_.begin(), sinks_.end(), sink); |
| 201 assert(it != sinks_.end()); | 199 assert(it != sinks_.end()); |
| 202 sinks_.erase(it); | 200 sinks_.erase(it); |
| 203 } | 201 } |
| 204 | 202 |
| 205 } // namespace rtpplayer | 203 } // namespace rtpplayer |
| 206 } // namespace webrtc | 204 } // namespace webrtc |
| OLD | NEW |