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

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

Issue 302453012: Support casting for embedded YT videos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed MediaSourcePlayer test Created 6 years, 6 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
« no previous file with comments | « media/base/android/media_source_player.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 class MediaSourcePlayerTest : public testing::Test { 160 class MediaSourcePlayerTest : public testing::Test {
161 public: 161 public:
162 MediaSourcePlayerTest() 162 MediaSourcePlayerTest()
163 : manager_(&message_loop_), 163 : manager_(&message_loop_),
164 demuxer_(new MockDemuxerAndroid(&message_loop_)), 164 demuxer_(new MockDemuxerAndroid(&message_loop_)),
165 player_(0, &manager_, 165 player_(0, &manager_,
166 base::Bind(&MockMediaPlayerManager::OnMediaResourcesRequested, 166 base::Bind(&MockMediaPlayerManager::OnMediaResourcesRequested,
167 base::Unretained(&manager_)), 167 base::Unretained(&manager_)),
168 base::Bind(&MockMediaPlayerManager::OnMediaResourcesReleased, 168 base::Bind(&MockMediaPlayerManager::OnMediaResourcesReleased,
169 base::Unretained(&manager_)), 169 base::Unretained(&manager_)),
170 scoped_ptr<DemuxerAndroid>(demuxer_)), 170 scoped_ptr<DemuxerAndroid>(demuxer_),
171 GURL()),
171 decoder_callback_hook_executed_(false), 172 decoder_callback_hook_executed_(false),
172 surface_texture_a_is_next_(true) {} 173 surface_texture_a_is_next_(true) {}
173 virtual ~MediaSourcePlayerTest() {} 174 virtual ~MediaSourcePlayerTest() {}
174 175
175 protected: 176 protected:
176 // Get the decoder job from the MediaSourcePlayer. The return value must not 177 // Get the decoder job from the MediaSourcePlayer. The return value must not
177 // be NULL. 178 // be NULL.
178 MediaDecoderJob* GetMediaDecoderJob(bool is_audio) { 179 MediaDecoderJob* GetMediaDecoderJob(bool is_audio) {
179 if (is_audio) { 180 if (is_audio) {
180 return reinterpret_cast<MediaDecoderJob*>( 181 return reinterpret_cast<MediaDecoderJob*>(
(...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after
2189 2190
2190 DemuxerConfigs configs = CreateAudioDemuxerConfigs(kCodecVorbis, true); 2191 DemuxerConfigs configs = CreateAudioDemuxerConfigs(kCodecVorbis, true);
2191 DemuxerData data = CreateReadFromDemuxerAckWithConfigChanged( 2192 DemuxerData data = CreateReadFromDemuxerAckWithConfigChanged(
2192 true, 0, configs); 2193 true, 0, configs);
2193 player_.OnDemuxerDataAvailable(data); 2194 player_.OnDemuxerDataAvailable(data);
2194 WaitForAudioDecodeDone(); 2195 WaitForAudioDecodeDone();
2195 DecodeAudioDataUntilOutputBecomesAvailable(); 2196 DecodeAudioDataUntilOutputBecomesAvailable();
2196 } 2197 }
2197 2198
2198 } // namespace media 2199 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_source_player.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698