From 77ceff9276ebad66818e1ad0e2a04635eb8eb40a Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Fri, 15 Jan 2021 08:55:24 +0100 Subject: [PATCH] payload type mapper: use media constants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BUG=None Change-Id: I0651376dddf0c2582d81f638810a35dbdcf30b50 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202020 Reviewed-by: Per Ã…hgren Commit-Queue: Philipp Hancke Cr-Commit-Position: refs/heads/master@{#33022} --- media/engine/payload_type_mapper.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/media/engine/payload_type_mapper.cc b/media/engine/payload_type_mapper.cc index e9f863ca63..8c85f02fe8 100644 --- a/media/engine/payload_type_mapper.cc +++ b/media/engine/payload_type_mapper.cc @@ -32,18 +32,18 @@ PayloadTypeMapper::PayloadTypeMapper() max_payload_type_(127), mappings_( {// Static payload type assignments according to RFC 3551. - {{"PCMU", 8000, 1}, 0}, + {{kPcmuCodecName, 8000, 1}, 0}, {{"GSM", 8000, 1}, 3}, {{"G723", 8000, 1}, 4}, {{"DVI4", 8000, 1}, 5}, {{"DVI4", 16000, 1}, 6}, {{"LPC", 8000, 1}, 7}, - {{"PCMA", 8000, 1}, 8}, - {{"G722", 8000, 1}, 9}, - {{"L16", 44100, 2}, 10}, - {{"L16", 44100, 1}, 11}, + {{kPcmaCodecName, 8000, 1}, 8}, + {{kG722CodecName, 8000, 1}, 9}, + {{kL16CodecName, 44100, 2}, 10}, + {{kL16CodecName, 44100, 1}, 11}, {{"QCELP", 8000, 1}, 12}, - {{"CN", 8000, 1}, 13}, + {{kCnCodecName, 8000, 1}, 13}, // RFC 4566 is a bit ambiguous on the contents of the "encoding // parameters" field, which, for audio, encodes the number of // channels. It is "optional and may be omitted if the number of @@ -70,7 +70,8 @@ PayloadTypeMapper::PayloadTypeMapper() {{kOpusCodecName, 48000, 2, - {{"minptime", "10"}, {"useinbandfec", "1"}}}, + {{kCodecParamMinPTime, "10"}, + {kCodecParamUseInbandFec, kParamValueTrue}}}, 111}, // TODO(solenberg): Remove the hard coded 16k,32k,48k DTMF once we // assign payload types dynamically for send side as well.