diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-05 08:34:49 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-05 08:34:49 +0000 |
commit | c3c9af1cbf896627bc9dfcc224ee83c23b79b6be (patch) | |
tree | eb2170260e899732a17df200d79f3fe1e7c1fff2 /media/mf/test/mft_h264_decoder_unittest.cc | |
parent | bfe0d724ef301309eceb431767658f4cbe7b08c1 (diff) | |
download | chromium_src-c3c9af1cbf896627bc9dfcc224ee83c23b79b6be.zip chromium_src-c3c9af1cbf896627bc9dfcc224ee83c23b79b6be.tar.gz chromium_src-c3c9af1cbf896627bc9dfcc224ee83c23b79b6be.tar.bz2 |
Rename all FillThisBuffer and EmptyThisBuffer to something more meaningful
The FillThisBuffer and EmptyThisBuffer names are very confusing. Anyone
new working on the code probably won't understand the code at all. I'm changing
the names to something more meaningful, which state the actual action taken by
the methods. It is also easier to tell whether the method is for input pin or
for output pin by their names.
Review URL: http://codereview.chromium.org/3201013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58604 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/mf/test/mft_h264_decoder_unittest.cc')
-rw-r--r-- | media/mf/test/mft_h264_decoder_unittest.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/media/mf/test/mft_h264_decoder_unittest.cc b/media/mf/test/mft_h264_decoder_unittest.cc index e805127..80ea7b1 100644 --- a/media/mf/test/mft_h264_decoder_unittest.cc +++ b/media/mf/test/mft_h264_decoder_unittest.cc @@ -127,15 +127,15 @@ class SimpleMftH264DecoderHandler : public VideoDecodeEngine::EventHandler { format_change_count_++; info_.stream_info_ = stream_info; } - virtual void OnEmptyBufferCallback(scoped_refptr<Buffer> buffer) { + virtual void ProduceVideoSample(scoped_refptr<Buffer> buffer) { if (reader_.get() && decoder_) { empty_buffer_callback_count_++; scoped_refptr<DataBuffer> input; reader_->ReadCallback(&input); - decoder_->EmptyThisBuffer(input); + decoder_->ConsumeVideoSample(input); } } - virtual void OnFillBufferCallback(scoped_refptr<VideoFrame> frame) { + virtual void ConsumeVideoFrame(scoped_refptr<VideoFrame> frame) { fill_buffer_callback_count_++; current_frame_ = frame; } @@ -279,7 +279,7 @@ TEST_F(MftH264DecoderTest, DrainOnEmptyBuffer) { // Decoder should switch to drain mode because of this NULL buffer, and then // switch to kStopped when it says it needs more input during drain mode. - decoder->EmptyThisBuffer(buffer); + decoder->ConsumeVideoSample(buffer); EXPECT_EQ(MftH264Decoder::kStopped, decoder->state()); // Should have called back with one empty frame. @@ -308,7 +308,7 @@ TEST_F(MftH264DecoderTest, NoOutputOnGarbageInput) { handler.SetDecoder(decoder.get()); while (MftH264Decoder::kStopped != decoder->state()) { scoped_refptr<VideoFrame> frame; - decoder->FillThisBuffer(frame); + decoder->ProduceVideoFrame(frame); } // Output callback should only be invoked once - the empty frame to indicate @@ -356,7 +356,7 @@ TEST_F(MftH264DecoderTest, NoFlushAtStopped) { handler.SetDecoder(decoder.get()); while (MftH264Decoder::kStopped != decoder->state()) { scoped_refptr<VideoFrame> frame; - decoder->FillThisBuffer(frame); + decoder->ProduceVideoFrame(frame); } EXPECT_EQ(0, handler.flush_count_); int old_flush_count = handler.flush_count_; @@ -399,7 +399,7 @@ void DecodeValidVideo(const std::string& filename, int num_frames, bool dxva) { handler.SetDecoder(decoder.get()); while (MftH264Decoder::kStopped != decoder->state()) { scoped_refptr<VideoFrame> frame; - decoder->FillThisBuffer(frame); + decoder->ProduceVideoFrame(frame); } // We expect a format change when decoder receives enough data to determine |