Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(661)

Side by Side Diff: webrtc/media/base/rtpdataengine.cc

Issue 2564333002: Reland of: Separating SCTP code from BaseChannel/MediaChannel. (Closed)
Patch Set: Merge with master. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/media/base/rtpdataengine.h ('k') | webrtc/media/base/rtpdataengine_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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,
44 const MediaConfig& config) { 43 const MediaConfig& config) {
45 if (data_channel_type != DCT_RTP) {
46 return NULL;
47 }
48 return new RtpDataMediaChannel(config); 44 return new RtpDataMediaChannel(config);
49 } 45 }
50 46
51 static const DataCodec* FindCodecByName(const std::vector<DataCodec>& codecs, 47 static const DataCodec* FindCodecByName(const std::vector<DataCodec>& codecs,
52 const std::string& name) { 48 const std::string& name) {
53 for (const DataCodec& codec : codecs) { 49 for (const DataCodec& codec : codecs) {
54 if (_stricmp(name.c_str(), codec.name.c_str()) == 0) 50 if (_stricmp(name.c_str(), codec.name.c_str()) == 0)
55 return &codec; 51 return &codec;
56 } 52 }
57 return nullptr; 53 return nullptr;
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 *result = SDR_SUCCESS; 337 *result = SDR_SUCCESS;
342 } 338 }
343 return true; 339 return true;
344 } 340 }
345 341
346 rtc::DiffServCodePoint RtpDataMediaChannel::PreferredDscp() const { 342 rtc::DiffServCodePoint RtpDataMediaChannel::PreferredDscp() const {
347 return rtc::DSCP_AF41; 343 return rtc::DSCP_AF41;
348 } 344 }
349 345
350 } // namespace cricket 346 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/base/rtpdataengine.h ('k') | webrtc/media/base/rtpdataengine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698