Index: media/cast/test/receiver.cc |
diff --git a/media/cast/test/receiver.cc b/media/cast/test/receiver.cc |
index b45222184c32b73af508080f8289202bf293d81e..80f17892606bc5ffda2235107d129cd42d2bc69e 100644 |
--- a/media/cast/test/receiver.cc |
+++ b/media/cast/test/receiver.cc |
@@ -12,6 +12,7 @@ |
#include <cstdio> |
#include <deque> |
#include <map> |
+#include <memory> |
#include <string> |
#include <utility> |
@@ -19,7 +20,6 @@ |
#include "base/command_line.h" |
#include "base/logging.h" |
#include "base/memory/ref_counted.h" |
-#include "base/memory/scoped_ptr.h" |
#include "base/message_loop/message_loop.h" |
#include "base/synchronization/lock.h" |
#include "base/synchronization/waitable_event.h" |
@@ -234,7 +234,7 @@ class NaivePlayer : public InProcessReceiver, |
// Finally, clear out any frames remaining in the queues. |
while (!audio_playout_queue_.empty()) { |
- const scoped_ptr<AudioBus> to_be_deleted( |
+ const std::unique_ptr<AudioBus> to_be_deleted( |
audio_playout_queue_.front().second); |
audio_playout_queue_.pop_front(); |
} |
@@ -286,7 +286,7 @@ class NaivePlayer : public InProcessReceiver, |
} |
} |
- void OnAudioFrame(scoped_ptr<AudioBus> audio_frame, |
+ void OnAudioFrame(std::unique_ptr<AudioBus> audio_frame, |
const base::TimeTicks& playout_time, |
bool is_continuous) final { |
DCHECK(cast_env()->CurrentlyOn(CastEnvironment::MAIN)); |
@@ -450,7 +450,7 @@ class NaivePlayer : public InProcessReceiver, |
return ret; |
} |
- scoped_ptr<AudioBus> PopOneAudioFrame(bool was_skipped) { |
+ std::unique_ptr<AudioBus> PopOneAudioFrame(bool was_skipped) { |
audio_lock_.AssertAcquired(); |
if (was_skipped) { |
@@ -469,7 +469,7 @@ class NaivePlayer : public InProcessReceiver, |
} |
last_popped_audio_playout_time_ = audio_playout_queue_.front().first; |
- scoped_ptr<AudioBus> ret(audio_playout_queue_.front().second); |
+ std::unique_ptr<AudioBus> ret(audio_playout_queue_.front().second); |
audio_playout_queue_.pop_front(); |
++num_audio_frames_processed_; |
return ret; |
@@ -514,7 +514,7 @@ class NaivePlayer : public InProcessReceiver, |
#if defined(USE_X11) |
test::LinuxOutputWindow render_; |
#endif // defined(USE_X11) |
- scoped_ptr<AudioOutputStream> audio_output_stream_; |
+ std::unique_ptr<AudioOutputStream> audio_output_stream_; |
// Video playout queue. |
typedef std::pair<base::TimeTicks, scoped_refptr<VideoFrame> > |
@@ -533,7 +533,7 @@ class NaivePlayer : public InProcessReceiver, |
int64_t num_audio_frames_processed_; |
// These must only be used on the audio thread calling OnMoreData(). |
- scoped_ptr<AudioBus> currently_playing_audio_frame_; |
+ std::unique_ptr<AudioBus> currently_playing_audio_frame_; |
int currently_playing_audio_frame_start_; |
std::map<uint16_t, base::TimeTicks> audio_play_times_; |