Remove leftover SCTP "codec name" constants
These were leftovers from a previous refactoring. Bug: none Change-Id: Iee12c2f7f9a7d80ae8e67aa9134ec84894f94960 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176327 Reviewed-by: Taylor <deadbeef@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31392}
This commit is contained in:
parent
85b288b0ff
commit
b59f337fbd
@ -98,9 +98,6 @@ const char kCodecParamMaxMessageSize[] = "x-google-max-message-size";
|
|||||||
const int kGoogleRtpDataCodecPlType = 109;
|
const int kGoogleRtpDataCodecPlType = 109;
|
||||||
const char kGoogleRtpDataCodecName[] = "google-data";
|
const char kGoogleRtpDataCodecName[] = "google-data";
|
||||||
|
|
||||||
const int kGoogleSctpDataCodecPlType = 108;
|
|
||||||
const char kGoogleSctpDataCodecName[] = "google-sctp-data";
|
|
||||||
|
|
||||||
const char kComfortNoiseCodecName[] = "CN";
|
const char kComfortNoiseCodecName[] = "CN";
|
||||||
|
|
||||||
const char kVp8CodecName[] = "VP8";
|
const char kVp8CodecName[] = "VP8";
|
||||||
|
|||||||
@ -124,12 +124,6 @@ extern const char kCodecParamMaxMessageSize[];
|
|||||||
extern const int kGoogleRtpDataCodecPlType;
|
extern const int kGoogleRtpDataCodecPlType;
|
||||||
extern const char kGoogleRtpDataCodecName[];
|
extern const char kGoogleRtpDataCodecName[];
|
||||||
|
|
||||||
// TODO(pthatcher): Find an id that won't conflict with anything. On
|
|
||||||
// the other hand, it really shouldn't matter since the id won't be
|
|
||||||
// used on the wire.
|
|
||||||
extern const int kGoogleSctpDataCodecPlType;
|
|
||||||
extern const char kGoogleSctpDataCodecName[];
|
|
||||||
|
|
||||||
extern const char kComfortNoiseCodecName[];
|
extern const char kComfortNoiseCodecName[];
|
||||||
|
|
||||||
RTC_EXPORT extern const char kVp8CodecName[];
|
RTC_EXPORT extern const char kVp8CodecName[];
|
||||||
|
|||||||
@ -67,7 +67,6 @@ PayloadTypeMapper::PayloadTypeMapper()
|
|||||||
{{kIsacCodecName, 32000, 1}, 104},
|
{{kIsacCodecName, 32000, 1}, 104},
|
||||||
{{kCnCodecName, 16000, 1}, 105},
|
{{kCnCodecName, 16000, 1}, 105},
|
||||||
{{kCnCodecName, 32000, 1}, 106},
|
{{kCnCodecName, 32000, 1}, 106},
|
||||||
{{kGoogleSctpDataCodecName, 0, 0}, kGoogleSctpDataCodecPlType},
|
|
||||||
{{kOpusCodecName,
|
{{kOpusCodecName,
|
||||||
48000,
|
48000,
|
||||||
2,
|
2,
|
||||||
|
|||||||
@ -52,7 +52,6 @@ TEST_F(PayloadTypeMapperTest, WebRTCPayloadTypes) {
|
|||||||
return mapper_.FindMappingFor({name, 0, 0});
|
return mapper_.FindMappingFor({name, 0, 0});
|
||||||
};
|
};
|
||||||
EXPECT_EQ(kGoogleRtpDataCodecPlType, data_mapping(kGoogleRtpDataCodecName));
|
EXPECT_EQ(kGoogleRtpDataCodecPlType, data_mapping(kGoogleRtpDataCodecName));
|
||||||
EXPECT_EQ(kGoogleSctpDataCodecPlType, data_mapping(kGoogleSctpDataCodecName));
|
|
||||||
|
|
||||||
EXPECT_EQ(102, mapper_.FindMappingFor({kIlbcCodecName, 8000, 1}));
|
EXPECT_EQ(102, mapper_.FindMappingFor({kIlbcCodecName, 8000, 1}));
|
||||||
EXPECT_EQ(103, mapper_.FindMappingFor({kIsacCodecName, 16000, 1}));
|
EXPECT_EQ(103, mapper_.FindMappingFor({kIsacCodecName, 16000, 1}));
|
||||||
|
|||||||
@ -270,9 +270,11 @@ static StreamParamsVec GetCurrentStreamParams(
|
|||||||
|
|
||||||
// Filters the data codecs for the data channel type.
|
// Filters the data codecs for the data channel type.
|
||||||
void FilterDataCodecs(std::vector<DataCodec>* codecs, bool sctp) {
|
void FilterDataCodecs(std::vector<DataCodec>* codecs, bool sctp) {
|
||||||
// Filter RTP codec for SCTP and vice versa.
|
// Filter RTP codec for SCTP. SCTP is not a codec.
|
||||||
const char* codec_name =
|
if (!sctp) {
|
||||||
sctp ? kGoogleRtpDataCodecName : kGoogleSctpDataCodecName;
|
return;
|
||||||
|
}
|
||||||
|
const char* codec_name = kGoogleRtpDataCodecName;
|
||||||
codecs->erase(std::remove_if(codecs->begin(), codecs->end(),
|
codecs->erase(std::remove_if(codecs->begin(), codecs->end(),
|
||||||
[&codec_name](const DataCodec& codec) {
|
[&codec_name](const DataCodec& codec) {
|
||||||
return absl::EqualsIgnoreCase(codec.name,
|
return absl::EqualsIgnoreCase(codec.name,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user