| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.h" | 5 #include "content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 return; | 61 return; |
| 62 } | 62 } |
| 63 | 63 |
| 64 const scoped_refptr<base::SingleThreadTaskRunner> current_task_runner( | 64 const scoped_refptr<base::SingleThreadTaskRunner> current_task_runner( |
| 65 base::ThreadTaskRunnerHandle::Get()); | 65 base::ThreadTaskRunnerHandle::Get()); |
| 66 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 66 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
| 67 base::Bind(&EstablishGpuChannelOnUIThread, | 67 base::Bind(&EstablishGpuChannelOnUIThread, |
| 68 current_task_runner, AsWeakPtr())); | 68 current_task_runner, AsWeakPtr())); |
| 69 } | 69 } |
| 70 | 70 |
| 71 VideoCaptureGpuJpegDecoder::STATUS VideoCaptureGpuJpegDecoder::GetStatus() | 71 VideoCaptureGpuJpegDecoder::STATUS VideoCaptureGpuJpegDecoder::GetStatus() { |
| 72 const { | |
| 73 DCHECK(CalledOnValidThread()); | 72 DCHECK(CalledOnValidThread()); |
| 74 base::AutoLock lock(lock_); | 73 base::AutoLock lock(lock_); |
| 75 return decoder_status_; | 74 return decoder_status_; |
| 76 } | 75 } |
| 77 | 76 |
| 78 void VideoCaptureGpuJpegDecoder::DecodeCapturedData( | 77 void VideoCaptureGpuJpegDecoder::DecodeCapturedData( |
| 79 const uint8_t* data, | 78 const uint8_t* data, |
| 80 size_t in_buffer_size, | 79 size_t in_buffer_size, |
| 81 const media::VideoCaptureFormat& frame_format, | 80 const media::VideoCaptureFormat& frame_format, |
| 82 base::TimeTicks reference_time, | 81 base::TimeTicks reference_time, |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 lock_.AssertAcquired(); | 249 lock_.AssertAcquired(); |
| 251 return !decode_done_closure_.is_null(); | 250 return !decode_done_closure_.is_null(); |
| 252 } | 251 } |
| 253 | 252 |
| 254 void VideoCaptureGpuJpegDecoder::RecordInitDecodeUMA_Locked() { | 253 void VideoCaptureGpuJpegDecoder::RecordInitDecodeUMA_Locked() { |
| 255 UMA_HISTOGRAM_BOOLEAN("Media.VideoCaptureGpuJpegDecoder.InitDecodeSuccess", | 254 UMA_HISTOGRAM_BOOLEAN("Media.VideoCaptureGpuJpegDecoder.InitDecodeSuccess", |
| 256 decoder_status_ == INIT_PASSED); | 255 decoder_status_ == INIT_PASSED); |
| 257 } | 256 } |
| 258 | 257 |
| 259 } // namespace content | 258 } // namespace content |
| OLD | NEW |