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

Unified Diff: media/test/pipeline_integration_test_base.cc

Issue 2871503002: Remove ScopedVector from audio/video renderer related code in media/ (Closed)
Patch Set: Remove ScopedVector from audio/video render related code in media/ Created 3 years, 7 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: media/test/pipeline_integration_test_base.cc
diff --git a/media/test/pipeline_integration_test_base.cc b/media/test/pipeline_integration_test_base.cc
index c0b746d9758c6c814ff3d88c831706544a72685b..0ede70d3ccdfb72406abece216988d2e93c3bddf 100644
--- a/media/test/pipeline_integration_test_base.cc
+++ b/media/test/pipeline_integration_test_base.cc
@@ -41,10 +41,10 @@ using ::testing::SaveArg;
namespace media {
-static ScopedVector<VideoDecoder> CreateVideoDecodersForTest(
+static std::vector<std::unique_ptr<VideoDecoder>> CreateVideoDecodersForTest(
MediaLog* media_log,
CreateVideoDecodersCB prepend_video_decoders_cb) {
- ScopedVector<VideoDecoder> video_decoders;
+ std::vector<std::unique_ptr<VideoDecoder>> video_decoders;
if (!prepend_video_decoders_cb.is_null()) {
video_decoders = prepend_video_decoders_cb.Run();
@@ -52,22 +52,22 @@ static ScopedVector<VideoDecoder> CreateVideoDecodersForTest(
}
#if !defined(MEDIA_DISABLE_LIBVPX)
- video_decoders.push_back(new VpxVideoDecoder());
+ video_decoders.push_back(base::MakeUnique<VpxVideoDecoder>());
#endif // !defined(MEDIA_DISABLE_LIBVPX)
// Android does not have an ffmpeg video decoder.
#if !defined(MEDIA_DISABLE_FFMPEG) && !defined(OS_ANDROID) && \
!defined(DISABLE_FFMPEG_VIDEO_DECODERS)
- video_decoders.push_back(new FFmpegVideoDecoder(media_log));
+ video_decoders.push_back(base::MakeUnique<FFmpegVideoDecoder>(media_log));
#endif
return video_decoders;
}
-static ScopedVector<AudioDecoder> CreateAudioDecodersForTest(
+static std::vector<std::unique_ptr<AudioDecoder>> CreateAudioDecodersForTest(
MediaLog* media_log,
const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
CreateAudioDecodersCB prepend_audio_decoders_cb) {
- ScopedVector<AudioDecoder> audio_decoders;
+ std::vector<std::unique_ptr<AudioDecoder>> audio_decoders;
if (!prepend_audio_decoders_cb.is_null()) {
audio_decoders = prepend_audio_decoders_cb.Run();
@@ -76,7 +76,7 @@ static ScopedVector<AudioDecoder> CreateAudioDecodersForTest(
#if !defined(MEDIA_DISABLE_FFMPEG)
audio_decoders.push_back(
- new FFmpegAudioDecoder(media_task_runner, media_log));
+ base::MakeUnique<FFmpegAudioDecoder>(media_task_runner, media_log));
#endif
return audio_decoders;
}
« media/renderers/default_renderer_factory.h ('K') | « media/test/pipeline_integration_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698