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/gpu/vaapi_video_decode_accelerator.h" | 5 #include "media/gpu/vaapi_video_decode_accelerator.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 PLATFORM_FAILURE, ); | 425 PLATFORM_FAILURE, ); |
426 | 426 |
427 // Notify the client a picture is ready to be displayed. | 427 // Notify the client a picture is ready to be displayed. |
428 ++num_frames_at_client_; | 428 ++num_frames_at_client_; |
429 TRACE_COUNTER1("Video Decoder", "Textures at client", num_frames_at_client_); | 429 TRACE_COUNTER1("Video Decoder", "Textures at client", num_frames_at_client_); |
430 DVLOG(4) << "Notifying output picture id " << output_id | 430 DVLOG(4) << "Notifying output picture id " << output_id |
431 << " for input " << input_id << " is ready"; | 431 << " for input " << input_id << " is ready"; |
432 // TODO(posciak): Use visible size from decoder here instead | 432 // TODO(posciak): Use visible size from decoder here instead |
433 // (crbug.com/402760). Passing (0, 0) results in the client using the | 433 // (crbug.com/402760). Passing (0, 0) results in the client using the |
434 // visible size extracted from the container instead. | 434 // visible size extracted from the container instead. |
| 435 // TODO(hubbe): Use the correct color space. http://crbug.com/647725 |
435 if (client_) | 436 if (client_) |
436 client_->PictureReady( | 437 client_->PictureReady(Picture(output_id, input_id, gfx::Rect(0, 0), |
437 Picture(output_id, input_id, gfx::Rect(0, 0), picture->AllowOverlay())); | 438 gfx::ColorSpace(), picture->AllowOverlay())); |
438 } | 439 } |
439 | 440 |
440 void VaapiVideoDecodeAccelerator::TryOutputSurface() { | 441 void VaapiVideoDecodeAccelerator::TryOutputSurface() { |
441 DCHECK(task_runner_->BelongsToCurrentThread()); | 442 DCHECK(task_runner_->BelongsToCurrentThread()); |
442 | 443 |
443 // Handle Destroy() arriving while pictures are queued for output. | 444 // Handle Destroy() arriving while pictures are queued for output. |
444 if (!client_) | 445 if (!client_) |
445 return; | 446 return; |
446 | 447 |
447 if (pending_output_cbs_.empty() || output_buffers_.empty()) | 448 if (pending_output_cbs_.empty() || output_buffers_.empty()) |
(...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1881 return vaapi_pic->dec_surface(); | 1882 return vaapi_pic->dec_surface(); |
1882 } | 1883 } |
1883 | 1884 |
1884 // static | 1885 // static |
1885 VideoDecodeAccelerator::SupportedProfiles | 1886 VideoDecodeAccelerator::SupportedProfiles |
1886 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { | 1887 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { |
1887 return VaapiWrapper::GetSupportedDecodeProfiles(); | 1888 return VaapiWrapper::GetSupportedDecodeProfiles(); |
1888 } | 1889 } |
1889 | 1890 |
1890 } // namespace media | 1891 } // namespace media |
OLD | NEW |