Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: media/gpu/v4l2_video_decode_accelerator.cc

Issue 2156003002: V4L2VDA: do not queue output buffer during resolution change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698