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

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

Issue 2506363004: V4L2VDA: fix starting the device poll thread twice. (Closed)
Patch Set: Created 4 years, 1 month 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 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after
1765 void V4L2VideoDecodeAccelerator::ResetDoneTask() { 1765 void V4L2VideoDecodeAccelerator::ResetDoneTask() {
1766 DVLOGF(3); 1766 DVLOGF(3);
1767 DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); 1767 DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread());
1768 TRACE_EVENT0("Video Decoder", "V4L2VDA::ResetDoneTask"); 1768 TRACE_EVENT0("Video Decoder", "V4L2VDA::ResetDoneTask");
1769 1769
1770 if (decoder_state_ == kError) { 1770 if (decoder_state_ == kError) {
1771 DVLOGF(2) << "early out: kError state"; 1771 DVLOGF(2) << "early out: kError state";
1772 return; 1772 return;
1773 } 1773 }
1774 1774
1775 if (!StartDevicePoll()) 1775 // Start poll thread if NotifyFlushDoneIfNeeded has not already.
1776 return; 1776 if (!device_poll_thread_.IsRunning()) {
1777 if (!StartDevicePoll())
1778 return;
1779 }
1777 1780
1778 // Reset format-specific bits. 1781 // Reset format-specific bits.
1779 if (video_profile_ >= H264PROFILE_MIN && video_profile_ <= H264PROFILE_MAX) { 1782 if (video_profile_ >= H264PROFILE_MIN && video_profile_ <= H264PROFILE_MAX) {
1780 decoder_h264_parser_.reset(new H264Parser()); 1783 decoder_h264_parser_.reset(new H264Parser());
1781 } 1784 }
1782 1785
1783 // Jobs drained, we're finished resetting. 1786 // Jobs drained, we're finished resetting.
1784 DCHECK_EQ(decoder_state_, kResetting); 1787 DCHECK_EQ(decoder_state_, kResetting);
1785 decoder_state_ = kInitialized; 1788 decoder_state_ = kInitialized;
1786 1789
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
2624 StartResolutionChange(); 2627 StartResolutionChange();
2625 } 2628 }
2626 } 2629 }
2627 2630
2628 void V4L2VideoDecodeAccelerator::ImageProcessorError() { 2631 void V4L2VideoDecodeAccelerator::ImageProcessorError() {
2629 LOGF(ERROR) << "Image processor error"; 2632 LOGF(ERROR) << "Image processor error";
2630 NOTIFY_ERROR(PLATFORM_FAILURE); 2633 NOTIFY_ERROR(PLATFORM_FAILURE);
2631 } 2634 }
2632 2635
2633 } // namespace media 2636 } // 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