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 <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 gfx::Size natural_size; | 582 gfx::Size natural_size; |
583 GetBufferData(picture.bitstream_buffer_id(), ×tamp, &visible_rect, | 583 GetBufferData(picture.bitstream_buffer_id(), ×tamp, &visible_rect, |
584 &natural_size); | 584 &natural_size); |
585 | 585 |
586 if (!picture.visible_rect().IsEmpty()) { | 586 if (!picture.visible_rect().IsEmpty()) { |
587 visible_rect = picture.visible_rect(); | 587 visible_rect = picture.visible_rect(); |
588 } | 588 } |
589 if (!gfx::Rect(pb.size()).Contains(visible_rect)) { | 589 if (!gfx::Rect(pb.size()).Contains(visible_rect)) { |
590 LOG(WARNING) << "Visible size " << visible_rect.ToString() | 590 LOG(WARNING) << "Visible size " << visible_rect.ToString() |
591 << " is larger than coded size " << pb.size().ToString(); | 591 << " is larger than coded size " << pb.size().ToString(); |
| 592 NOTREACHED() << "NOTE(slan): This is a NotifyError in the WebRTC pipeline"; |
592 visible_rect = gfx::Rect(pb.size()); | 593 visible_rect = gfx::Rect(pb.size()); |
593 } | 594 } |
594 | 595 |
595 DCHECK(decoder_texture_target_); | 596 DCHECK(decoder_texture_target_); |
596 | 597 |
597 gpu::MailboxHolder mailbox_holders[VideoFrame::kMaxPlanes]; | 598 gpu::MailboxHolder mailbox_holders[VideoFrame::kMaxPlanes]; |
598 for (size_t i = 0; i < pb.texture_ids().size(); ++i) { | 599 for (size_t i = 0; i < pb.texture_ids().size(); ++i) { |
599 mailbox_holders[i] = gpu::MailboxHolder(pb.texture_mailbox(i), sync_token_, | 600 mailbox_holders[i] = gpu::MailboxHolder(pb.texture_mailbox(i), sync_token_, |
600 decoder_texture_target_); | 601 decoder_texture_target_); |
601 } | 602 } |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 } | 829 } |
829 return false; | 830 return false; |
830 } | 831 } |
831 | 832 |
832 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() | 833 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() |
833 const { | 834 const { |
834 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); | 835 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); |
835 } | 836 } |
836 | 837 |
837 } // namespace media | 838 } // namespace media |
OLD | NEW |