Replace scoped_ptr with unique_ptr in webrtc/modules/audio_device/
BUG=webrtc:5520 Review URL: https://codereview.webrtc.org/1722083002 Cr-Commit-Position: refs/heads/master@{#11740}
This commit is contained in:
@ -11,6 +11,8 @@
|
||||
#ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_TRACK_JNI_H_
|
||||
#define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_TRACK_JNI_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include "webrtc/base/thread_checker.h"
|
||||
@ -42,7 +44,7 @@ class AudioTrackJni {
|
||||
class JavaAudioTrack {
|
||||
public:
|
||||
JavaAudioTrack(NativeRegistration* native_registration,
|
||||
rtc::scoped_ptr<GlobalRef> audio_track);
|
||||
std::unique_ptr<GlobalRef> audio_track);
|
||||
~JavaAudioTrack();
|
||||
|
||||
void InitPlayout(int sample_rate, int channels);
|
||||
@ -53,7 +55,7 @@ class AudioTrackJni {
|
||||
int GetStreamVolume();
|
||||
|
||||
private:
|
||||
rtc::scoped_ptr<GlobalRef> audio_track_;
|
||||
std::unique_ptr<GlobalRef> audio_track_;
|
||||
jmethodID init_playout_;
|
||||
jmethodID start_playout_;
|
||||
jmethodID stop_playout_;
|
||||
@ -113,13 +115,13 @@ class AudioTrackJni {
|
||||
AttachCurrentThreadIfNeeded attach_thread_if_needed_;
|
||||
|
||||
// Wraps the JNI interface pointer and methods associated with it.
|
||||
rtc::scoped_ptr<JNIEnvironment> j_environment_;
|
||||
std::unique_ptr<JNIEnvironment> j_environment_;
|
||||
|
||||
// Contains factory method for creating the Java object.
|
||||
rtc::scoped_ptr<NativeRegistration> j_native_registration_;
|
||||
std::unique_ptr<NativeRegistration> j_native_registration_;
|
||||
|
||||
// Wraps the Java specific parts of the AudioTrackJni class.
|
||||
rtc::scoped_ptr<AudioTrackJni::JavaAudioTrack> j_audio_track_;
|
||||
std::unique_ptr<AudioTrackJni::JavaAudioTrack> j_audio_track_;
|
||||
|
||||
// Contains audio parameters provided to this class at construction by the
|
||||
// AudioManager.
|
||||
|
||||
Reference in New Issue
Block a user