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

Unified Diff: webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h

Issue 1868143002: Convert CNG into C++ and remove it from AudioDecoder (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Converted WebRtcCng to C++ Created 4 years, 8 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/cng/audio_encoder_cng.h
diff --git a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h
index 1384cd511ee3b7f85306bc08dbdc79bb88fdc9a3..4d14d418dea189312fe92f1de05835606783d839 100644
--- a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h
+++ b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h
@@ -21,11 +21,6 @@
namespace webrtc {
-// Deleter for use with unique_ptr.
-struct CngInstDeleter {
- void operator()(CNG_enc_inst* ptr) const { WebRtcCng_FreeEnc(ptr); }
-};
-
class Vad;
class AudioEncoderCng final : public AudioEncoder {
@@ -85,7 +80,7 @@ class AudioEncoderCng final : public AudioEncoder {
std::vector<uint32_t> rtp_timestamps_;
bool last_frame_active_;
std::unique_ptr<Vad> vad_;
- std::unique_ptr<CNG_enc_inst, CngInstDeleter> cng_inst_;
+ std::unique_ptr<ComfortNoiseEncoder> cng_encoder_;
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderCng);
};

Powered by Google App Engine
This is Rietveld 408576698