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

Unified Diff: trunk/src/media/filters/video_frame_stream_unittest.cc

Issue 14320005: Revert 194993 "Remove reference counting from media::VideoDecode..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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 | « trunk/src/media/filters/video_frame_stream.cc ('k') | trunk/src/media/filters/video_renderer_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/media/filters/video_frame_stream_unittest.cc
===================================================================
--- trunk/src/media/filters/video_frame_stream_unittest.cc (revision 195011)
+++ trunk/src/media/filters/video_frame_stream_unittest.cc (working copy)
@@ -31,22 +31,19 @@
class VideoFrameStreamTest : public testing::TestWithParam<bool> {
public:
VideoFrameStreamTest()
- : video_config_(kCodecVP8, VIDEO_CODEC_PROFILE_UNKNOWN, kVideoFormat,
+ : video_frame_stream_(new VideoFrameStream(
+ message_loop_.message_loop_proxy(),
+ base::Bind(&VideoFrameStreamTest::SetDecryptorReadyCallback,
+ base::Unretained(this)))),
+ video_config_(kCodecVP8, VIDEO_CODEC_PROFILE_UNKNOWN, kVideoFormat,
kCodedSize, kVisibleRect, kNaturalSize, NULL, 0,
GetParam()),
demuxer_stream_(new StrictMock<MockDemuxerStream>()),
decryptor_(new NiceMock<MockDecryptor>()),
decoder_(new StrictMock<MockVideoDecoder>()),
is_initialized_(false) {
- ScopedVector<VideoDecoder> decoders;
- decoders.push_back(decoder_);
+ decoders_.push_back(decoder_);
- video_frame_stream_ = new VideoFrameStream(
- message_loop_.message_loop_proxy(),
- decoders.Pass(),
- base::Bind(&VideoFrameStreamTest::SetDecryptorReadyCallback,
- base::Unretained(this)));
-
EXPECT_CALL(*demuxer_stream_, type())
.WillRepeatedly(Return(DemuxerStream::VIDEO));
EXPECT_CALL(*demuxer_stream_, video_decoder_config())
@@ -91,6 +88,7 @@
.WillOnce(SaveArg<1>(&decoder_init_cb_));
video_frame_stream_->Initialize(
demuxer_stream_,
+ decoders_,
base::Bind(&VideoFrameStreamTest::OnStatistics, base::Unretained(this)),
base::Bind(&VideoFrameStreamTest::OnInitialized,
base::Unretained(this)));
@@ -190,7 +188,8 @@
// Use NiceMock since we don't care about most of calls on the decryptor, e.g.
// RegisterNewKeyCB().
scoped_ptr<NiceMock<MockDecryptor> > decryptor_;
- StrictMock<MockVideoDecoder>* decoder_; // Owned by |video_frame_stream_|.
+ scoped_refptr<StrictMock<MockVideoDecoder> > decoder_;
+ VideoFrameStream::VideoDecoderList decoders_;
// Callbacks to simulate pending decoder operations.
PipelineStatusCB decoder_init_cb_;
« no previous file with comments | « trunk/src/media/filters/video_frame_stream.cc ('k') | trunk/src/media/filters/video_renderer_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698