OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // | 86 // |
87 // Return value : 0 if OK. | 87 // Return value : 0 if OK. |
88 // -1 if NetEq returned an error. | 88 // -1 if NetEq returned an error. |
89 // | 89 // |
90 int GetAudio(int desired_freq_hz, AudioFrame* audio_frame); | 90 int GetAudio(int desired_freq_hz, AudioFrame* audio_frame); |
91 | 91 |
92 // | 92 // |
93 // Adds a new codec to the NetEq codec database. | 93 // Adds a new codec to the NetEq codec database. |
94 // | 94 // |
95 // Input: | 95 // Input: |
96 // - acm_codec_id : ACM codec ID. | 96 // - acm_codec_id : ACM codec ID; -1 means external decoder. |
97 // - payload_type : payload type. | 97 // - payload_type : payload type. |
98 // - sample_rate_hz : sample rate. | 98 // - sample_rate_hz : sample rate. |
99 // - audio_decoder : pointer to a decoder object. If it is NULL | 99 // - audio_decoder : pointer to a decoder object. If it's null, then |
100 // then NetEq will internally create the decoder | 100 // NetEq will internally create a decoder object |
101 // object. Otherwise, NetEq will store this pointer | 101 // based on the value of |acm_codec_id| (which |
102 // as the decoder corresponding with the given | 102 // mustn't be -1). Otherwise, NetEq will use the |
103 // payload type. NetEq won't acquire the ownership | 103 // given decoder for the given payload type. NetEq |
104 // of this pointer. It is up to the client of this | 104 // won't take ownership of the decoder; it's up to |
105 // class (ACM) to delete it. By providing | 105 // the caller to delete it when it's no longer |
106 // |audio_decoder| ACM will have control over the | 106 // needed. |
107 // decoder instance of the codec. This is essential | 107 // |
108 // for a codec like iSAC which encoder/decoder | 108 // Providing an existing decoder object here is |
109 // encoder has to know about decoder (bandwidth | 109 // necessary for external decoders, but may also be |
110 // estimator that is updated at decoding time). | 110 // used for built-in decoders if NetEq doesn't have |
| 111 // all the info it needs to construct them properly |
| 112 // (e.g. iSAC, where the decoder needs to be paired |
| 113 // with an encoder). |
111 // | 114 // |
112 // Return value : 0 if OK. | 115 // Return value : 0 if OK. |
113 // <0 if NetEq returned an error. | 116 // <0 if NetEq returned an error. |
114 // | 117 // |
115 int AddCodec(int acm_codec_id, | 118 int AddCodec(int acm_codec_id, |
116 uint8_t payload_type, | 119 uint8_t payload_type, |
117 int channels, | 120 int channels, |
118 int sample_rate_hz, | 121 int sample_rate_hz, |
119 AudioDecoder* audio_decoder); | 122 AudioDecoder* audio_decoder); |
120 | 123 |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 // initial delay is set. | 358 // initial delay is set. |
356 rtc::scoped_ptr<InitialDelayManager::SyncStream> missing_packets_sync_stream_; | 359 rtc::scoped_ptr<InitialDelayManager::SyncStream> missing_packets_sync_stream_; |
357 rtc::scoped_ptr<InitialDelayManager::SyncStream> late_packets_sync_stream_; | 360 rtc::scoped_ptr<InitialDelayManager::SyncStream> late_packets_sync_stream_; |
358 }; | 361 }; |
359 | 362 |
360 } // namespace acm2 | 363 } // namespace acm2 |
361 | 364 |
362 } // namespace webrtc | 365 } // namespace webrtc |
363 | 366 |
364 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVER_H_ | 367 #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVER_H_ |
OLD | NEW |