| 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 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1911 // Player should begin prefetch and resume preroll upon Start(). | 1911 // Player should begin prefetch and resume preroll upon Start(). |
| 1912 EXPECT_EQ(2, demuxer_->num_data_requests()); | 1912 EXPECT_EQ(2, demuxer_->num_data_requests()); |
| 1913 StartAudioDecoderJob(true); | 1913 StartAudioDecoderJob(true); |
| 1914 EXPECT_TRUE(IsPrerolling(true)); | 1914 EXPECT_TRUE(IsPrerolling(true)); |
| 1915 EXPECT_EQ(100.0, GetPrerollTimestamp().InMillisecondsF()); | 1915 EXPECT_EQ(100.0, GetPrerollTimestamp().InMillisecondsF()); |
| 1916 | 1916 |
| 1917 // No further seek should have been requested since before Release(), above. | 1917 // No further seek should have been requested since before Release(), above. |
| 1918 EXPECT_EQ(1, demuxer_->num_seek_requests()); | 1918 EXPECT_EQ(1, demuxer_->num_seek_requests()); |
| 1919 } | 1919 } |
| 1920 | 1920 |
| 1921 TEST_F(MediaSourcePlayerTest, SeekToThenReleaseThenStart) { | 1921 // Flaky. See http://crbug.com/361359. |
| 1922 TEST_F(MediaSourcePlayerTest, DISABLED_SeekToThenReleaseThenStart) { |
| 1922 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); | 1923 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); |
| 1923 | 1924 |
| 1924 // Test if Release() occurs after a SeekTo()'s subsequent DemuxerSeeK IPC | 1925 // Test if Release() occurs after a SeekTo()'s subsequent DemuxerSeeK IPC |
| 1925 // request and OnDemuxerSeekDone() does not occur until after the next | 1926 // request and OnDemuxerSeekDone() does not occur until after the next |
| 1926 // Start(), then the player remains pending seek done until (and resumes | 1927 // Start(), then the player remains pending seek done until (and resumes |
| 1927 // correct post-seek preroll after) OnDemuxerSeekDone(). | 1928 // correct post-seek preroll after) OnDemuxerSeekDone(). |
| 1928 StartAudioDecoderJobAndSeekToWhileDecoding( | 1929 StartAudioDecoderJobAndSeekToWhileDecoding( |
| 1929 base::TimeDelta::FromMilliseconds(100)); | 1930 base::TimeDelta::FromMilliseconds(100)); |
| 1930 WaitForAudioDecodeDone(); | 1931 WaitForAudioDecodeDone(); |
| 1931 EXPECT_EQ(1, demuxer_->num_seek_requests()); | 1932 EXPECT_EQ(1, demuxer_->num_seek_requests()); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2060 DemuxerConfigs configs = CreateVideoDemuxerConfigs(); | 2061 DemuxerConfigs configs = CreateVideoDemuxerConfigs(); |
| 2061 configs.is_video_encrypted = true; | 2062 configs.is_video_encrypted = true; |
| 2062 | 2063 |
| 2063 player_.OnDemuxerConfigsAvailable(configs); | 2064 player_.OnDemuxerConfigsAvailable(configs); |
| 2064 CreateNextTextureAndSetVideoSurface(); | 2065 CreateNextTextureAndSetVideoSurface(); |
| 2065 EXPECT_FALSE(IsPendingSurfaceChange()); | 2066 EXPECT_FALSE(IsPendingSurfaceChange()); |
| 2066 EXPECT_FALSE(GetMediaDecoderJob(false)); | 2067 EXPECT_FALSE(GetMediaDecoderJob(false)); |
| 2067 } | 2068 } |
| 2068 | 2069 |
| 2069 } // namespace media | 2070 } // namespace media |
| OLD | NEW |