| Index: media/filters/fake_video_decoder.cc
|
| diff --git a/media/filters/fake_video_decoder.cc b/media/filters/fake_video_decoder.cc
|
| index f3c4ef112d765173aed83226ed57f2835470b1e0..d5bb03bf6884f2044cbad0464e3ebde5c32aa149 100644
|
| --- a/media/filters/fake_video_decoder.cc
|
| +++ b/media/filters/fake_video_decoder.cc
|
| @@ -13,10 +13,12 @@
|
|
|
| namespace media {
|
|
|
| -FakeVideoDecoder::FakeVideoDecoder(int decoding_delay)
|
| +FakeVideoDecoder::FakeVideoDecoder(int decoding_delay,
|
| + bool supports_get_decode_output)
|
| : task_runner_(base::MessageLoopProxy::current()),
|
| weak_factory_(this),
|
| decoding_delay_(decoding_delay),
|
| + supports_get_decode_output_(supports_get_decode_output),
|
| state_(UNINITIALIZED),
|
| total_bytes_decoded_(0) {
|
| DCHECK_GE(decoding_delay, 0);
|
| @@ -103,6 +105,15 @@ void FakeVideoDecoder::Stop(const base::Closure& closure) {
|
| DoStop();
|
| }
|
|
|
| +scoped_refptr<VideoFrame> FakeVideoDecoder::GetDecodeOutput() {
|
| + DCHECK(task_runner_->BelongsToCurrentThread());
|
| + if (!supports_get_decode_output_ || decoded_frames_.empty())
|
| + return NULL;
|
| + scoped_refptr<VideoFrame> out = decoded_frames_.front();
|
| + decoded_frames_.pop_front();
|
| + return out;
|
| +}
|
| +
|
| void FakeVideoDecoder::HoldNextInit() {
|
| DCHECK(task_runner_->BelongsToCurrentThread());
|
| init_cb_.HoldCallback();
|
|
|