Chromium Code Reviews| Index: media/gpu/v4l2_video_decode_accelerator.cc |
| diff --git a/media/gpu/v4l2_video_decode_accelerator.cc b/media/gpu/v4l2_video_decode_accelerator.cc |
| index 50203b231ad62427a617cd6ab69e2e115d15e49c..53b2dff4b59bea02f684c82fa1e5947327a7e4af 100644 |
| --- a/media/gpu/v4l2_video_decode_accelerator.cc |
| +++ b/media/gpu/v4l2_video_decode_accelerator.cc |
| @@ -200,7 +200,7 @@ V4L2VideoDecodeAccelerator::~V4L2VideoDecodeAccelerator() { |
| bool V4L2VideoDecodeAccelerator::Initialize(const Config& config, |
| Client* client) { |
| - DVLOGF(3) << "profile: " << config.profile |
| + DVLOGF(2) << "profile: " << config.profile |
| << ", output_mode=" << static_cast<int>(config.output_mode); |
| DCHECK(child_task_runner_->BelongsToCurrentThread()); |
| DCHECK_EQ(decoder_state_, kUninitialized); |
| @@ -295,7 +295,7 @@ bool V4L2VideoDecodeAccelerator::Initialize(const Config& config, |
| } |
| void V4L2VideoDecodeAccelerator::InitializeTask() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| DCHECK_EQ(decoder_state_, kInitialized); |
| @@ -318,7 +318,7 @@ void V4L2VideoDecodeAccelerator::InitializeTask() { |
| void V4L2VideoDecodeAccelerator::Decode( |
| const BitstreamBuffer& bitstream_buffer) { |
| - DVLOGF(1) << "input_id=" << bitstream_buffer.id() |
| + DVLOGF(4) << "input_id=" << bitstream_buffer.id() |
| << ", size=" << bitstream_buffer.size(); |
| DCHECK(decode_task_runner_->BelongsToCurrentThread()); |
| @@ -338,7 +338,7 @@ void V4L2VideoDecodeAccelerator::Decode( |
| void V4L2VideoDecodeAccelerator::AssignPictureBuffers( |
| const std::vector<PictureBuffer>& buffers) { |
| - DVLOGF(3) << "buffer_count=" << buffers.size(); |
| + DVLOGF(2) << "buffer_count=" << buffers.size(); |
| DCHECK(child_task_runner_->BelongsToCurrentThread()); |
| decoder_thread_.task_runner()->PostTask( |
| @@ -349,7 +349,7 @@ void V4L2VideoDecodeAccelerator::AssignPictureBuffers( |
| void V4L2VideoDecodeAccelerator::AssignPictureBuffersTask( |
| const std::vector<PictureBuffer>& buffers) { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| DCHECK_EQ(decoder_state_, kAwaitingPictureBuffers); |
| @@ -617,7 +617,7 @@ void V4L2VideoDecodeAccelerator::ImportBufferForPictureTask( |
| if (!CreateImageProcessor()) |
| return; |
| DCHECK_EQ(kAwaitingPictureBuffers, decoder_state_); |
| - DVLOGF(1) << "Change state to kDecoding"; |
| + DVLOGF(2) << "Change state to kDecoding"; |
| decoder_state_ = kDecoding; |
| if (reset_pending_) { |
| FinishReset(); |
| @@ -658,7 +658,7 @@ void V4L2VideoDecodeAccelerator::ImportBufferForPictureTask( |
| } |
| void V4L2VideoDecodeAccelerator::ReusePictureBuffer(int32_t picture_buffer_id) { |
| - DVLOGF(3) << "picture_buffer_id=" << picture_buffer_id; |
| + DVLOGF(4) << "picture_buffer_id=" << picture_buffer_id; |
| // Must be run on child thread, as we'll insert a sync in the EGL context. |
| DCHECK(child_task_runner_->BelongsToCurrentThread()); |
| @@ -692,7 +692,7 @@ void V4L2VideoDecodeAccelerator::ReusePictureBuffer(int32_t picture_buffer_id) { |
| } |
| void V4L2VideoDecodeAccelerator::Flush() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| DCHECK(child_task_runner_->BelongsToCurrentThread()); |
| decoder_thread_.task_runner()->PostTask( |
| FROM_HERE, base::Bind(&V4L2VideoDecodeAccelerator::FlushTask, |
| @@ -700,7 +700,7 @@ void V4L2VideoDecodeAccelerator::Flush() { |
| } |
| void V4L2VideoDecodeAccelerator::Reset() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| DCHECK(child_task_runner_->BelongsToCurrentThread()); |
| decoder_thread_.task_runner()->PostTask( |
| FROM_HERE, base::Bind(&V4L2VideoDecodeAccelerator::ResetTask, |
| @@ -708,7 +708,7 @@ void V4L2VideoDecodeAccelerator::Reset() { |
| } |
| void V4L2VideoDecodeAccelerator::Destroy() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| DCHECK(child_task_runner_->BelongsToCurrentThread()); |
| // We're destroying; cancel all callbacks. |
| @@ -752,7 +752,7 @@ V4L2VideoDecodeAccelerator::GetSupportedProfiles() { |
| void V4L2VideoDecodeAccelerator::DecodeTask( |
| const BitstreamBuffer& bitstream_buffer) { |
| - DVLOGF(3) << "input_id=" << bitstream_buffer.id(); |
| + DVLOGF(4) << "input_id=" << bitstream_buffer.id(); |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| DCHECK_NE(decoder_state_, kUninitialized); |
| TRACE_EVENT1("Video Decoder", "V4L2VDA::DecodeTask", "input_id", |
| @@ -773,7 +773,7 @@ void V4L2VideoDecodeAccelerator::DecodeTask( |
| NOTIFY_ERROR(UNREADABLE_INPUT); |
| return; |
| } |
| - DVLOGF(3) << "mapped at=" << bitstream_record->shm->memory(); |
| + DVLOGF(4) << "mapped at=" << bitstream_record->shm->memory(); |
| if (decoder_state_ == kResetting || decoder_flushing_) { |
| // In the case that we're resetting or flushing, we need to delay decoding |
| @@ -795,7 +795,7 @@ void V4L2VideoDecodeAccelerator::DecodeTask( |
| } |
| void V4L2VideoDecodeAccelerator::DecodeBufferTask() { |
| - DVLOGF(3); |
| + DVLOGF(4); |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| DCHECK_NE(decoder_state_, kUninitialized); |
| TRACE_EVENT0("Video Decoder", "V4L2VDA::DecodeBufferTask"); |
| @@ -823,12 +823,12 @@ void V4L2VideoDecodeAccelerator::DecodeBufferTask() { |
| decoder_input_queue_.pop(); |
| const auto& shm = decoder_current_bitstream_buffer_->shm; |
| if (shm) { |
| - DVLOGF(3) << "reading input_id=" |
| + DVLOGF(4) << "reading input_id=" |
| << decoder_current_bitstream_buffer_->input_id |
| << ", addr=" << shm->memory() << ", size=" << shm->size(); |
| } else { |
| DCHECK_EQ(decoder_current_bitstream_buffer_->input_id, kFlushBufferId); |
| - DVLOGF(3) << "reading input_id=kFlushBufferId"; |
| + DVLOGF(4) << "reading input_id=kFlushBufferId"; |
| } |
| } |
| bool schedule_task = false; |
| @@ -897,7 +897,7 @@ void V4L2VideoDecodeAccelerator::DecodeBufferTask() { |
| decoder_current_bitstream_buffer_->bytes_used) { |
| // Our current bitstream buffer is done; return it. |
| int32_t input_id = decoder_current_bitstream_buffer_->input_id; |
| - DVLOGF(3) << "finished input_id=" << input_id; |
| + DVLOGF(4) << "finished input_id=" << input_id; |
| // BitstreamBufferRef destructor calls NotifyEndOfBitstreamBuffer(). |
| decoder_current_bitstream_buffer_.reset(); |
| } |
| @@ -1009,7 +1009,7 @@ void V4L2VideoDecodeAccelerator::ScheduleDecodeBufferTaskIfNeeded() { |
| bool V4L2VideoDecodeAccelerator::DecodeBufferInitial(const void* data, |
| size_t size, |
| size_t* endpos) { |
| - DVLOGF(3) << "data=" << data << ", size=" << size; |
| + DVLOGF(4) << "data=" << data << ", size=" << size; |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| DCHECK_EQ(decoder_state_, kInitialized); |
| // Initial decode. We haven't been able to get output stream format info yet. |
| @@ -1045,7 +1045,7 @@ bool V4L2VideoDecodeAccelerator::DecodeBufferInitial(const void* data, |
| // Run this initialization only on first startup. |
| if (output_buffer_map_.empty()) { |
| - DVLOGF(3) << "running initialization"; |
| + DVLOGF(4) << "running initialization"; |
| // Success! Setup our parameters. |
| if (!CreateBuffersForFormat(format, visible_size)) |
| return false; |
| @@ -1060,7 +1060,7 @@ bool V4L2VideoDecodeAccelerator::DecodeBufferInitial(const void* data, |
| bool V4L2VideoDecodeAccelerator::DecodeBufferContinue(const void* data, |
| size_t size) { |
| - DVLOGF(3) << "data=" << data << ", size=" << size; |
| + DVLOGF(4) << "data=" << data << ", size=" << size; |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| DCHECK_EQ(decoder_state_, kDecoding); |
| @@ -1136,7 +1136,7 @@ bool V4L2VideoDecodeAccelerator::AppendToInputFrame(const void* data, |
| } |
| bool V4L2VideoDecodeAccelerator::FlushInputFrame() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
|
Pawel Osciak
2017/05/23 09:49:22
I think this is actually a part of each frame task
Owen Lin
2017/06/02 08:51:44
Ah, Right. I was confused with Flush. It is not ab
|
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| DCHECK_NE(decoder_state_, kUninitialized); |
| DCHECK_NE(decoder_state_, kResetting); |
| @@ -1164,7 +1164,7 @@ bool V4L2VideoDecodeAccelerator::FlushInputFrame() { |
| // Queue it. |
| input_ready_queue_.push(decoder_current_input_buffer_); |
| decoder_current_input_buffer_ = -1; |
| - DVLOGF(3) << "submitting input_id=" << input_record.input_id; |
| + DVLOGF(2) << "submitting input_id=" << input_record.input_id; |
|
Pawel Osciak
2017/05/23 09:49:21
Ditto.
Owen Lin
2017/06/02 08:51:43
Done.
|
| // Enqueue once since there's new available input for it. |
| Enqueue(); |
| @@ -1178,13 +1178,13 @@ void V4L2VideoDecodeAccelerator::ServiceDeviceTask(bool event_pending) { |
| TRACE_EVENT0("Video Decoder", "V4L2VDA::ServiceDeviceTask"); |
| if (decoder_state_ == kResetting) { |
| - DVLOGF(2) << "early out: kResetting state"; |
| + DVLOGF(3) << "early out: kResetting state"; |
| return; |
| } else if (decoder_state_ == kError) { |
| - DVLOGF(2) << "early out: kError state"; |
| + DVLOGF(3) << "early out: kError state"; |
| return; |
| } else if (decoder_state_ == kChangingResolution) { |
| - DVLOGF(2) << "early out: kChangingResolution state"; |
| + DVLOGF(3) << "early out: kChangingResolution state"; |
| return; |
| } |
| @@ -1218,17 +1218,14 @@ void V4L2VideoDecodeAccelerator::ServiceDeviceTask(bool event_pending) { |
| FROM_HERE, base::Bind(&V4L2VideoDecodeAccelerator::DevicePollTask, |
| base::Unretained(this), poll_device)); |
| - DVLOG(1) << "ServiceDeviceTask(): buffer counts: DEC[" |
| - << decoder_input_queue_.size() << "->" |
| - << input_ready_queue_.size() << "] => DEVICE[" |
| - << free_input_buffers_.size() << "+" |
| - << input_buffer_queued_count_ << "/" |
| - << input_buffer_map_.size() << "->" |
| - << free_output_buffers_.size() << "+" |
| - << output_buffer_queued_count_ << "/" |
| - << output_buffer_map_.size() << "] => PROCESSOR[" |
| - << image_processor_bitstream_buffer_ids_.size() << "] => CLIENT[" |
| - << decoder_frames_at_client_ << "]"; |
| + DVLOG(3) << "ServiceDeviceTask(): buffer counts: DEC[" |
|
Pawel Osciak
2017/05/23 09:49:21
This is per frame, but actually quite useful at 3
Owen Lin
2017/06/02 08:51:43
Done.
|
| + << decoder_input_queue_.size() << "->" << input_ready_queue_.size() |
|
Pawel Osciak
2017/05/23 09:49:21
Could we keep the original formatting please, I fe
Owen Lin
2017/06/02 08:51:43
OK. But it is the result of "git cl format", we wi
Pawel Osciak
2017/06/08 03:57:11
Yes, unfortunately.
|
| + << "] => DEVICE[" << free_input_buffers_.size() << "+" |
| + << input_buffer_queued_count_ << "/" << input_buffer_map_.size() |
| + << "->" << free_output_buffers_.size() << "+" |
| + << output_buffer_queued_count_ << "/" << output_buffer_map_.size() |
| + << "] => PROCESSOR[" << image_processor_bitstream_buffer_ids_.size() |
| + << "] => CLIENT[" << decoder_frames_at_client_ << "]"; |
| ScheduleDecodeBufferTaskIfNeeded(); |
| if (resolution_change_pending) |
| @@ -1521,7 +1518,7 @@ bool V4L2VideoDecodeAccelerator::EnqueueOutputRecord() { |
| qbuf.memory = V4L2_MEMORY_MMAP; |
| qbuf.m.planes = qbuf_planes.get(); |
| qbuf.length = output_planes_count_; |
| - DVLOGF(2) << "qbuf.index=" << qbuf.index; |
| + DVLOGF(3) << "qbuf.index=" << qbuf.index; |
|
Pawel Osciak
2017/05/23 09:49:21
Perhaps 4?
Owen Lin
2017/06/02 08:51:43
Done.
|
| IOCTL_OR_ERROR_RETURN_FALSE(VIDIOC_QBUF, &qbuf); |
| free_output_buffers_.pop_front(); |
| output_record.state = kAtDevice; |
| @@ -1532,18 +1529,18 @@ bool V4L2VideoDecodeAccelerator::EnqueueOutputRecord() { |
| void V4L2VideoDecodeAccelerator::ReusePictureBufferTask( |
| int32_t picture_buffer_id, |
| std::unique_ptr<EGLSyncKHRRef> egl_sync_ref) { |
| - DVLOGF(3) << "picture_buffer_id=" << picture_buffer_id; |
| + DVLOGF(4) << "picture_buffer_id=" << picture_buffer_id; |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| TRACE_EVENT0("Video Decoder", "V4L2VDA::ReusePictureBufferTask"); |
| // We run ReusePictureBufferTask even if we're in kResetting. |
| if (decoder_state_ == kError) { |
| - DVLOGF(2) << "early out: kError state"; |
| + DVLOGF(4) << "early out: kError state"; |
| return; |
| } |
| if (decoder_state_ == kChangingResolution) { |
| - DVLOGF(2) << "early out: kChangingResolution"; |
| + DVLOGF(4) << "early out: kChangingResolution"; |
| return; |
| } |
| @@ -1584,14 +1581,14 @@ void V4L2VideoDecodeAccelerator::ReusePictureBufferTask( |
| } |
| void V4L2VideoDecodeAccelerator::FlushTask() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| TRACE_EVENT0("Video Decoder", "V4L2VDA::FlushTask"); |
| // Flush outstanding buffers. |
| if (decoder_state_ == kInitialized) { |
| // There's nothing in the pipe, so return done immediately. |
| - DVLOGF(3) << "returning flush"; |
| + DVLOGF(2) << "returning flush"; |
| child_task_runner_->PostTask(FROM_HERE, |
| base::Bind(&Client::NotifyFlushDone, client_)); |
| return; |
| @@ -1665,7 +1662,7 @@ void V4L2VideoDecodeAccelerator::NotifyFlushDoneIfNeeded() { |
| decoder_delay_bitstream_buffer_id_ = -1; |
| decoder_flushing_ = false; |
| - DVLOGF(3) << "returning flush"; |
| + DVLOGF(2) << "returning flush"; |
| child_task_runner_->PostTask(FROM_HERE, |
| base::Bind(&Client::NotifyFlushDone, client_)); |
| @@ -1681,7 +1678,7 @@ bool V4L2VideoDecodeAccelerator::IsDecoderCmdSupported() { |
| memset(&cmd, 0, sizeof(cmd)); |
| cmd.cmd = V4L2_DEC_CMD_STOP; |
| if (device_->Ioctl(VIDIOC_TRY_DECODER_CMD, &cmd) != 0) { |
| - DVLOGF(3) "V4L2_DEC_CMD_STOP is not supported."; |
| + DVLOGF(2) "V4L2_DEC_CMD_STOP is not supported."; |
| return false; |
| } |
| @@ -1703,7 +1700,7 @@ bool V4L2VideoDecodeAccelerator::SendDecoderCmdStop() { |
| } |
| void V4L2VideoDecodeAccelerator::ResetTask() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| TRACE_EVENT0("Video Decoder", "V4L2VDA::ResetTask"); |
| @@ -1732,7 +1729,7 @@ void V4L2VideoDecodeAccelerator::ResetTask() { |
| } |
| void V4L2VideoDecodeAccelerator::FinishReset() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| reset_pending_ = false; |
| @@ -1774,7 +1771,7 @@ void V4L2VideoDecodeAccelerator::FinishReset() { |
| } |
| void V4L2VideoDecodeAccelerator::ResetDoneTask() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| TRACE_EVENT0("Video Decoder", "V4L2VDA::ResetDoneTask"); |
| @@ -1808,7 +1805,7 @@ void V4L2VideoDecodeAccelerator::ResetDoneTask() { |
| } |
| void V4L2VideoDecodeAccelerator::DestroyTask() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| TRACE_EVENT0("Video Decoder", "V4L2VDA::DestroyTask"); |
| // DestroyTask() should run regardless of decoder_state_. |
| @@ -1879,7 +1876,7 @@ bool V4L2VideoDecodeAccelerator::StopDevicePoll() { |
| } |
| bool V4L2VideoDecodeAccelerator::StopOutputStream() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| if (!output_streamon_) |
| return true; |
| @@ -1906,7 +1903,7 @@ bool V4L2VideoDecodeAccelerator::StopOutputStream() { |
| } |
| bool V4L2VideoDecodeAccelerator::StopInputStream() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| if (!input_streamon_) |
| return true; |
| @@ -1934,7 +1931,7 @@ void V4L2VideoDecodeAccelerator::StartResolutionChange() { |
| DCHECK_NE(decoder_state_, kUninitialized); |
| DCHECK_NE(decoder_state_, kResetting); |
| - DVLOGF(3) << "Initiate resolution change"; |
| + DVLOGF(2) << "Initiate resolution change"; |
| if (!(StopDevicePoll() && StopOutputStream())) |
| return; |
| @@ -1943,7 +1940,7 @@ void V4L2VideoDecodeAccelerator::StartResolutionChange() { |
| SendPictureReady(); // Send all pending PictureReady. |
| if (!image_processor_bitstream_buffer_ids_.empty()) { |
| - DVLOGF(3) << "Wait image processor to finish before destroying buffers."; |
| + DVLOGF(2) << "Wait image processor to finish before destroying buffers."; |
| return; |
| } |
| @@ -1962,7 +1959,7 @@ void V4L2VideoDecodeAccelerator::StartResolutionChange() { |
| void V4L2VideoDecodeAccelerator::FinishResolutionChange() { |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| DCHECK_EQ(decoder_state_, kChangingResolution); |
| - DVLOGF(3); |
| + DVLOGF(2); |
| if (decoder_state_ == kError) { |
| DVLOGF(2) << "early out: kError state"; |
| @@ -2096,7 +2093,7 @@ bool V4L2VideoDecodeAccelerator::CreateBuffersForFormat( |
| egl_image_size_ = coded_size_; |
| egl_image_planes_count_ = output_planes_count_; |
| } |
| - DVLOGF(3) << "new resolution: " << coded_size_.ToString() |
| + DVLOGF(2) << "new resolution: " << coded_size_.ToString() |
| << ", visible size: " << visible_size_.ToString() |
| << ", decoder output planes count: " << output_planes_count_ |
| << ", EGLImage size: " << egl_image_size_.ToString() |
| @@ -2120,7 +2117,7 @@ gfx::Size V4L2VideoDecodeAccelerator::GetVisibleSize( |
| gfx::Rect rect(crop_arg.c.left, crop_arg.c.top, crop_arg.c.width, |
| crop_arg.c.height); |
| - DVLOGF(3) << "visible rectangle is " << rect.ToString(); |
| + DVLOGF(2) << "visible rectangle is " << rect.ToString(); |
| if (!gfx::Rect(coded_size).Contains(rect)) { |
| DLOGF(ERROR) << "visible rectangle " << rect.ToString() |
| << " is not inside coded size " << coded_size.ToString(); |
| @@ -2142,7 +2139,7 @@ gfx::Size V4L2VideoDecodeAccelerator::GetVisibleSize( |
| } |
| bool V4L2VideoDecodeAccelerator::CreateInputBuffers() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| // We always run this as we prepare to initialize. |
| DCHECK_EQ(decoder_state_, kInitialized); |
| @@ -2296,7 +2293,7 @@ uint32_t V4L2VideoDecodeAccelerator::FindImageProcessorInputFormat() { |
| if (std::find(processor_input_formats.begin(), |
| processor_input_formats.end(), |
| fmtdesc.pixelformat) != processor_input_formats.end()) { |
| - DVLOGF(1) << "Image processor input format=" << fmtdesc.description; |
| + DVLOGF(2) << "Image processor input format=" << fmtdesc.description; |
| return fmtdesc.pixelformat; |
| } |
| ++fmtdesc.index; |
| @@ -2327,7 +2324,7 @@ uint32_t V4L2VideoDecodeAccelerator::FindImageProcessorOutputFormat() { |
| for (uint32_t processor_output_format : processor_output_formats) { |
| if (device_->CanCreateEGLImageFrom(processor_output_format)) { |
| - DVLOGF(1) << "Image processor output format=" << processor_output_format; |
| + DVLOGF(2) << "Image processor output format=" << processor_output_format; |
| return processor_output_format; |
| } |
| } |
| @@ -2336,7 +2333,7 @@ uint32_t V4L2VideoDecodeAccelerator::FindImageProcessorOutputFormat() { |
| } |
| bool V4L2VideoDecodeAccelerator::ResetImageProcessor() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| if (!image_processor_->Reset()) |
| @@ -2355,7 +2352,7 @@ bool V4L2VideoDecodeAccelerator::ResetImageProcessor() { |
| } |
| bool V4L2VideoDecodeAccelerator::CreateImageProcessor() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| DCHECK(!image_processor_); |
| image_processor_.reset(new V4L2ImageProcessor(image_processor_device_)); |
| v4l2_memory output_memory_type = |
| @@ -2374,7 +2371,7 @@ bool V4L2VideoDecodeAccelerator::CreateImageProcessor() { |
| NOTIFY_ERROR(PLATFORM_FAILURE); |
| return false; |
| } |
| - DVLOGF(3) << "image_processor_->output_allocated_size()=" |
| + DVLOGF(2) << "image_processor_->output_allocated_size()=" |
| << image_processor_->output_allocated_size().ToString(); |
| DCHECK(image_processor_->output_allocated_size() == egl_image_size_); |
| if (image_processor_->input_allocated_size() != coded_size_) { |
| @@ -2390,7 +2387,7 @@ bool V4L2VideoDecodeAccelerator::CreateImageProcessor() { |
| bool V4L2VideoDecodeAccelerator::ProcessFrame(int32_t bitstream_buffer_id, |
| int output_buffer_index) { |
| - DVLOGF(3); |
| + DVLOGF(4); |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| OutputRecord& output_record = output_buffer_map_[output_buffer_index]; |
| @@ -2427,7 +2424,7 @@ bool V4L2VideoDecodeAccelerator::ProcessFrame(int32_t bitstream_buffer_id, |
| } |
| bool V4L2VideoDecodeAccelerator::CreateOutputBuffers() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| DCHECK(decoder_state_ == kInitialized || |
| decoder_state_ == kChangingResolution); |
| DCHECK(!output_streamon_); |
| @@ -2475,7 +2472,7 @@ bool V4L2VideoDecodeAccelerator::CreateOutputBuffers() { |
| } |
| void V4L2VideoDecodeAccelerator::DestroyInputBuffers() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| DCHECK(!decoder_thread_.IsRunning() || |
| decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| DCHECK(!input_streamon_); |
| @@ -2502,7 +2499,7 @@ void V4L2VideoDecodeAccelerator::DestroyInputBuffers() { |
| } |
| bool V4L2VideoDecodeAccelerator::DestroyOutputBuffers() { |
| - DVLOGF(3); |
| + DVLOGF(2); |
| DCHECK(!decoder_thread_.IsRunning() || |
| decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| DCHECK(!output_streamon_); |
| @@ -2557,7 +2554,7 @@ bool V4L2VideoDecodeAccelerator::DestroyOutputBuffers() { |
| } |
| void V4L2VideoDecodeAccelerator::SendPictureReady() { |
| - DVLOGF(3); |
| + DVLOGF(4); |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| bool send_now = (decoder_state_ == kChangingResolution || |
| decoder_state_ == kResetting || decoder_flushing_); |
| @@ -2573,7 +2570,7 @@ void V4L2VideoDecodeAccelerator::SendPictureReady() { |
| base::Bind(&Client::PictureReady, decode_client_, picture)); |
| pending_picture_ready_.pop(); |
| } else if (!cleared || send_now) { |
| - DVLOGF(3) << "cleared=" << pending_picture_ready_.front().cleared |
| + DVLOGF(4) << "cleared=" << pending_picture_ready_.front().cleared |
| << ", decoder_state_=" << decoder_state_ |
| << ", decoder_flushing_=" << decoder_flushing_ |
| << ", picture_clearing_count_=" << picture_clearing_count_; |
| @@ -2600,7 +2597,7 @@ void V4L2VideoDecodeAccelerator::SendPictureReady() { |
| } |
| void V4L2VideoDecodeAccelerator::PictureCleared() { |
| - DVLOGF(3) << "clearing count=" << picture_clearing_count_; |
| + DVLOGF(4) << "clearing count=" << picture_clearing_count_; |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| DCHECK_GT(picture_clearing_count_, 0); |
| picture_clearing_count_--; |
| @@ -2609,7 +2606,7 @@ void V4L2VideoDecodeAccelerator::PictureCleared() { |
| void V4L2VideoDecodeAccelerator::FrameProcessed(int32_t bitstream_buffer_id, |
| int output_buffer_index) { |
| - DVLOGF(3) << "output_buffer_index=" << output_buffer_index |
| + DVLOGF(4) << "output_buffer_index=" << output_buffer_index |
| << ", bitstream_buffer_id=" << bitstream_buffer_id; |
| DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); |
| DCHECK(!image_processor_bitstream_buffer_ids_.empty()); |
| @@ -2618,7 +2615,7 @@ void V4L2VideoDecodeAccelerator::FrameProcessed(int32_t bitstream_buffer_id, |
| DCHECK_LT(output_buffer_index, static_cast<int>(output_buffer_map_.size())); |
| OutputRecord& output_record = output_buffer_map_[output_buffer_index]; |
| - DVLOGF(3) << "picture_id=" << output_record.picture_id; |
| + DVLOGF(4) << "picture_id=" << output_record.picture_id; |
| DCHECK_EQ(output_record.state, kAtProcessor); |
| DCHECK_NE(output_record.picture_id, -1); |