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

Unified Diff: webrtc/modules/audio_coding/main/acm2/acm_receiver.h

Issue 1312493004: Add support for external decoders in ACM (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@isac-lock-2
Patch Set: Created 5 years, 4 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/main/acm2/acm_receiver.h
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receiver.h b/webrtc/modules/audio_coding/main/acm2/acm_receiver.h
index 46207fd449222117118caa45ee8607db09f89122..fe2724993e9e4f9e35969ffdcf05d7ff1c111fa4 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_receiver.h
+++ b/webrtc/modules/audio_coding/main/acm2/acm_receiver.h
@@ -93,21 +93,24 @@ class AcmReceiver {
// Adds a new codec to the NetEq codec database.
//
// Input:
- // - acm_codec_id : ACM codec ID.
+ // - acm_codec_id : ACM codec ID; -1 means external decoder.
// - payload_type : payload type.
// - sample_rate_hz : sample rate.
- // - audio_decoder : pointer to a decoder object. If it is NULL
- // then NetEq will internally create the decoder
- // object. Otherwise, NetEq will store this pointer
- // as the decoder corresponding with the given
- // payload type. NetEq won't acquire the ownership
- // of this pointer. It is up to the client of this
- // class (ACM) to delete it. By providing
- // |audio_decoder| ACM will have control over the
- // decoder instance of the codec. This is essential
- // for a codec like iSAC which encoder/decoder
- // encoder has to know about decoder (bandwidth
- // estimator that is updated at decoding time).
+ // - audio_decoder : pointer to a decoder object. If it's null, then
+ // NetEq will internally create a decoder object
+ // based on the value of |acm_codec_id| (which
+ // mustn't be -1). Otherwise, NetEq will use the
+ // given decoder for the given payload type. NetEq
+ // won't take ownership of the decoder; it's up to
+ // the caller to delete it when it's no longer
+ // needed.
+ //
+ // Providing an existing decoder object here is
+ // necessary for external decoders, but may also be
+ // used for built-in decoders if NetEq doesn't have
+ // all the info it needs to construct them properly
+ // (e.g. iSAC, where the decoder needs to be paired
+ // with an encoder).
//
// Return value : 0 if OK.
// <0 if NetEq returned an error.

Powered by Google App Engine
This is Rietveld 408576698