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

Side by Side Diff: webrtc/modules/audio_coding/include/audio_coding_module.h

Issue 2177263002: Regression test for issue where Opus DTX status was being forgotten. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed review comments. Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 }; 243 };
244 244
245 // |modifier| is called exactly once with one argument: a pointer to the 245 // |modifier| is called exactly once with one argument: a pointer to the
246 // unique_ptr that holds the current encoder (which is null if there is no 246 // unique_ptr that holds the current encoder (which is null if there is no
247 // current encoder). For the duration of the call, |modifier| has exclusive 247 // current encoder). For the duration of the call, |modifier| has exclusive
248 // access to the unique_ptr; it may call the encoder, steal the encoder and 248 // access to the unique_ptr; it may call the encoder, steal the encoder and
249 // replace it with another encoder or with nullptr, etc. 249 // replace it with another encoder or with nullptr, etc.
250 virtual void ModifyEncoder( 250 virtual void ModifyEncoder(
251 FunctionView<void(std::unique_ptr<AudioEncoder>*)> modifier) = 0; 251 FunctionView<void(std::unique_ptr<AudioEncoder>*)> modifier) = 0;
252 252
253 // |modifier| is called exactly once with one argument: a const pointer to the
254 // current encoder (which is null if there is no current encoder).
255 virtual void QueryEncoder(FunctionView<void(AudioEncoder const*)> query) = 0;
256
253 // Utility method for simply replacing the existing encoder with a new one. 257 // Utility method for simply replacing the existing encoder with a new one.
254 void SetEncoder(std::unique_ptr<AudioEncoder> new_encoder) { 258 void SetEncoder(std::unique_ptr<AudioEncoder> new_encoder) {
255 ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { 259 ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) {
256 *encoder = std::move(new_encoder); 260 *encoder = std::move(new_encoder);
257 }); 261 });
258 } 262 }
259 263
260 /////////////////////////////////////////////////////////////////////////// 264 ///////////////////////////////////////////////////////////////////////////
261 // int32_t SendCodec() 265 // int32_t SendCodec()
262 // Get parameters for the codec currently registered as send codec. 266 // Get parameters for the codec currently registered as send codec.
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 virtual std::vector<uint16_t> GetNackList( 816 virtual std::vector<uint16_t> GetNackList(
813 int64_t round_trip_time_ms) const = 0; 817 int64_t round_trip_time_ms) const = 0;
814 818
815 virtual void GetDecodingCallStatistics( 819 virtual void GetDecodingCallStatistics(
816 AudioDecodingCallStats* call_stats) const = 0; 820 AudioDecodingCallStats* call_stats) const = 0;
817 }; 821 };
818 822
819 } // namespace webrtc 823 } // namespace webrtc
820 824
821 #endif // WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_ 825 #endif // WEBRTC_MODULES_AUDIO_CODING_INCLUDE_AUDIO_CODING_MODULE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698