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 22 matching lines...) Expand all Loading... |
33 // buffer for it, otherwise SRTP will fail later. If SRTP ever uses | 33 // buffer for it, otherwise SRTP will fail later. If SRTP ever uses |
34 // more than this, we need to increase this number. | 34 // more than this, we need to increase this number. |
35 static const size_t kMaxSrtpHmacOverhead = 16; | 35 static const size_t kMaxSrtpHmacOverhead = 16; |
36 | 36 |
37 RtpDataEngine::RtpDataEngine() { | 37 RtpDataEngine::RtpDataEngine() { |
38 data_codecs_.push_back( | 38 data_codecs_.push_back( |
39 DataCodec(kGoogleRtpDataCodecPlType, kGoogleRtpDataCodecName)); | 39 DataCodec(kGoogleRtpDataCodecPlType, kGoogleRtpDataCodecName)); |
40 } | 40 } |
41 | 41 |
42 DataMediaChannel* RtpDataEngine::CreateChannel( | 42 DataMediaChannel* RtpDataEngine::CreateChannel( |
| 43 DataChannelType data_channel_type, |
43 const MediaConfig& config) { | 44 const MediaConfig& config) { |
| 45 if (data_channel_type != DCT_RTP) { |
| 46 return NULL; |
| 47 } |
44 return new RtpDataMediaChannel(config); | 48 return new RtpDataMediaChannel(config); |
45 } | 49 } |
46 | 50 |
47 static const DataCodec* FindCodecByName(const std::vector<DataCodec>& codecs, | 51 static const DataCodec* FindCodecByName(const std::vector<DataCodec>& codecs, |
48 const std::string& name) { | 52 const std::string& name) { |
49 for (const DataCodec& codec : codecs) { | 53 for (const DataCodec& codec : codecs) { |
50 if (_stricmp(name.c_str(), codec.name.c_str()) == 0) | 54 if (_stricmp(name.c_str(), codec.name.c_str()) == 0) |
51 return &codec; | 55 return &codec; |
52 } | 56 } |
53 return nullptr; | 57 return nullptr; |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 *result = SDR_SUCCESS; | 341 *result = SDR_SUCCESS; |
338 } | 342 } |
339 return true; | 343 return true; |
340 } | 344 } |
341 | 345 |
342 rtc::DiffServCodePoint RtpDataMediaChannel::PreferredDscp() const { | 346 rtc::DiffServCodePoint RtpDataMediaChannel::PreferredDscp() const { |
343 return rtc::DSCP_AF41; | 347 return rtc::DSCP_AF41; |
344 } | 348 } |
345 | 349 |
346 } // namespace cricket | 350 } // namespace cricket |
OLD | NEW |