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 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1955 EXPECT_FALSE(IsDrainingDecoder(true)); | 1955 EXPECT_FALSE(IsDrainingDecoder(true)); |
1956 | 1956 |
1957 EXPECT_FALSE(GetMediaCodecBridge(true)); | 1957 EXPECT_FALSE(GetMediaCodecBridge(true)); |
1958 EXPECT_FALSE(player_.IsPlaying()); | 1958 EXPECT_FALSE(player_.IsPlaying()); |
1959 | 1959 |
1960 player_.Start(); | 1960 player_.Start(); |
1961 EXPECT_TRUE(player_.IsPlaying()); | 1961 EXPECT_TRUE(player_.IsPlaying()); |
1962 EXPECT_EQ(3, demuxer_->num_data_requests()); | 1962 EXPECT_EQ(3, demuxer_->num_data_requests()); |
1963 } | 1963 } |
1964 | 1964 |
1965 TEST_F(MediaSourcePlayerTest, DISABLED_DecoderDrainInterruptedBySurfaceChange) { | 1965 TEST_F(MediaSourcePlayerTest, DecoderDrainInterruptedBySurfaceChange) { |
1966 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); | 1966 SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE(); |
1967 | 1967 |
1968 // Test if a video decoder is being drained while surface changes, draining | 1968 // Test if a video decoder is being drained while surface changes, draining |
1969 // is canceled. | 1969 // is canceled. |
1970 SendConfigChangeToDecoder(false, false, 0, false); | 1970 SendConfigChangeToDecoder(false, false, 0, false); |
1971 EXPECT_TRUE(IsDrainingDecoder(false)); | 1971 EXPECT_TRUE(IsDrainingDecoder(false)); |
1972 | 1972 |
1973 CreateNextTextureAndSetVideoSurface(); | 1973 CreateNextTextureAndSetVideoSurface(); |
1974 WaitForVideoDecodeDone(); | 1974 WaitForVideoDecodeDone(); |
1975 | 1975 |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2322 // Wait for the metadata change. | 2322 // Wait for the metadata change. |
2323 while(manager_.num_metadata_changes() == 1) { | 2323 while(manager_.num_metadata_changes() == 1) { |
2324 player_.OnDemuxerDataAvailable(data); | 2324 player_.OnDemuxerDataAvailable(data); |
2325 WaitForVideoDecodeDone(); | 2325 WaitForVideoDecodeDone(); |
2326 } | 2326 } |
2327 EXPECT_EQ(2, manager_.num_metadata_changes()); | 2327 EXPECT_EQ(2, manager_.num_metadata_changes()); |
2328 WaitForVideoDecodeDone(); | 2328 WaitForVideoDecodeDone(); |
2329 } | 2329 } |
2330 | 2330 |
2331 } // namespace media | 2331 } // namespace media |
OLD | NEW |