| 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 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |