| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <errno.h> | 5 #include <errno.h> |
| 6 #include <fcntl.h> | 6 #include <fcntl.h> |
| 7 #include <linux/videodev2.h> | 7 #include <linux/videodev2.h> |
| 8 #include <poll.h> | 8 #include <poll.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 #include <sys/eventfd.h> | 10 #include <sys/eventfd.h> |
| (...skipping 2493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2504 DCHECK(!output_record.at_client); | 2504 DCHECK(!output_record.at_client); |
| 2505 DCHECK(!output_record.at_device); | 2505 DCHECK(!output_record.at_device); |
| 2506 DCHECK_NE(output_record.egl_image, EGL_NO_IMAGE_KHR); | 2506 DCHECK_NE(output_record.egl_image, EGL_NO_IMAGE_KHR); |
| 2507 DCHECK_NE(output_record.picture_id, -1); | 2507 DCHECK_NE(output_record.picture_id, -1); |
| 2508 output_record.at_client = true; | 2508 output_record.at_client = true; |
| 2509 | 2509 |
| 2510 // TODO(posciak): Use visible size from decoder here instead | 2510 // TODO(posciak): Use visible size from decoder here instead |
| 2511 // (crbug.com/402760). Passing (0, 0) results in the client using the | 2511 // (crbug.com/402760). Passing (0, 0) results in the client using the |
| 2512 // visible size extracted from the container instead. | 2512 // visible size extracted from the container instead. |
| 2513 media::Picture picture(output_record.picture_id, dec_surface->bitstream_id(), | 2513 media::Picture picture(output_record.picture_id, dec_surface->bitstream_id(), |
| 2514 gfx::Rect(0, 0), false); | 2514 gfx::Rect(0, 0), false, false); |
| 2515 DVLOGF(3) << dec_surface->ToString() | 2515 DVLOGF(3) << dec_surface->ToString() |
| 2516 << ", bitstream_id: " << picture.bitstream_buffer_id() | 2516 << ", bitstream_id: " << picture.bitstream_buffer_id() |
| 2517 << ", picture_id: " << picture.picture_buffer_id(); | 2517 << ", picture_id: " << picture.picture_buffer_id(); |
| 2518 pending_picture_ready_.push(PictureRecord(output_record.cleared, picture)); | 2518 pending_picture_ready_.push(PictureRecord(output_record.cleared, picture)); |
| 2519 SendPictureReady(); | 2519 SendPictureReady(); |
| 2520 output_record.cleared = true; | 2520 output_record.cleared = true; |
| 2521 } | 2521 } |
| 2522 | 2522 |
| 2523 scoped_refptr<V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface> | 2523 scoped_refptr<V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface> |
| 2524 V4L2SliceVideoDecodeAccelerator::CreateSurface() { | 2524 V4L2SliceVideoDecodeAccelerator::CreateSurface() { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2608 V4L2SliceVideoDecodeAccelerator::GetSupportedProfiles() { | 2608 V4L2SliceVideoDecodeAccelerator::GetSupportedProfiles() { |
| 2609 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); | 2609 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); |
| 2610 if (!device) | 2610 if (!device) |
| 2611 return SupportedProfiles(); | 2611 return SupportedProfiles(); |
| 2612 | 2612 |
| 2613 return device->GetSupportedDecodeProfiles(arraysize(supported_input_fourccs_), | 2613 return device->GetSupportedDecodeProfiles(arraysize(supported_input_fourccs_), |
| 2614 supported_input_fourccs_); | 2614 supported_input_fourccs_); |
| 2615 } | 2615 } |
| 2616 | 2616 |
| 2617 } // namespace content | 2617 } // namespace content |
| OLD | NEW |