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 "content/common/gpu/media/vaapi_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 402 | 402 |
| 403 // Notify the client a picture is ready to be displayed. | 403 // Notify the client a picture is ready to be displayed. |
| 404 ++num_frames_at_client_; | 404 ++num_frames_at_client_; |
| 405 TRACE_COUNTER1("Video Decoder", "Textures at client", num_frames_at_client_); | 405 TRACE_COUNTER1("Video Decoder", "Textures at client", num_frames_at_client_); |
| 406 DVLOG(4) << "Notifying output picture id " << output_id | 406 DVLOG(4) << "Notifying output picture id " << output_id |
| 407 << " for input "<< input_id << " is ready"; | 407 << " for input "<< input_id << " is ready"; |
| 408 // TODO(posciak): Use visible size from decoder here instead | 408 // TODO(posciak): Use visible size from decoder here instead |
| 409 // (crbug.com/402760). Passing (0, 0) results in the client using the | 409 // (crbug.com/402760). Passing (0, 0) results in the client using the |
| 410 // visible size extracted from the container instead. | 410 // visible size extracted from the container instead. |
| 411 if (client_) | 411 if (client_) |
| 412 client_->PictureReady(media::Picture(output_id, input_id, | 412 client_->PictureReady(media::Picture(output_id, input_id, gfx::Rect(0, 0), |
|
liberato (no reviews please)
2016/03/09 15:32:06
perhaps remove this file from the CL.
chcunningham
2016/03/09 20:25:09
Done.
| |
| 413 gfx::Rect(0, 0), | |
| 414 picture->AllowOverlay())); | 413 picture->AllowOverlay())); |
| 415 } | 414 } |
| 416 | 415 |
| 417 void VaapiVideoDecodeAccelerator::TryOutputSurface() { | 416 void VaapiVideoDecodeAccelerator::TryOutputSurface() { |
| 418 DCHECK_EQ(message_loop_, base::MessageLoop::current()); | 417 DCHECK_EQ(message_loop_, base::MessageLoop::current()); |
| 419 | 418 |
| 420 // Handle Destroy() arriving while pictures are queued for output. | 419 // Handle Destroy() arriving while pictures are queued for output. |
| 421 if (!client_) | 420 if (!client_) |
| 422 return; | 421 return; |
| 423 | 422 |
| (...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1745 return vaapi_pic->dec_surface(); | 1744 return vaapi_pic->dec_surface(); |
| 1746 } | 1745 } |
| 1747 | 1746 |
| 1748 // static | 1747 // static |
| 1749 media::VideoDecodeAccelerator::SupportedProfiles | 1748 media::VideoDecodeAccelerator::SupportedProfiles |
| 1750 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { | 1749 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { |
| 1751 return VaapiWrapper::GetSupportedDecodeProfiles(); | 1750 return VaapiWrapper::GetSupportedDecodeProfiles(); |
| 1752 } | 1751 } |
| 1753 | 1752 |
| 1754 } // namespace content | 1753 } // namespace content |
| OLD | NEW |