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

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

Issue 2821023002: Change unique_ptr::reset() for std::move
Patch Set: Created 3 years, 8 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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 // We're waiting for a new buffer -- exit without scheduling a new task. 812 // We're waiting for a new buffer -- exit without scheduling a new task.
813 return; 813 return;
814 } 814 }
815 linked_ptr<BitstreamBufferRef>& buffer_ref = decoder_input_queue_.front(); 815 linked_ptr<BitstreamBufferRef>& buffer_ref = decoder_input_queue_.front();
816 if (decoder_delay_bitstream_buffer_id_ == buffer_ref->input_id) { 816 if (decoder_delay_bitstream_buffer_id_ == buffer_ref->input_id) {
817 // We're asked to delay decoding on this and subsequent buffers. 817 // We're asked to delay decoding on this and subsequent buffers.
818 return; 818 return;
819 } 819 }
820 820
821 // Setup to use the next buffer. 821 // Setup to use the next buffer.
822 decoder_current_bitstream_buffer_.reset(buffer_ref.release()); 822 decoder_current_bitstream_buffer_ = std::move(buffer_ref);
823 decoder_input_queue_.pop(); 823 decoder_input_queue_.pop();
824 const auto& shm = decoder_current_bitstream_buffer_->shm; 824 const auto& shm = decoder_current_bitstream_buffer_->shm;
825 if (shm) { 825 if (shm) {
826 DVLOGF(3) << "reading input_id=" 826 DVLOGF(3) << "reading input_id="
827 << decoder_current_bitstream_buffer_->input_id 827 << decoder_current_bitstream_buffer_->input_id
828 << ", addr=" << shm->memory() << ", size=" << shm->size(); 828 << ", addr=" << shm->memory() << ", size=" << shm->size();
829 } else { 829 } else {
830 DCHECK_EQ(decoder_current_bitstream_buffer_->input_id, kFlushBufferId); 830 DCHECK_EQ(decoder_current_bitstream_buffer_->input_id, kFlushBufferId);
831 DVLOGF(3) << "reading input_id=kFlushBufferId"; 831 DVLOGF(3) << "reading input_id=kFlushBufferId";
832 } 832 }
(...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after
2639 StartResolutionChange(); 2639 StartResolutionChange();
2640 } 2640 }
2641 } 2641 }
2642 2642
2643 void V4L2VideoDecodeAccelerator::ImageProcessorError() { 2643 void V4L2VideoDecodeAccelerator::ImageProcessorError() {
2644 LOGF(ERROR) << "Image processor error"; 2644 LOGF(ERROR) << "Image processor error";
2645 NOTIFY_ERROR(PLATFORM_FAILURE); 2645 NOTIFY_ERROR(PLATFORM_FAILURE);
2646 } 2646 }
2647 2647
2648 } // namespace media 2648 } // 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