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

Side by Side Diff: media/filters/ffmpeg_demuxer_unittest.cc

Issue 11411332: Replace trampolining in FFmpegDemuxer with explicit thread calling convention checks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <algorithm> 5 #include <algorithm>
6 #include <deque> 6 #include <deque>
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 EXPECT_TRUE(IsStreamStopped(DemuxerStream::AUDIO)); 524 EXPECT_TRUE(IsStreamStopped(DemuxerStream::AUDIO));
525 525
526 // Attempt a read from the video stream: it should return valid data. 526 // Attempt a read from the video stream: it should return valid data.
527 video->Read(NewReadCB(FROM_HERE, 22084, 0)); 527 video->Read(NewReadCB(FROM_HERE, 22084, 0));
528 message_loop_.Run(); 528 message_loop_.Run();
529 529
530 // Attempt a read from the audio stream: it should immediately return end of 530 // Attempt a read from the audio stream: it should immediately return end of
531 // stream without requiring the message loop to read data. 531 // stream without requiring the message loop to read data.
532 bool got_eos_buffer = false; 532 bool got_eos_buffer = false;
533 audio->Read(base::Bind(&EosOnReadDone, &got_eos_buffer)); 533 audio->Read(base::Bind(&EosOnReadDone, &got_eos_buffer));
534 message_loop_.RunUntilIdle();
534 EXPECT_TRUE(got_eos_buffer); 535 EXPECT_TRUE(got_eos_buffer);
535 } 536 }
536 537
537 // Verify that seek works properly when the WebM cues data is at the start of 538 // Verify that seek works properly when the WebM cues data is at the start of
538 // the file instead of at the end. 539 // the file instead of at the end.
539 TEST_F(FFmpegDemuxerTest, SeekWithCuesBeforeFirstCluster) { 540 TEST_F(FFmpegDemuxerTest, SeekWithCuesBeforeFirstCluster) {
540 CreateDemuxer("bear-320x240-cues-in-front.webm"); 541 CreateDemuxer("bear-320x240-cues-in-front.webm");
541 InitializeDemuxer(); 542 InitializeDemuxer();
542 543
543 // Get our streams. 544 // Get our streams.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) { 617 TEST_F(FFmpegDemuxerTest, UnsupportedVideoSupportedAudioDemux) {
617 CreateDemuxer("vorbis_audio_wmv_video.mkv"); 618 CreateDemuxer("vorbis_audio_wmv_video.mkv");
618 InitializeDemuxer(); 619 InitializeDemuxer();
619 620
620 // Ensure the expected streams are present. 621 // Ensure the expected streams are present.
621 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO)); 622 EXPECT_FALSE(demuxer_->GetStream(DemuxerStream::VIDEO));
622 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO)); 623 EXPECT_TRUE(demuxer_->GetStream(DemuxerStream::AUDIO));
623 } 624 }
624 625
625 } // namespace media 626 } // namespace media
OLDNEW
« media/filters/ffmpeg_demuxer.cc ('K') | « media/filters/ffmpeg_demuxer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698