| 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 <dlfcn.h> | 5 #include <dlfcn.h> |
| 6 #include <errno.h> | 6 #include <errno.h> |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <linux/videodev2.h> | 8 #include <linux/videodev2.h> |
| 9 #include <poll.h> | 9 #include <poll.h> |
| 10 #include <string.h> | 10 #include <string.h> |
| (...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1104 if (dqbuf.m.planes[0].bytesused == 0) { | 1104 if (dqbuf.m.planes[0].bytesused == 0) { |
| 1105 // This is an empty output buffer returned as part of a flush. | 1105 // This is an empty output buffer returned as part of a flush. |
| 1106 free_output_buffers_.push(dqbuf.index); | 1106 free_output_buffers_.push(dqbuf.index); |
| 1107 } else { | 1107 } else { |
| 1108 DCHECK_GE(dqbuf.timestamp.tv_sec, 0); | 1108 DCHECK_GE(dqbuf.timestamp.tv_sec, 0); |
| 1109 output_record.at_client = true; | 1109 output_record.at_client = true; |
| 1110 DVLOG(3) << "Dequeue(): returning input_id=" << dqbuf.timestamp.tv_sec | 1110 DVLOG(3) << "Dequeue(): returning input_id=" << dqbuf.timestamp.tv_sec |
| 1111 << " as picture_id=" << output_record.picture_id; | 1111 << " as picture_id=" << output_record.picture_id; |
| 1112 const media::Picture& picture = | 1112 const media::Picture& picture = |
| 1113 media::Picture(output_record.picture_id, dqbuf.timestamp.tv_sec, | 1113 media::Picture(output_record.picture_id, dqbuf.timestamp.tv_sec, |
| 1114 gfx::Rect(visible_size_), false); | 1114 gfx::Rect(visible_size_), false, false); |
| 1115 pending_picture_ready_.push( | 1115 pending_picture_ready_.push( |
| 1116 PictureRecord(output_record.cleared, picture)); | 1116 PictureRecord(output_record.cleared, picture)); |
| 1117 SendPictureReady(); | 1117 SendPictureReady(); |
| 1118 output_record.cleared = true; | 1118 output_record.cleared = true; |
| 1119 decoder_frames_at_client_++; | 1119 decoder_frames_at_client_++; |
| 1120 } | 1120 } |
| 1121 output_buffer_queued_count_--; | 1121 output_buffer_queued_count_--; |
| 1122 } | 1122 } |
| 1123 | 1123 |
| 1124 NotifyFlushDoneIfNeeded(); | 1124 NotifyFlushDoneIfNeeded(); |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2033 | 2033 |
| 2034 void V4L2VideoDecodeAccelerator::PictureCleared() { | 2034 void V4L2VideoDecodeAccelerator::PictureCleared() { |
| 2035 DVLOG(3) << "PictureCleared(). clearing count=" << picture_clearing_count_; | 2035 DVLOG(3) << "PictureCleared(). clearing count=" << picture_clearing_count_; |
| 2036 DCHECK_EQ(decoder_thread_.message_loop(), base::MessageLoop::current()); | 2036 DCHECK_EQ(decoder_thread_.message_loop(), base::MessageLoop::current()); |
| 2037 DCHECK_GT(picture_clearing_count_, 0); | 2037 DCHECK_GT(picture_clearing_count_, 0); |
| 2038 picture_clearing_count_--; | 2038 picture_clearing_count_--; |
| 2039 SendPictureReady(); | 2039 SendPictureReady(); |
| 2040 } | 2040 } |
| 2041 | 2041 |
| 2042 } // namespace content | 2042 } // namespace content |
| OLD | NEW |