| 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 | 403 |
| 404 // Notify the client a picture is ready to be displayed. | 404 // Notify the client a picture is ready to be displayed. |
| 405 ++num_frames_at_client_; | 405 ++num_frames_at_client_; |
| 406 TRACE_COUNTER1("Video Decoder", "Textures at client", num_frames_at_client_); | 406 TRACE_COUNTER1("Video Decoder", "Textures at client", num_frames_at_client_); |
| 407 DVLOG(4) << "Notifying output picture id " << output_id | 407 DVLOG(4) << "Notifying output picture id " << output_id |
| 408 << " for input "<< input_id << " is ready"; | 408 << " for input "<< input_id << " is ready"; |
| 409 // TODO(posciak): Use visible size from decoder here instead | 409 // TODO(posciak): Use visible size from decoder here instead |
| 410 // (crbug.com/402760). Passing (0, 0) results in the client using the | 410 // (crbug.com/402760). Passing (0, 0) results in the client using the |
| 411 // visible size extracted from the container instead. | 411 // visible size extracted from the container instead. |
| 412 if (client_) | 412 if (client_) |
| 413 client_->PictureReady(media::Picture(output_id, input_id, | 413 client_->PictureReady(media::Picture(output_id, input_id, gfx::Rect(0, 0), |
| 414 gfx::Rect(0, 0), | 414 picture->AllowOverlay(), false)); |
| 415 picture->AllowOverlay())); | |
| 416 } | 415 } |
| 417 | 416 |
| 418 void VaapiVideoDecodeAccelerator::TryOutputSurface() { | 417 void VaapiVideoDecodeAccelerator::TryOutputSurface() { |
| 419 DCHECK_EQ(message_loop_, base::MessageLoop::current()); | 418 DCHECK_EQ(message_loop_, base::MessageLoop::current()); |
| 420 | 419 |
| 421 // Handle Destroy() arriving while pictures are queued for output. | 420 // Handle Destroy() arriving while pictures are queued for output. |
| 422 if (!client_) | 421 if (!client_) |
| 423 return; | 422 return; |
| 424 | 423 |
| 425 if (pending_output_cbs_.empty() || output_buffers_.empty()) | 424 if (pending_output_cbs_.empty() || output_buffers_.empty()) |
| (...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1748 return vaapi_pic->dec_surface(); | 1747 return vaapi_pic->dec_surface(); |
| 1749 } | 1748 } |
| 1750 | 1749 |
| 1751 // static | 1750 // static |
| 1752 media::VideoDecodeAccelerator::SupportedProfiles | 1751 media::VideoDecodeAccelerator::SupportedProfiles |
| 1753 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { | 1752 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { |
| 1754 return VaapiWrapper::GetSupportedDecodeProfiles(); | 1753 return VaapiWrapper::GetSupportedDecodeProfiles(); |
| 1755 } | 1754 } |
| 1756 | 1755 |
| 1757 } // namespace content | 1756 } // namespace content |
| OLD | NEW |