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

Side by Side Diff: media/base/android/media_source_player_unittest.cc

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: . 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/android/media_source_player.h" 5 #include "media/base/android/media_source_player.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8
8 #include <string> 9 #include <string>
9 #include <utility> 10 #include <utility>
10 11
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/ptr_util.h"
14 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
15 #include "build/build_config.h" 16 #include "build/build_config.h"
16 #include "media/base/android/audio_decoder_job.h" 17 #include "media/base/android/audio_decoder_job.h"
17 #include "media/base/android/media_codec_util.h" 18 #include "media/base/android/media_codec_util.h"
18 #include "media/base/android/media_drm_bridge.h" 19 #include "media/base/android/media_drm_bridge.h"
19 #include "media/base/android/media_player_manager.h" 20 #include "media/base/android/media_player_manager.h"
20 #include "media/base/android/media_url_interceptor.h" 21 #include "media/base/android/media_url_interceptor.h"
21 #include "media/base/android/sdk_media_codec_bridge.h" 22 #include "media/base/android/sdk_media_codec_bridge.h"
22 #include "media/base/android/video_decoder_job.h" 23 #include "media/base/android/video_decoder_job.h"
23 #include "media/base/bind_to_current_loop.h" 24 #include "media/base/bind_to_current_loop.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 160
160 class MediaSourcePlayerTest : public testing::Test { 161 class MediaSourcePlayerTest : public testing::Test {
161 public: 162 public:
162 MediaSourcePlayerTest() 163 MediaSourcePlayerTest()
163 : manager_(&message_loop_), 164 : manager_(&message_loop_),
164 demuxer_(new MockDemuxerAndroid(&message_loop_)), 165 demuxer_(new MockDemuxerAndroid(&message_loop_)),
165 player_(0, 166 player_(0,
166 &manager_, 167 &manager_,
167 base::Bind(&MockMediaPlayerManager::OnDecorderResourcesReleased, 168 base::Bind(&MockMediaPlayerManager::OnDecorderResourcesReleased,
168 base::Unretained(&manager_)), 169 base::Unretained(&manager_)),
169 scoped_ptr<DemuxerAndroid>(demuxer_), 170 base::WrapUnique(demuxer_),
170 GURL(), 171 GURL(),
171 kDefaultMediaSessionId), 172 kDefaultMediaSessionId),
172 decoder_callback_hook_executed_(false), 173 decoder_callback_hook_executed_(false),
173 surface_texture_a_is_next_(true) {} 174 surface_texture_a_is_next_(true) {}
174 175
175 ~MediaSourcePlayerTest() override {} 176 ~MediaSourcePlayerTest() override {}
176 177
177 protected: 178 protected:
178 // Get the decoder job from the MediaSourcePlayer. The return value must not 179 // Get the decoder job from the MediaSourcePlayer. The return value must not
179 // be NULL. 180 // be NULL.
(...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after
2384 2385
2385 EXPECT_EQ(demuxer_->num_data_requests(), 0); 2386 EXPECT_EQ(demuxer_->num_data_requests(), 0);
2386 player_.OnDemuxerConfigsAvailable(CreateDemuxerConfigs(true, true)); 2387 player_.OnDemuxerConfigsAvailable(CreateDemuxerConfigs(true, true));
2387 2388
2388 manager_.set_allow_play(true); 2389 manager_.set_allow_play(true);
2389 player_.Start(); 2390 player_.Start();
2390 EXPECT_TRUE(player_.IsPlaying()); 2391 EXPECT_TRUE(player_.IsPlaying());
2391 } 2392 }
2392 2393
2393 } // namespace media 2394 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698