| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 80 } |
| 81 | 81 |
| 82 const DataCodec* FindUnknownCodec(const std::vector<DataCodec>& codecs) { | 82 const DataCodec* FindUnknownCodec(const std::vector<DataCodec>& codecs) { |
| 83 DataCodec data_codec(kGoogleRtpDataCodecPlType, kGoogleRtpDataCodecName); | 83 DataCodec data_codec(kGoogleRtpDataCodecPlType, kGoogleRtpDataCodecName); |
| 84 std::vector<DataCodec>::const_iterator iter; | 84 std::vector<DataCodec>::const_iterator iter; |
| 85 for (iter = codecs.begin(); iter != codecs.end(); ++iter) { | 85 for (iter = codecs.begin(); iter != codecs.end(); ++iter) { |
| 86 if (!iter->Matches(data_codec)) { | 86 if (!iter->Matches(data_codec)) { |
| 87 return &(*iter); | 87 return &(*iter); |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 return NULL; | 90 return nullptr; |
| 91 } | 91 } |
| 92 | 92 |
| 93 const DataCodec* FindKnownCodec(const std::vector<DataCodec>& codecs) { | 93 const DataCodec* FindKnownCodec(const std::vector<DataCodec>& codecs) { |
| 94 DataCodec data_codec(kGoogleRtpDataCodecPlType, kGoogleRtpDataCodecName); | 94 DataCodec data_codec(kGoogleRtpDataCodecPlType, kGoogleRtpDataCodecName); |
| 95 std::vector<DataCodec>::const_iterator iter; | 95 std::vector<DataCodec>::const_iterator iter; |
| 96 for (iter = codecs.begin(); iter != codecs.end(); ++iter) { | 96 for (iter = codecs.begin(); iter != codecs.end(); ++iter) { |
| 97 if (iter->Matches(data_codec)) { | 97 if (iter->Matches(data_codec)) { |
| 98 return &(*iter); | 98 return &(*iter); |
| 99 } | 99 } |
| 100 } | 100 } |
| 101 return NULL; | 101 return nullptr; |
| 102 } | 102 } |
| 103 | 103 |
| 104 bool RtpDataMediaChannel::SetRecvCodecs(const std::vector<DataCodec>& codecs) { | 104 bool RtpDataMediaChannel::SetRecvCodecs(const std::vector<DataCodec>& codecs) { |
| 105 const DataCodec* unknown_codec = FindUnknownCodec(codecs); | 105 const DataCodec* unknown_codec = FindUnknownCodec(codecs); |
| 106 if (unknown_codec) { | 106 if (unknown_codec) { |
| 107 LOG(LS_WARNING) << "Failed to SetRecvCodecs because of unknown codec: " | 107 LOG(LS_WARNING) << "Failed to SetRecvCodecs because of unknown codec: " |
| 108 << unknown_codec->ToString(); | 108 << unknown_codec->ToString(); |
| 109 return false; | 109 return false; |
| 110 } | 110 } |
| 111 | 111 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 *result = SDR_SUCCESS; | 337 *result = SDR_SUCCESS; |
| 338 } | 338 } |
| 339 return true; | 339 return true; |
| 340 } | 340 } |
| 341 | 341 |
| 342 rtc::DiffServCodePoint RtpDataMediaChannel::PreferredDscp() const { | 342 rtc::DiffServCodePoint RtpDataMediaChannel::PreferredDscp() const { |
| 343 return rtc::DSCP_AF41; | 343 return rtc::DSCP_AF41; |
| 344 } | 344 } |
| 345 | 345 |
| 346 } // namespace cricket | 346 } // namespace cricket |
| OLD | NEW |