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 "media/gpu/v4l2_slice_video_decode_accelerator.h" | 5 #include "media/gpu/v4l2_slice_video_decode_accelerator.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <linux/videodev2.h> | 9 #include <linux/videodev2.h> |
10 #include <poll.h> | 10 #include <poll.h> |
(...skipping 3150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3161 DCHECK(inserted); | 3161 DCHECK(inserted); |
3162 | 3162 |
3163 DCHECK(!output_record.at_client); | 3163 DCHECK(!output_record.at_client); |
3164 DCHECK(!output_record.at_device); | 3164 DCHECK(!output_record.at_device); |
3165 DCHECK_NE(output_record.picture_id, -1); | 3165 DCHECK_NE(output_record.picture_id, -1); |
3166 output_record.at_client = true; | 3166 output_record.at_client = true; |
3167 | 3167 |
3168 // TODO(posciak): Use visible size from decoder here instead | 3168 // TODO(posciak): Use visible size from decoder here instead |
3169 // (crbug.com/402760). Passing (0, 0) results in the client using the | 3169 // (crbug.com/402760). Passing (0, 0) results in the client using the |
3170 // visible size extracted from the container instead. | 3170 // visible size extracted from the container instead. |
| 3171 // TODO(hubbe): Insert correct color space. http://crbug.com/647725 |
3171 Picture picture(output_record.picture_id, dec_surface->bitstream_id(), | 3172 Picture picture(output_record.picture_id, dec_surface->bitstream_id(), |
3172 gfx::Rect(0, 0), false); | 3173 gfx::Rect(0, 0), gfx::ColorSpace(), false); |
3173 DVLOGF(3) << dec_surface->ToString() | 3174 DVLOGF(3) << dec_surface->ToString() |
3174 << ", bitstream_id: " << picture.bitstream_buffer_id() | 3175 << ", bitstream_id: " << picture.bitstream_buffer_id() |
3175 << ", picture_id: " << picture.picture_buffer_id(); | 3176 << ", picture_id: " << picture.picture_buffer_id(); |
3176 pending_picture_ready_.push(PictureRecord(output_record.cleared, picture)); | 3177 pending_picture_ready_.push(PictureRecord(output_record.cleared, picture)); |
3177 SendPictureReady(); | 3178 SendPictureReady(); |
3178 output_record.cleared = true; | 3179 output_record.cleared = true; |
3179 } | 3180 } |
3180 | 3181 |
3181 scoped_refptr<V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface> | 3182 scoped_refptr<V4L2SliceVideoDecodeAccelerator::V4L2DecodeSurface> |
3182 V4L2SliceVideoDecodeAccelerator::CreateSurface() { | 3183 V4L2SliceVideoDecodeAccelerator::CreateSurface() { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3272 V4L2SliceVideoDecodeAccelerator::GetSupportedProfiles() { | 3273 V4L2SliceVideoDecodeAccelerator::GetSupportedProfiles() { |
3273 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); | 3274 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); |
3274 if (!device) | 3275 if (!device) |
3275 return SupportedProfiles(); | 3276 return SupportedProfiles(); |
3276 | 3277 |
3277 return device->GetSupportedDecodeProfiles(arraysize(supported_input_fourccs_), | 3278 return device->GetSupportedDecodeProfiles(arraysize(supported_input_fourccs_), |
3278 supported_input_fourccs_); | 3279 supported_input_fourccs_); |
3279 } | 3280 } |
3280 | 3281 |
3281 } // namespace media | 3282 } // namespace media |
OLD | NEW |