Chromium Code Reviews| 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 <sys/eventfd.h> | 10 #include <sys/eventfd.h> |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 591 return; | 591 return; |
| 592 } | 592 } |
| 593 } | 593 } |
| 594 if (decoder_state_ == kError) { | 594 if (decoder_state_ == kError) { |
| 595 // Failed during decode. | 595 // Failed during decode. |
| 596 return; | 596 return; |
| 597 } | 597 } |
| 598 | 598 |
| 599 if (schedule_task) { | 599 if (schedule_task) { |
| 600 decoder_current_bitstream_buffer_->bytes_used += decoded_size; | 600 decoder_current_bitstream_buffer_->bytes_used += decoded_size; |
| 601 if (decoder_current_bitstream_buffer_->bytes_used == | 601 if ((size_t)decoder_current_bitstream_buffer_->bytes_used == |
|
Pawel Osciak
2014/12/26 01:11:36
Please not c-style casts.
Instead, please change b
henryhsu
2014/12/26 08:40:41
Done.
| |
| 602 decoder_current_bitstream_buffer_->size) { | 602 decoder_current_bitstream_buffer_->size) { |
| 603 // Our current bitstream buffer is done; return it. | 603 // Our current bitstream buffer is done; return it. |
| 604 int32 input_id = decoder_current_bitstream_buffer_->input_id; | 604 int32 input_id = decoder_current_bitstream_buffer_->input_id; |
| 605 DVLOG(3) << "DecodeBufferTask(): finished input_id=" << input_id; | 605 DVLOG(3) << "DecodeBufferTask(): finished input_id=" << input_id; |
| 606 // BitstreamBufferRef destructor calls NotifyEndOfBitstreamBuffer(). | 606 // BitstreamBufferRef destructor calls NotifyEndOfBitstreamBuffer(). |
| 607 decoder_current_bitstream_buffer_.reset(); | 607 decoder_current_bitstream_buffer_.reset(); |
| 608 } | 608 } |
| 609 ScheduleDecodeBufferTaskIfNeeded(); | 609 ScheduleDecodeBufferTaskIfNeeded(); |
| 610 } | 610 } |
| 611 } | 611 } |
| (...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1934 gfx::Size new_size(base::checked_cast<int>(format.fmt.pix_mp.width), | 1934 gfx::Size new_size(base::checked_cast<int>(format.fmt.pix_mp.width), |
| 1935 base::checked_cast<int>(format.fmt.pix_mp.height)); | 1935 base::checked_cast<int>(format.fmt.pix_mp.height)); |
| 1936 if (frame_buffer_size_ != new_size) { | 1936 if (frame_buffer_size_ != new_size) { |
| 1937 DVLOG(3) << "IsResolutionChangeNecessary(): Resolution change detected"; | 1937 DVLOG(3) << "IsResolutionChangeNecessary(): Resolution change detected"; |
| 1938 return true; | 1938 return true; |
| 1939 } | 1939 } |
| 1940 return false; | 1940 return false; |
| 1941 } | 1941 } |
| 1942 | 1942 |
| 1943 } // namespace content | 1943 } // namespace content |
| OLD | NEW |