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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 frame_format.frame_rate); | 145 frame_format.frame_rate); |
146 | 146 |
147 out_frame->metadata()->SetTimeTicks(media::VideoFrameMetadata::REFERENCE_TIME, | 147 out_frame->metadata()->SetTimeTicks(media::VideoFrameMetadata::REFERENCE_TIME, |
148 reference_time); | 148 reference_time); |
149 | 149 |
150 { | 150 { |
151 base::AutoLock lock(lock_); | 151 base::AutoLock lock(lock_); |
152 decode_done_closure_ = | 152 decode_done_closure_ = |
153 base::Bind(decode_done_cb_, base::Passed(&out_buffer), out_frame); | 153 base::Bind(decode_done_cb_, base::Passed(&out_buffer), out_frame); |
154 } | 154 } |
155 decoder_->Decode(in_buffer, out_frame); | 155 decoder_->Decode(in_buffer, std::move(out_frame)); |
156 #else | 156 #else |
157 NOTREACHED(); | 157 NOTREACHED(); |
158 #endif | 158 #endif |
159 } | 159 } |
160 | 160 |
161 void VideoCaptureGpuJpegDecoder::VideoFrameReady(int32_t bitstream_buffer_id) { | 161 void VideoCaptureGpuJpegDecoder::VideoFrameReady(int32_t bitstream_buffer_id) { |
162 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 162 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
163 TRACE_EVENT0("jpeg", "VideoCaptureGpuJpegDecoder::VideoFrameReady"); | 163 TRACE_EVENT0("jpeg", "VideoCaptureGpuJpegDecoder::VideoFrameReady"); |
164 base::AutoLock lock(lock_); | 164 base::AutoLock lock(lock_); |
165 | 165 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 lock_.AssertAcquired(); | 250 lock_.AssertAcquired(); |
251 return !decode_done_closure_.is_null(); | 251 return !decode_done_closure_.is_null(); |
252 } | 252 } |
253 | 253 |
254 void VideoCaptureGpuJpegDecoder::RecordInitDecodeUMA_Locked() { | 254 void VideoCaptureGpuJpegDecoder::RecordInitDecodeUMA_Locked() { |
255 UMA_HISTOGRAM_BOOLEAN("Media.VideoCaptureGpuJpegDecoder.InitDecodeSuccess", | 255 UMA_HISTOGRAM_BOOLEAN("Media.VideoCaptureGpuJpegDecoder.InitDecodeSuccess", |
256 decoder_status_ == INIT_PASSED); | 256 decoder_status_ == INIT_PASSED); |
257 } | 257 } |
258 | 258 |
259 } // namespace content | 259 } // namespace content |
OLD | NEW |