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

Unified Diff: webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h

Issue 1696853004: Replace scoped_ptr with unique_ptr in webrtc/modules/audio_coding/codecs/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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/g722/audio_encoder_g722.h
diff --git a/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h b/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h
index 07d767e778b88926e7feb7b76814843ed343f508..d611226d7597bb45951883bf8d6c311c2d633f26 100644
--- a/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h
+++ b/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h
@@ -11,8 +11,9 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_G722_AUDIO_ENCODER_G722_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_G722_AUDIO_ENCODER_G722_H_
+#include <memory>
+
#include "webrtc/base/buffer.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
#include "webrtc/modules/audio_coding/codecs/g722/g722_interface.h"
@@ -51,7 +52,7 @@ class AudioEncoderG722 final : public AudioEncoder {
// The encoder state for one channel.
struct EncoderState {
G722EncInst* encoder;
- rtc::scoped_ptr<int16_t[]> speech_buffer; // Queued up for encoding.
+ std::unique_ptr<int16_t[]> speech_buffer; // Queued up for encoding.
rtc::Buffer encoded_buffer; // Already encoded.
EncoderState();
~EncoderState();
@@ -64,7 +65,7 @@ class AudioEncoderG722 final : public AudioEncoder {
const size_t num_10ms_frames_per_packet_;
size_t num_10ms_frames_buffered_;
uint32_t first_timestamp_in_buffer_;
- const rtc::scoped_ptr<EncoderState[]> encoders_;
+ const std::unique_ptr<EncoderState[]> encoders_;
rtc::Buffer interleave_buffer_;
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderG722);
};

Powered by Google App Engine
This is Rietveld 408576698