Pass SdpAudioFormat through Channel, without converting to CodecInst
BUG=webrtc:5805 Review-Url: https://codereview.webrtc.org/2516993002 Cr-Commit-Position: refs/heads/master@{#16165}
This commit is contained in:
@ -1041,6 +1041,10 @@ TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutputExternalDecoder) {
|
||||
std::vector<AudioCodecSpec> GetSupportedDecoders() override {
|
||||
return fact_->GetSupportedDecoders();
|
||||
}
|
||||
bool IsSupportedDecoder(const SdpAudioFormat& format) override {
|
||||
return format.name == "MockPCMu" ? true
|
||||
: fact_->IsSupportedDecoder(format);
|
||||
}
|
||||
std::unique_ptr<AudioDecoder> MakeAudioDecoder(
|
||||
const SdpAudioFormat& format) override {
|
||||
return format.name == "MockPCMu" ? std::move(mock_decoder_)
|
||||
|
||||
@ -87,9 +87,7 @@ rtc::Optional<SdpAudioFormat> RentACodec::NetEqDecoderToSdpAudioFormat(
|
||||
case NetEqDecoder::kDecoderG722_2ch:
|
||||
return rtc::Optional<SdpAudioFormat>(SdpAudioFormat("g722", 8000, 2));
|
||||
case NetEqDecoder::kDecoderOpus:
|
||||
return rtc::Optional<SdpAudioFormat>(
|
||||
SdpAudioFormat("opus", 48000, 2,
|
||||
std::map<std::string, std::string>{{"stereo", "0"}}));
|
||||
return rtc::Optional<SdpAudioFormat>(SdpAudioFormat("opus", 48000, 2));
|
||||
case NetEqDecoder::kDecoderOpus_2ch:
|
||||
return rtc::Optional<SdpAudioFormat>(
|
||||
SdpAudioFormat("opus", 48000, 2,
|
||||
|
||||
Reference in New Issue
Block a user