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

Unified Diff: webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.cc

Issue 2123923004: Updated AudioDecoderFactory to list AudioCodecSpecs instead of SdpAudioFormats. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@audio-decoder-factory-usage
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.cc
diff --git a/webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.cc b/webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.cc
index 5f4cb157a88fe2abc237412d475b3df6239022ed..84e7b243f7a4fcf45b6a23d5fa61a8fd1edacdc2 100644
--- a/webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.cc
+++ b/webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.cc
@@ -129,22 +129,23 @@ NamedDecoderConstructor decoder_constructors[] = {
class BuiltinAudioDecoderFactory : public AudioDecoderFactory {
public:
- std::vector<SdpAudioFormat> GetSupportedFormats() override {
- static std::vector<SdpAudioFormat> formats = {
- { "opus", 48000, 2, {
- {"minptime", "10" },
- {"useinbandfec", "1" }
- }
+ std::vector<AudioCodecSpec> GetSupportedDecoders() override {
+ static std::vector<AudioCodecSpec> specs = {
+ { { "opus", 48000, 2, {
+ {"minptime", "10" },
+ {"useinbandfec", "1" }
+ }
+ }, false
},
- { "isac", 16000, 1 },
- { "isac", 32000, 1 },
- { "G722", 8000, 1 },
- { "iLBC", 8000, 1 },
- { "PCMU", 8000, 1 },
- { "PCMA", 8000, 1 }
+ { { "isac", 16000, 1 }, true },
+ { { "isac", 32000, 1 }, true },
+ { { "G722", 8000, 1 }, true },
+ { { "iLBC", 8000, 1 }, true },
+ { { "PCMU", 8000, 1 }, true },
+ { { "PCMA", 8000, 1 }, true }
};
- return formats;
+ return specs;
}
std::unique_ptr<AudioDecoder> MakeAudioDecoder(

Powered by Google App Engine
This is Rietveld 408576698