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

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

Issue 692323002: Move Liveness from DemuxerStreamProvider to DemuxerStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mojo 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/filters/video_decoder_selector_unittest.cc ('k') | media/filters/video_renderer_impl.h » ('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) 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/callback_helpers.h" 6 #include "base/callback_helpers.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "media/base/gmock_callback_support.h" 8 #include "media/base/gmock_callback_support.h"
9 #include "media/base/mock_filters.h" 9 #include "media/base/mock_filters.h"
10 #include "media/base/test_helpers.h" 10 #include "media/base/test_helpers.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 is_initialized_ = success; 126 is_initialized_ = success;
127 if (!success) 127 if (!success)
128 decoder_ = NULL; 128 decoder_ = NULL;
129 } 129 }
130 130
131 void InitializeVideoFrameStream() { 131 void InitializeVideoFrameStream() {
132 pending_initialize_ = true; 132 pending_initialize_ = true;
133 video_frame_stream_->Initialize( 133 video_frame_stream_->Initialize(
134 demuxer_stream_.get(), 134 demuxer_stream_.get(),
135 false,
136 base::Bind(&VideoFrameStreamTest::OnStatistics, base::Unretained(this)), 135 base::Bind(&VideoFrameStreamTest::OnStatistics, base::Unretained(this)),
137 base::Bind(&VideoFrameStreamTest::OnInitialized, 136 base::Bind(&VideoFrameStreamTest::OnInitialized,
138 base::Unretained(this))); 137 base::Unretained(this)));
139 message_loop_.RunUntilIdle(); 138 message_loop_.RunUntilIdle();
140 } 139 }
141 140
142 // Fake Decrypt() function used by DecryptingDemuxerStream. It does nothing 141 // Fake Decrypt() function used by DecryptingDemuxerStream. It does nothing
143 // but removes the DecryptConfig to make the buffer unencrypted. 142 // but removes the DecryptConfig to make the buffer unencrypted.
144 void Decrypt(Decryptor::StreamType stream_type, 143 void Decrypt(Decryptor::StreamType stream_type,
145 const scoped_refptr<DecoderBuffer>& encrypted, 144 const scoped_refptr<DecoderBuffer>& encrypted,
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 // The error must surface from Read() as DECODE_ERROR. 753 // The error must surface from Read() as DECODE_ERROR.
755 while (last_read_status_ == VideoFrameStream::OK) { 754 while (last_read_status_ == VideoFrameStream::OK) {
756 ReadOneFrame(); 755 ReadOneFrame();
757 message_loop_.RunUntilIdle(); 756 message_loop_.RunUntilIdle();
758 EXPECT_FALSE(pending_read_); 757 EXPECT_FALSE(pending_read_);
759 } 758 }
760 EXPECT_EQ(VideoFrameStream::DECODE_ERROR, last_read_status_); 759 EXPECT_EQ(VideoFrameStream::DECODE_ERROR, last_read_status_);
761 } 760 }
762 761
763 } // namespace media 762 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/video_decoder_selector_unittest.cc ('k') | media/filters/video_renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698