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 <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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 virtual ~MockMediaPlayerManager() {} | 49 virtual ~MockMediaPlayerManager() {} |
50 | 50 |
51 // MediaPlayerManager implementation. | 51 // MediaPlayerManager implementation. |
52 virtual MediaResourceGetter* GetMediaResourceGetter() OVERRIDE { | 52 virtual MediaResourceGetter* GetMediaResourceGetter() OVERRIDE { |
53 return NULL; | 53 return NULL; |
54 } | 54 } |
55 virtual MediaUrlInterceptor* GetMediaUrlInterceptor() OVERRIDE { | 55 virtual MediaUrlInterceptor* GetMediaUrlInterceptor() OVERRIDE { |
56 return NULL; | 56 return NULL; |
57 } | 57 } |
58 virtual void OnTimeUpdate(int player_id, | 58 virtual void OnTimeUpdate(int player_id, |
59 base::TimeDelta current_time) OVERRIDE { | 59 base::TimeDelta current_time, |
| 60 base::TimeTicks current_time_ticks) OVERRIDE { |
60 timestamp_updated_ = true; | 61 timestamp_updated_ = true; |
61 } | 62 } |
62 virtual void OnMediaMetadataChanged( | 63 virtual void OnMediaMetadataChanged( |
63 int player_id, base::TimeDelta duration, int width, int height, | 64 int player_id, base::TimeDelta duration, int width, int height, |
64 bool success) OVERRIDE {} | 65 bool success) OVERRIDE {} |
65 virtual void OnPlaybackComplete(int player_id) OVERRIDE { | 66 virtual void OnPlaybackComplete(int player_id) OVERRIDE { |
66 playback_completed_ = true; | 67 playback_completed_ = true; |
67 if (message_loop_->is_running()) | 68 if (message_loop_->is_running()) |
68 message_loop_->Quit(); | 69 message_loop_->Quit(); |
69 } | 70 } |
(...skipping 2112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2182 | 2183 |
2183 DemuxerConfigs configs = CreateAudioDemuxerConfigs(kCodecVorbis, true); | 2184 DemuxerConfigs configs = CreateAudioDemuxerConfigs(kCodecVorbis, true); |
2184 DemuxerData data = CreateReadFromDemuxerAckWithConfigChanged( | 2185 DemuxerData data = CreateReadFromDemuxerAckWithConfigChanged( |
2185 true, 0, configs); | 2186 true, 0, configs); |
2186 player_.OnDemuxerDataAvailable(data); | 2187 player_.OnDemuxerDataAvailable(data); |
2187 WaitForAudioDecodeDone(); | 2188 WaitForAudioDecodeDone(); |
2188 DecodeAudioDataUntilOutputBecomesAvailable(); | 2189 DecodeAudioDataUntilOutputBecomesAvailable(); |
2189 } | 2190 } |
2190 | 2191 |
2191 } // namespace media | 2192 } // namespace media |
OLD | NEW |