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

Unified Diff: media/filters/video_frame_stream_unittest.cc

Issue 339653003: No EOS frame in {Audio|Video}Decoder::OutputCB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 6 years, 6 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/opus_audio_decoder_unittest.cc ('k') | media/filters/video_renderer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_frame_stream_unittest.cc
diff --git a/media/filters/video_frame_stream_unittest.cc b/media/filters/video_frame_stream_unittest.cc
index 80271c17f9d277a61cdac8f23e92581fe50c2305..30120d212375e7c42bc9038457276464c0795c58 100644
--- a/media/filters/video_frame_stream_unittest.cc
+++ b/media/filters/video_frame_stream_unittest.cc
@@ -179,6 +179,15 @@ class VideoFrameStreamTest
} while (!pending_read_);
}
+ void ReadAllFrames() {
+ do {
+ ReadOneFrame();
+ } while (frame_read_.get() && !frame_read_->end_of_stream());
+
+ const int total_num_frames = kNumConfigs * kNumBuffersInOneConfig;
+ DCHECK_EQ(num_decoded_frames_, total_num_frames);
+ }
+
enum PendingState {
NOT_PENDING,
DEMUXER_READ_NORMAL,
@@ -371,12 +380,7 @@ TEST_P(VideoFrameStreamTest, ReadOneFrame) {
TEST_P(VideoFrameStreamTest, ReadAllFrames) {
Initialize();
- do {
- Read();
- } while (frame_read_.get() && !frame_read_->end_of_stream());
-
- const int total_num_frames = kNumConfigs * kNumBuffersInOneConfig;
- DCHECK_EQ(num_decoded_frames_, total_num_frames);
+ ReadAllFrames();
}
TEST_P(VideoFrameStreamTest, Read_AfterReset) {
@@ -536,6 +540,15 @@ TEST_P(VideoFrameStreamTest, Reset_AfterDemuxerRead_ConfigChange) {
Read();
}
+TEST_P(VideoFrameStreamTest, Reset_AfterEndOfStream) {
+ Initialize();
+ ReadAllFrames();
+ Reset();
+ num_decoded_frames_ = 0;
+ demuxer_stream_->SeekToStart();
+ ReadAllFrames();
+}
+
TEST_P(VideoFrameStreamTest, Reset_DuringNoKeyRead) {
Initialize();
EnterPendingState(DECRYPTOR_NO_KEY);
« no previous file with comments | « media/filters/opus_audio_decoder_unittest.cc ('k') | media/filters/video_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698