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

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

Issue 699763002: Fix an issue that a browser seek is requested after decoder draining is interrupted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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_decoder_job.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 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « media/base/android/media_decoder_job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698