OLD | NEW |
---|---|
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 "media/filters/gpu_video_decoder.h" | 5 #include "media/filters/gpu_video_decoder.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/cpu.h" | 9 #include "base/cpu.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
368 } | 368 } |
369 | 369 |
370 bool GpuVideoDecoder::CanMoreDecodeWorkBeDone() { | 370 bool GpuVideoDecoder::CanMoreDecodeWorkBeDone() { |
371 return bitstream_buffers_in_decoder_.size() < kMaxInFlightDecodes; | 371 return bitstream_buffers_in_decoder_.size() < kMaxInFlightDecodes; |
372 } | 372 } |
373 | 373 |
374 void GpuVideoDecoder::RequestBufferDecode( | 374 void GpuVideoDecoder::RequestBufferDecode( |
375 DemuxerStream::Status status, | 375 DemuxerStream::Status status, |
376 const scoped_refptr<DecoderBuffer>& buffer) { | 376 const scoped_refptr<DecoderBuffer>& buffer) { |
377 DCHECK(gvd_loop_proxy_->BelongsToCurrentThread()); | 377 DCHECK(gvd_loop_proxy_->BelongsToCurrentThread()); |
378 DCHECK_EQ(status != DemuxerStream::kOk, !buffer) << status; | 378 //DCHECK_EQ(status != DemuxerStream::kOk, !buffer) << status; |
Ami GONE FROM CHROMIUM
2013/05/22 23:59:47
lolwat? Planning to revert this file?
Pawel Osciak
2013/05/24 01:46:39
lol, yeah sorry
| |
379 | 379 |
380 demuxer_read_in_progress_ = false; | 380 demuxer_read_in_progress_ = false; |
381 | 381 |
382 if (status == DemuxerStream::kAborted) { | 382 if (status == DemuxerStream::kAborted) { |
383 DVLOG(1) << __PRETTY_FUNCTION__ << "ABORTED"; | |
383 if (pending_read_cb_.is_null()) | 384 if (pending_read_cb_.is_null()) |
384 return; | 385 return; |
385 base::ResetAndReturn(&pending_read_cb_).Run(kOk, NULL); | 386 base::ResetAndReturn(&pending_read_cb_).Run(kOk, NULL); |
386 return; | 387 return; |
387 } | 388 } |
388 | 389 |
389 if (status == DemuxerStream::kConfigChanged) { | 390 if (status == DemuxerStream::kConfigChanged) { |
391 DVLOG(1) << __PRETTY_FUNCTION__ << "CONFIG CHANGED"; | |
392 | |
390 if (pending_read_cb_.is_null()) | 393 if (pending_read_cb_.is_null()) |
391 return; | 394 return; |
392 // TODO(acolwell): Add support for reinitializing the decoder when | 395 // TODO(acolwell): Add support for reinitializing the decoder when |
393 // |status| == kConfigChanged. For now we just trigger a decode error. | 396 // |status| == kConfigChanged. For now we just trigger a decode error. |
394 state_ = kError; | 397 state_ = kError; |
395 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); | 398 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); |
396 return; | 399 return; |
397 } | 400 } |
398 | 401 |
399 DCHECK_EQ(status, DemuxerStream::kOk); | 402 DCHECK_EQ(status, DemuxerStream::kOk); |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
711 | 714 |
712 state_ = kError; | 715 state_ = kError; |
713 | 716 |
714 if (!pending_read_cb_.is_null()) { | 717 if (!pending_read_cb_.is_null()) { |
715 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); | 718 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); |
716 return; | 719 return; |
717 } | 720 } |
718 } | 721 } |
719 | 722 |
720 } // namespace media | 723 } // namespace media |
OLD | NEW |