Chromium Code Reviews| 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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 600 decoder_texture_target_); | 600 decoder_texture_target_); |
| 601 } | 601 } |
| 602 | 602 |
| 603 scoped_refptr<VideoFrame> frame(VideoFrame::WrapNativeTextures( | 603 scoped_refptr<VideoFrame> frame(VideoFrame::WrapNativeTextures( |
| 604 pixel_format_, mailbox_holders, | 604 pixel_format_, mailbox_holders, |
| 605 base::Bind(&ReleaseMailboxTrampoline, factories_->GetTaskRunner(), | 605 base::Bind(&ReleaseMailboxTrampoline, factories_->GetTaskRunner(), |
| 606 base::Bind(&GpuVideoDecoder::ReleaseMailbox, | 606 base::Bind(&GpuVideoDecoder::ReleaseMailbox, |
| 607 weak_factory_.GetWeakPtr(), factories_, | 607 weak_factory_.GetWeakPtr(), factories_, |
| 608 picture.picture_buffer_id(), pb.texture_ids())), | 608 picture.picture_buffer_id(), pb.texture_ids())), |
| 609 pb.size(), visible_rect, natural_size, timestamp)); | 609 pb.size(), visible_rect, natural_size, timestamp)); |
| 610 frame->set_color_space(picture.color_space()); | |
|
sandersd (OOO until July 31)
2016/09/16 21:54:13
This is pretty clearly wrong given the next line ;
hubbe
2016/09/21 22:04:25
Done.
| |
| 610 if (!frame) { | 611 if (!frame) { |
| 611 DLOG(ERROR) << "Create frame failed for: " << picture.picture_buffer_id(); | 612 DLOG(ERROR) << "Create frame failed for: " << picture.picture_buffer_id(); |
| 612 NotifyError(VideoDecodeAccelerator::PLATFORM_FAILURE); | 613 NotifyError(VideoDecodeAccelerator::PLATFORM_FAILURE); |
| 613 return; | 614 return; |
| 614 } | 615 } |
| 615 if (picture.allow_overlay()) | 616 if (picture.allow_overlay()) |
| 616 frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, true); | 617 frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, true); |
| 617 #if defined(OS_MACOSX) || defined(OS_WIN) | 618 #if defined(OS_MACOSX) || defined(OS_WIN) |
| 618 frame->metadata()->SetBoolean(VideoFrameMetadata::DECODER_OWNS_FRAME, true); | 619 frame->metadata()->SetBoolean(VideoFrameMetadata::DECODER_OWNS_FRAME, true); |
| 619 #endif | 620 #endif |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 824 } | 825 } |
| 825 return false; | 826 return false; |
| 826 } | 827 } |
| 827 | 828 |
| 828 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() | 829 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() |
| 829 const { | 830 const { |
| 830 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); | 831 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); |
| 831 } | 832 } |
| 832 | 833 |
| 833 } // namespace media | 834 } // namespace media |
| OLD | NEW |