| OLD | NEW |
| 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 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 class MediaSourcePlayerTest : public testing::Test { | 162 class MediaSourcePlayerTest : public testing::Test { |
| 163 public: | 163 public: |
| 164 MediaSourcePlayerTest() | 164 MediaSourcePlayerTest() |
| 165 : manager_(&message_loop_), | 165 : manager_(&message_loop_), |
| 166 demuxer_(new MockDemuxerAndroid(&message_loop_)), | 166 demuxer_(new MockDemuxerAndroid(&message_loop_)), |
| 167 player_(0, | 167 player_(0, |
| 168 &manager_, | 168 &manager_, |
| 169 base::Bind(&MockMediaPlayerManager::OnDecorderResourcesReleased, | 169 base::Bind(&MockMediaPlayerManager::OnDecorderResourcesReleased, |
| 170 base::Unretained(&manager_)), | 170 base::Unretained(&manager_)), |
| 171 base::WrapUnique(demuxer_), | 171 base::WrapUnique(demuxer_), |
| 172 GURL(), | 172 GURL()), |
| 173 kDefaultMediaSessionId), | |
| 174 decoder_callback_hook_executed_(false), | 173 decoder_callback_hook_executed_(false), |
| 175 surface_texture_a_is_next_(true) {} | 174 surface_texture_a_is_next_(true) {} |
| 176 | 175 |
| 177 ~MediaSourcePlayerTest() override {} | 176 ~MediaSourcePlayerTest() override {} |
| 178 | 177 |
| 179 protected: | 178 protected: |
| 180 // 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 |
| 181 // be NULL. | 180 // be NULL. |
| 182 MediaDecoderJob* GetMediaDecoderJob(bool is_audio) { | 181 MediaDecoderJob* GetMediaDecoderJob(bool is_audio) { |
| 183 if (is_audio) { | 182 if (is_audio) { |
| (...skipping 2235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2419 | 2418 |
| 2420 EXPECT_EQ(demuxer_->num_data_requests(), 0); | 2419 EXPECT_EQ(demuxer_->num_data_requests(), 0); |
| 2421 player_.OnDemuxerConfigsAvailable(CreateDemuxerConfigs(true, true)); | 2420 player_.OnDemuxerConfigsAvailable(CreateDemuxerConfigs(true, true)); |
| 2422 | 2421 |
| 2423 manager_.set_allow_play(true); | 2422 manager_.set_allow_play(true); |
| 2424 player_.Start(); | 2423 player_.Start(); |
| 2425 EXPECT_TRUE(player_.IsPlaying()); | 2424 EXPECT_TRUE(player_.IsPlaying()); |
| 2426 } | 2425 } |
| 2427 | 2426 |
| 2428 } // namespace media | 2427 } // namespace media |
| OLD | NEW |