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 2211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2222 if (image_processor_bitstream_buffer_ids_.empty()) { | 2222 if (image_processor_bitstream_buffer_ids_.empty()) { |
2223 NotifyFlushDoneIfNeeded(); | 2223 NotifyFlushDoneIfNeeded(); |
2224 if (decoder_state_ == kChangingResolution) | 2224 if (decoder_state_ == kChangingResolution) |
2225 StartResolutionChange(); | 2225 StartResolutionChange(); |
2226 } | 2226 } |
2227 } else { | 2227 } else { |
2228 DVLOGF(2) << "Bitstream buffer id " << bitstream_buffer_id << " not found " | 2228 DVLOGF(2) << "Bitstream buffer id " << bitstream_buffer_id << " not found " |
2229 << "because of Reset. Drop the buffer"; | 2229 << "because of Reset. Drop the buffer"; |
2230 output_record.state = kFree; | 2230 output_record.state = kFree; |
2231 free_output_buffers_.push(output_buffer_index); | 2231 free_output_buffers_.push(output_buffer_index); |
2232 Enqueue(); | 2232 // Do not queue the buffer if a resolution change is in progress. The queue |
| 2233 // is about to be destroyed anyway. Otherwise, the queue will be started in |
| 2234 // Enqueue and REQBUFS(0) will fail. |
| 2235 if (decoder_state_ != kChangingResolution) |
| 2236 Enqueue(); |
2233 } | 2237 } |
2234 } | 2238 } |
2235 | 2239 |
2236 void V4L2VideoDecodeAccelerator::ImageProcessorError() { | 2240 void V4L2VideoDecodeAccelerator::ImageProcessorError() { |
2237 LOGF(ERROR) << "Image processor error"; | 2241 LOGF(ERROR) << "Image processor error"; |
2238 NOTIFY_ERROR(PLATFORM_FAILURE); | 2242 NOTIFY_ERROR(PLATFORM_FAILURE); |
2239 } | 2243 } |
2240 | 2244 |
2241 } // namespace media | 2245 } // namespace media |
OLD | NEW |