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

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

Issue 179028: Revert "Fix a ton of compiler warnings." (Closed)
Patch Set: Created 11 years, 3 months 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/clock.h ('k') | media/filters/null_audio_renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 <deque> 5 #include <deque>
6 6
7 #include "base/thread.h" 7 #include "base/thread.h"
8 #include "media/base/filters.h" 8 #include "media/base/filters.h"
9 #include "media/base/mock_ffmpeg.h" 9 #include "media/base/mock_ffmpeg.h"
10 #include "media/base/mock_filter_host.h" 10 #include "media/base/mock_filter_host.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 389
390 // We should now expect an end of stream buffer in both the audio and video 390 // We should now expect an end of stream buffer in both the audio and video
391 // streams. 391 // streams.
392 392
393 // Attempt a read from the audio stream and run the message loop until done. 393 // Attempt a read from the audio stream and run the message loop until done.
394 reader->Read(audio); 394 reader->Read(audio);
395 message_loop_.RunAllPending(); 395 message_loop_.RunAllPending();
396 EXPECT_TRUE(reader->called()); 396 EXPECT_TRUE(reader->called());
397 ASSERT_TRUE(reader->buffer()); 397 ASSERT_TRUE(reader->buffer());
398 EXPECT_TRUE(reader->buffer()->IsEndOfStream()); 398 EXPECT_TRUE(reader->buffer()->IsEndOfStream());
399 EXPECT_TRUE(NULL == reader->buffer()->GetData()); 399 EXPECT_EQ(NULL, reader->buffer()->GetData());
400 EXPECT_EQ(0u, reader->buffer()->GetDataSize()); 400 EXPECT_EQ(0u, reader->buffer()->GetDataSize());
401 401
402 // Manually release buffer, which should release any remaining AVPackets. 402 // Manually release buffer, which should release any remaining AVPackets.
403 reader->Reset(); 403 reader->Reset();
404 message_loop_.RunAllPending(); 404 message_loop_.RunAllPending();
405 MockFFmpeg::get()->CheckPoint(5); 405 MockFFmpeg::get()->CheckPoint(5);
406 406
407 // Attempt a read from the audio stream and run the message loop until done. 407 // Attempt a read from the audio stream and run the message loop until done.
408 reader->Read(video); 408 reader->Read(video);
409 message_loop_.RunAllPending(); 409 message_loop_.RunAllPending();
410 EXPECT_TRUE(reader->called()); 410 EXPECT_TRUE(reader->called());
411 ASSERT_TRUE(reader->buffer()); 411 ASSERT_TRUE(reader->buffer());
412 EXPECT_TRUE(reader->buffer()->IsEndOfStream()); 412 EXPECT_TRUE(reader->buffer()->IsEndOfStream());
413 EXPECT_TRUE(NULL == reader->buffer()->GetData()); 413 EXPECT_EQ(NULL, reader->buffer()->GetData());
414 EXPECT_EQ(0u, reader->buffer()->GetDataSize()); 414 EXPECT_EQ(0u, reader->buffer()->GetDataSize());
415 415
416 // Manually release buffer, which should release any remaining AVPackets. 416 // Manually release buffer, which should release any remaining AVPackets.
417 reader->Reset(); 417 reader->Reset();
418 message_loop_.RunAllPending(); 418 message_loop_.RunAllPending();
419 MockFFmpeg::get()->CheckPoint(6); 419 MockFFmpeg::get()->CheckPoint(6);
420 } 420 }
421 421
422 TEST_F(FFmpegDemuxerTest, Seek) { 422 TEST_F(FFmpegDemuxerTest, Seek) {
423 // We're testing the following: 423 // We're testing the following:
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 { 798 {
799 SCOPED_TRACE(""); 799 SCOPED_TRACE("");
800 InitializeDemuxer(); 800 InitializeDemuxer();
801 } 801 }
802 EXPECT_CALL(*data_source_, IsStreaming()) 802 EXPECT_CALL(*data_source_, IsStreaming())
803 .WillOnce(Return(false)); 803 .WillOnce(Return(false));
804 EXPECT_FALSE(demuxer_->IsStreaming()); 804 EXPECT_FALSE(demuxer_->IsStreaming());
805 } 805 }
806 806
807 } // namespace media 807 } // namespace media
OLDNEW
« no previous file with comments | « media/base/clock.h ('k') | media/filters/null_audio_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698