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

Side by Side Diff: webrtc/media/engine/payload_type_mapper.cc

Issue 2516993002: Pass SdpAudioFormat through Channel, without converting to CodecInst (Closed)
Patch Set: add TODO 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/engine/payload_type_mapper.h ('k') | webrtc/media/engine/webrtcvoiceengine.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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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
11 #include "webrtc/media/engine/payload_type_mapper.h" 11 #include "webrtc/media/engine/payload_type_mapper.h"
12 12
13 #include "webrtc/common_types.h" 13 #include "webrtc/common_types.h"
14 #include "webrtc/media/base/mediaconstants.h" 14 #include "webrtc/media/base/mediaconstants.h"
15 #include "webrtc/modules/audio_coding/codecs/audio_format.h"
15 16
16 namespace cricket { 17 namespace cricket {
17 18
19 webrtc::SdpAudioFormat AudioCodecToSdpAudioFormat(const AudioCodec& ac) {
20 return webrtc::SdpAudioFormat(ac.name, ac.clockrate, ac.channels, ac.params);
21 }
22
18 PayloadTypeMapper::PayloadTypeMapper() 23 PayloadTypeMapper::PayloadTypeMapper()
19 // RFC 3551 reserves payload type numbers in the range 96-127 exclusively 24 // RFC 3551 reserves payload type numbers in the range 96-127 exclusively
20 // for dynamic assignment. Once those are used up, it is recommended that 25 // for dynamic assignment. Once those are used up, it is recommended that
21 // payload types unassigned by the RFC are used for dynamic payload type 26 // payload types unassigned by the RFC are used for dynamic payload type
22 // mapping, before any static payload ids. At this point, we only support 27 // mapping, before any static payload ids. At this point, we only support
23 // mapping within the exclusive range. 28 // mapping within the exclusive range.
24 : next_unused_payload_type_(96), 29 : next_unused_payload_type_(96),
25 max_payload_type_(127), 30 max_payload_type_(127),
26 mappings_({ 31 mappings_({
27 // Static payload type assignments according to RFC 3551. 32 // Static payload type assignments according to RFC 3551.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 if (name_cmp == 0) 141 if (name_cmp == 0)
137 return a.parameters < b.parameters; 142 return a.parameters < b.parameters;
138 return name_cmp < 0; 143 return name_cmp < 0;
139 } 144 }
140 return a.num_channels < b.num_channels; 145 return a.num_channels < b.num_channels;
141 } 146 }
142 return a.clockrate_hz < b.clockrate_hz; 147 return a.clockrate_hz < b.clockrate_hz;
143 } 148 }
144 149
145 } // namespace cricket 150 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/payload_type_mapper.h ('k') | webrtc/media/engine/webrtcvoiceengine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698