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 <errno.h> | 5 #include <errno.h> |
6 #include <fcntl.h> | 6 #include <fcntl.h> |
7 #include <linux/videodev2.h> | 7 #include <linux/videodev2.h> |
8 #include <poll.h> | 8 #include <poll.h> |
9 #include <string.h> | 9 #include <string.h> |
10 #include <sys/eventfd.h> | 10 #include <sys/eventfd.h> |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
554 running_jobs_.pop(); | 554 running_jobs_.pop(); |
555 | 555 |
556 scoped_refptr<media::VideoFrame> output_frame = | 556 scoped_refptr<media::VideoFrame> output_frame = |
557 media::VideoFrame::WrapExternalDmabufs( | 557 media::VideoFrame::WrapExternalDmabufs( |
558 output_format_, | 558 output_format_, |
559 output_allocated_size_, | 559 output_allocated_size_, |
560 gfx::Rect(output_visible_size_), | 560 gfx::Rect(output_visible_size_), |
561 output_visible_size_, | 561 output_visible_size_, |
562 output_record.fds, | 562 output_record.fds, |
563 job_record->frame->timestamp()); | 563 job_record->frame->timestamp()); |
564 if (!output_frame) | |
565 continue; | |
Pawel Osciak
2016/01/13 07:53:25
We should NOTIFY_ERROR from here instead. Otherwis
emircan
2016/01/14 23:13:53
Changing to NOTIFY_ERROR and return. The logs woul
| |
564 output_frame->AddDestructionObserver(media::BindToCurrentLoop( | 566 output_frame->AddDestructionObserver(media::BindToCurrentLoop( |
565 base::Bind(&V4L2ImageProcessor::ReuseOutputBuffer, | 567 base::Bind(&V4L2ImageProcessor::ReuseOutputBuffer, |
566 device_weak_factory_.GetWeakPtr(), | 568 device_weak_factory_.GetWeakPtr(), |
567 dqbuf.index))); | 569 dqbuf.index))); |
568 | 570 |
569 DVLOG(3) << "Processing finished, returning frame, ts=" | 571 DVLOG(3) << "Processing finished, returning frame, ts=" |
570 << output_frame->timestamp().InMilliseconds(); | 572 << output_frame->timestamp().InMilliseconds(); |
571 | 573 |
572 child_task_runner_->PostTask( | 574 child_task_runner_->PostTask( |
573 FROM_HERE, base::Bind(job_record->ready_cb, output_frame)); | 575 FROM_HERE, base::Bind(job_record->ready_cb, output_frame)); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
718 output_record.at_device = false; | 720 output_record.at_device = false; |
719 if (!output_record.at_client) | 721 if (!output_record.at_client) |
720 free_output_buffers_.push_back(i); | 722 free_output_buffers_.push_back(i); |
721 } | 723 } |
722 output_buffer_queued_count_ = 0; | 724 output_buffer_queued_count_ = 0; |
723 | 725 |
724 return true; | 726 return true; |
725 } | 727 } |
726 | 728 |
727 } // namespace content | 729 } // namespace content |
OLD | NEW |