OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_video_decode_accelerator.h" | 5 #include "media/gpu/v4l2_video_decode_accelerator.h" |
6 | 6 |
7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <fcntl.h> | 9 #include <fcntl.h> |
10 #include <linux/videodev2.h> | 10 #include <linux/videodev2.h> |
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1227 base::TimeDelta()); | 1227 base::TimeDelta()); |
1228 // Unretained is safe because |this| owns image processor and there will | 1228 // Unretained is safe because |this| owns image processor and there will |
1229 // be no callbacks after processor destroys. | 1229 // be no callbacks after processor destroys. |
1230 image_processor_->Process( | 1230 image_processor_->Process( |
1231 frame, dqbuf.index, | 1231 frame, dqbuf.index, |
1232 base::Bind(&V4L2VideoDecodeAccelerator::FrameProcessed, | 1232 base::Bind(&V4L2VideoDecodeAccelerator::FrameProcessed, |
1233 base::Unretained(this), bitstream_buffer_id)); | 1233 base::Unretained(this), bitstream_buffer_id)); |
1234 } else { | 1234 } else { |
1235 output_record.state = kAtClient; | 1235 output_record.state = kAtClient; |
1236 decoder_frames_at_client_++; | 1236 decoder_frames_at_client_++; |
| 1237 // TODO(hubbe): Insert correct color space. http://crbug.com/647725 |
1237 const Picture picture(output_record.picture_id, bitstream_buffer_id, | 1238 const Picture picture(output_record.picture_id, bitstream_buffer_id, |
1238 gfx::Rect(visible_size_), false); | 1239 gfx::Rect(visible_size_), gfx::ColorSpace(), |
| 1240 false); |
1239 pending_picture_ready_.push( | 1241 pending_picture_ready_.push( |
1240 PictureRecord(output_record.cleared, picture)); | 1242 PictureRecord(output_record.cleared, picture)); |
1241 SendPictureReady(); | 1243 SendPictureReady(); |
1242 output_record.cleared = true; | 1244 output_record.cleared = true; |
1243 } | 1245 } |
1244 } | 1246 } |
1245 } | 1247 } |
1246 | 1248 |
1247 NotifyFlushDoneIfNeeded(); | 1249 NotifyFlushDoneIfNeeded(); |
1248 } | 1250 } |
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2285 Enqueue(); | 2287 Enqueue(); |
2286 } | 2288 } |
2287 } | 2289 } |
2288 | 2290 |
2289 void V4L2VideoDecodeAccelerator::ImageProcessorError() { | 2291 void V4L2VideoDecodeAccelerator::ImageProcessorError() { |
2290 LOGF(ERROR) << "Image processor error"; | 2292 LOGF(ERROR) << "Image processor error"; |
2291 NOTIFY_ERROR(PLATFORM_FAILURE); | 2293 NOTIFY_ERROR(PLATFORM_FAILURE); |
2292 } | 2294 } |
2293 | 2295 |
2294 } // namespace media | 2296 } // namespace media |
OLD | NEW |