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

Unified Diff: media/filters/fake_video_decoder_unittest.cc

Issue 141243003: Add AudioBufferStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decoderstream_rebased
Patch Set: Rebase! Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/fake_video_decoder.cc ('k') | media/filters/ffmpeg_audio_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/fake_video_decoder_unittest.cc
diff --git a/media/filters/fake_video_decoder_unittest.cc b/media/filters/fake_video_decoder_unittest.cc
index 0aa3b5fc31d48cc70fc9ffaa656f70b8d8286909..ce0cfce4a48379f0f1446018ff4aa07ab3e20b00 100644
--- a/media/filters/fake_video_decoder_unittest.cc
+++ b/media/filters/fake_video_decoder_unittest.cc
@@ -21,7 +21,7 @@ static const int kDurationMs = 30;
class FakeVideoDecoderTest : public testing::Test {
public:
FakeVideoDecoderTest()
- : decoder_(new FakeVideoDecoder(kDecodingDelay)),
+ : decoder_(new FakeVideoDecoder(kDecodingDelay, false)),
num_input_buffers_(0),
num_decoded_frames_(0),
decode_status_(VideoDecoder::kNotEnoughData),
@@ -275,7 +275,7 @@ TEST_F(FakeVideoDecoderTest, Read_DecodingDelay) {
}
TEST_F(FakeVideoDecoderTest, Read_ZeroDelay) {
- decoder_.reset(new FakeVideoDecoder(0));
+ decoder_.reset(new FakeVideoDecoder(0, false));
Initialize();
while (num_input_buffers_ < kTotalBuffers) {
@@ -418,4 +418,16 @@ TEST_F(FakeVideoDecoderTest, Stop_PendingDuringPendingReadAndPendingReset) {
SatisfyStop();
}
+TEST_F(FakeVideoDecoderTest, GetDecodeOutput) {
+ decoder_.reset(new FakeVideoDecoder(kDecodingDelay, true));
+ Initialize();
+
+ while (num_input_buffers_ < kTotalBuffers) {
+ ReadOneFrame();
+ while (decoder_->GetDecodeOutput())
+ ++num_decoded_frames_;
+ EXPECT_EQ(num_input_buffers_, num_decoded_frames_);
+ }
+}
+
} // namespace media
« no previous file with comments | « media/filters/fake_video_decoder.cc ('k') | media/filters/ffmpeg_audio_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698