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

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

Issue 2337473002: Multi frequency DTMF support - receiver side (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | « no previous file | webrtc/media/engine/payload_type_mapper_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) 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
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // and 1 here, to increase the chances it will be correctly used if 46 // and 1 here, to increase the chances it will be correctly used if
47 // someone implements an MPEG audio encoder/decoder. 47 // someone implements an MPEG audio encoder/decoder.
48 {{"MPA", 90000, 0}, 14}, 48 {{"MPA", 90000, 0}, 14},
49 {{"MPA", 90000, 1}, 14}, 49 {{"MPA", 90000, 1}, 14},
50 {{"G728", 8000, 1}, 15}, 50 {{"G728", 8000, 1}, 15},
51 {{"DVI4", 11025, 1}, 16}, 51 {{"DVI4", 11025, 1}, 16},
52 {{"DVI4", 22050, 1}, 17}, 52 {{"DVI4", 22050, 1}, 17},
53 {{"G729", 8000, 1}, 18}, 53 {{"G729", 8000, 1}, 18},
54 54
55 // Payload type assignments currently used by WebRTC. 55 // Payload type assignments currently used by WebRTC.
56 // Includes video, to reduce collisions (and thus reassignments) 56 // Includes video and data to reduce collisions (and thus
57 // reassignments).
57 // RTX codecs mapping to specific video payload types 58 // RTX codecs mapping to specific video payload types
58 {{kRtxCodecName, 90000, 0, 59 {{kRtxCodecName, 90000, 0,
59 {{kCodecParamAssociatedPayloadType, 60 {{kCodecParamAssociatedPayloadType,
60 std::to_string(kDefaultVp8PlType)}}}, 61 std::to_string(kDefaultVp8PlType)}}},
61 kDefaultRtxVp8PlType}, 62 kDefaultRtxVp8PlType},
62 {{kRtxCodecName, 90000, 0, 63 {{kRtxCodecName, 90000, 0,
63 {{kCodecParamAssociatedPayloadType, 64 {{kCodecParamAssociatedPayloadType,
64 std::to_string(kDefaultVp9PlType)}}}, 65 std::to_string(kDefaultVp9PlType)}}},
65 kDefaultRtxVp9PlType}, 66 kDefaultRtxVp9PlType},
66 {{kRtxCodecName, 90000, 0, 67 {{kRtxCodecName, 90000, 0,
67 {{kCodecParamAssociatedPayloadType, 68 {{kCodecParamAssociatedPayloadType,
68 std::to_string(kDefaultRedPlType)}}}, 69 std::to_string(kDefaultRedPlType)}}},
69 kDefaultRtxRedPlType}, 70 kDefaultRtxRedPlType},
70 {{kRtxCodecName, 90000, 0, 71 {{kRtxCodecName, 90000, 0,
71 {{kCodecParamAssociatedPayloadType, 72 {{kCodecParamAssociatedPayloadType,
72 std::to_string(kDefaultH264PlType)}}}, 73 std::to_string(kDefaultH264PlType)}}},
73 kDefaultRtxH264ConstrainedBaselinePlType}, 74 kDefaultRtxH264ConstrainedBaselinePlType},
74 // Other codecs 75 // Other codecs
75 {{kVp8CodecName, 90000, 0}, kDefaultVp8PlType}, 76 {{kVp8CodecName, 90000, 0}, kDefaultVp8PlType},
76 {{kVp9CodecName, 90000, 0}, kDefaultVp9PlType}, 77 {{kVp9CodecName, 90000, 0}, kDefaultVp9PlType},
78 {{kGoogleRtpDataCodecName, 0, 0}, kGoogleRtpDataCodecPlType},
77 {{kIlbcCodecName, 8000, 1}, 102}, 79 {{kIlbcCodecName, 8000, 1}, 102},
78 {{kIsacCodecName, 16000, 1}, 103}, 80 {{kIsacCodecName, 16000, 1}, 103},
79 {{kIsacCodecName, 32000, 1}, 104}, 81 {{kIsacCodecName, 32000, 1}, 104},
80 {{kCnCodecName, 16000, 1}, 105}, 82 {{kCnCodecName, 16000, 1}, 105},
81 {{kCnCodecName, 32000, 1}, 106}, 83 {{kCnCodecName, 32000, 1}, 106},
82 {{kH264CodecName, 90000, 0}, kDefaultH264PlType}, 84 {{kH264CodecName, 90000, 0}, kDefaultH264PlType},
85 {{kGoogleSctpDataCodecName, 0, 0}, kGoogleSctpDataCodecPlType},
83 {{kOpusCodecName, 48000, 2, 86 {{kOpusCodecName, 48000, 2,
84 {{"minptime", "10"}, {"useinbandfec", "1"}}}, 111}, 87 {{"minptime", "10"}, {"useinbandfec", "1"}}}, 111},
85 {{kRedCodecName, 90000, 0}, kDefaultRedPlType}, 88 {{kRedCodecName, 90000, 0}, kDefaultRedPlType},
86 {{kUlpfecCodecName, 90000, 0}, kDefaultUlpfecType}, 89 {{kUlpfecCodecName, 90000, 0}, kDefaultUlpfecType},
87 {{kFlexfecCodecName, 90000, 0}, kDefaultFlexfecPlType}, 90 {{kFlexfecCodecName, 90000, 0}, kDefaultFlexfecPlType},
91 // TODO(solenberg): Remove the hard coded 16k,32k,48k DTMF once we
92 // assign payload types dynamically for send side as well.
93 {{kDtmfCodecName, 48000, 1}, 110},
94 {{kDtmfCodecName, 32000, 1}, 112},
95 {{kDtmfCodecName, 16000, 1}, 113},
88 {{kDtmfCodecName, 8000, 1}, 126}}) { 96 {{kDtmfCodecName, 8000, 1}, 126}}) {
89 // TODO(ossu): Try to keep this as change-proof as possible until we're able 97 // TODO(ossu): Try to keep this as change-proof as possible until we're able
90 // to remove the payload type constants from everywhere in the code. 98 // to remove the payload type constants from everywhere in the code.
91 for (const auto& mapping : mappings_) { 99 for (const auto& mapping : mappings_) {
92 used_payload_types_.insert(mapping.second); 100 used_payload_types_.insert(mapping.second);
93 } 101 }
94 } 102 }
95 103
96 PayloadTypeMapper::~PayloadTypeMapper() = default; 104 PayloadTypeMapper::~PayloadTypeMapper() = default;
97 105
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 if (name_cmp == 0) 159 if (name_cmp == 0)
152 return a.parameters < b.parameters; 160 return a.parameters < b.parameters;
153 return name_cmp < 0; 161 return name_cmp < 0;
154 } 162 }
155 return a.num_channels < b.num_channels; 163 return a.num_channels < b.num_channels;
156 } 164 }
157 return a.clockrate_hz < b.clockrate_hz; 165 return a.clockrate_hz < b.clockrate_hz;
158 } 166 }
159 167
160 } // namespace cricket 168 } // namespace cricket
OLDNEW
« no previous file with comments | « no previous file | webrtc/media/engine/payload_type_mapper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698