aboutsummaryrefslogtreecommitdiff
path: root/api/audio_codecs
diff options
context:
space:
mode:
authorKarl Wiberg <kwiberg@webrtc.org>2018-12-10 11:50:55 +0100
committerCommit Bot <commit-bot@chromium.org>2018-12-11 15:50:29 +0000
commitad858d1231e7e8456bb99565c74c17137b7f1414 (patch)
treed87b2de1724652a4ce44d6bf2e124563dc55fdb2 /api/audio_codecs
parent5d4740170a0a7cf4c9c83dc35ed355d011e9cafe (diff)
downloadwebrtc-ad858d1231e7e8456bb99565c74c17137b7f1414.tar.gz
Improve the audio codec factory documentation.
Bug: none Change-Id: Iefddb49d515bde0c8c5b7fb0d5c8dc79399b03a0 Reviewed-on: https://webrtc-review.googlesource.com/c/113802 Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25969}
Diffstat (limited to 'api/audio_codecs')
-rw-r--r--api/audio_codecs/audio_decoder_factory.h11
-rw-r--r--api/audio_codecs/audio_encoder_factory.h15
2 files changed, 16 insertions, 10 deletions
diff --git a/api/audio_codecs/audio_decoder_factory.h b/api/audio_codecs/audio_decoder_factory.h
index 55e197a14a..3d80958338 100644
--- a/api/audio_codecs/audio_decoder_factory.h
+++ b/api/audio_codecs/audio_decoder_factory.h
@@ -29,11 +29,14 @@ class AudioDecoderFactory : public rtc::RefCountInterface {
virtual bool IsSupportedDecoder(const SdpAudioFormat& format) = 0;
- // Create a new decoder instance. The `codec_pair_id` argument is used to
- // link encoders and decoders that talk to the same remote entity; if a
- // MakeAudioEncoder() and a MakeAudioDecoder() call receive non-null IDs that
+ // Create a new decoder instance. The `codec_pair_id` argument is used to link
+ // encoders and decoders that talk to the same remote entity: if a
+ // AudioEncoderFactory::MakeAudioEncoder() and a
+ // AudioDecoderFactory::MakeAudioDecoder() call receive non-null IDs that
// compare equal, the factory implementations may assume that the encoder and
- // decoder form a pair.
+ // decoder form a pair. (The intended use case for this is to set up
+ // communication between the AudioEncoder and AudioDecoder instances, which is
+ // needed for some codecs with built-in bandwidth adaptation.)
//
// Note: Implementations need to be robust against combinations other than
// one encoder, one decoder getting the same ID; such decoders must still
diff --git a/api/audio_codecs/audio_encoder_factory.h b/api/audio_codecs/audio_encoder_factory.h
index b290967c78..a5fd561b6c 100644
--- a/api/audio_codecs/audio_encoder_factory.h
+++ b/api/audio_codecs/audio_encoder_factory.h
@@ -34,12 +34,15 @@ class AudioEncoderFactory : public rtc::RefCountInterface {
virtual absl::optional<AudioCodecInfo> QueryAudioEncoder(
const SdpAudioFormat& format) = 0;
- // Creates an AudioEncoder for the specified format. The encoder will tags
- // its payloads with the specified payload type. The `codec_pair_id` argument
- // is used to link encoders and decoders that talk to the same remote entity;
- // if a MakeAudioEncoder() and a MakeAudioDecoder() call receive non-null IDs
- // that compare equal, the factory implementations may assume that the
- // encoder and decoder form a pair.
+ // Creates an AudioEncoder for the specified format. The encoder will tags its
+ // payloads with the specified payload type. The `codec_pair_id` argument is
+ // used to link encoders and decoders that talk to the same remote entity: if
+ // a AudioEncoderFactory::MakeAudioEncoder() and a
+ // AudioDecoderFactory::MakeAudioDecoder() call receive non-null IDs that
+ // compare equal, the factory implementations may assume that the encoder and
+ // decoder form a pair. (The intended use case for this is to set up
+ // communication between the AudioEncoder and AudioDecoder instances, which is
+ // needed for some codecs with built-in bandwidth adaptation.)
//
// Note: Implementations need to be robust against combinations other than
// one encoder, one decoder getting the same ID; such encoders must still