Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(729)

Side by Side Diff: content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc

Issue 2803023005: Switch base::Value typemapping to be by value instead of by unique_ptr.
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 out_frame->metadata()->SetTimeTicks(media::VideoFrameMetadata::REFERENCE_TIME, 154 out_frame->metadata()->SetTimeTicks(media::VideoFrameMetadata::REFERENCE_TIME,
155 reference_time); 155 reference_time);
156 156
157 media::mojom::VideoFrameInfoPtr out_frame_info = 157 media::mojom::VideoFrameInfoPtr out_frame_info =
158 media::mojom::VideoFrameInfo::New(); 158 media::mojom::VideoFrameInfo::New();
159 out_frame_info->timestamp = timestamp; 159 out_frame_info->timestamp = timestamp;
160 out_frame_info->pixel_format = media::PIXEL_FORMAT_I420; 160 out_frame_info->pixel_format = media::PIXEL_FORMAT_I420;
161 out_frame_info->storage_type = media::PIXEL_STORAGE_CPU; 161 out_frame_info->storage_type = media::PIXEL_STORAGE_CPU;
162 out_frame_info->coded_size = dimensions; 162 out_frame_info->coded_size = dimensions;
163 out_frame_info->visible_rect = gfx::Rect(dimensions); 163 out_frame_info->visible_rect = gfx::Rect(dimensions);
164 out_frame_info->metadata = out_frame->metadata()->CopyInternalValues(); 164 out_frame_info->metadata = out_frame->metadata()->GetInternalValues();
165 165
166 { 166 {
167 base::AutoLock lock(lock_); 167 base::AutoLock lock(lock_);
168 decode_done_closure_ = 168 decode_done_closure_ =
169 base::Bind(decode_done_cb_, out_buffer.id, out_buffer.frame_feedback_id, 169 base::Bind(decode_done_cb_, out_buffer.id, out_buffer.frame_feedback_id,
170 base::Passed(&out_buffer.access_permission), 170 base::Passed(&out_buffer.access_permission),
171 base::Passed(&out_frame_info)); 171 base::Passed(&out_frame_info));
172 } 172 }
173 decoder_->Decode(in_buffer, std::move(out_frame)); 173 decoder_->Decode(in_buffer, std::move(out_frame));
174 } 174 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 lock_.AssertAcquired(); 265 lock_.AssertAcquired();
266 return !decode_done_closure_.is_null(); 266 return !decode_done_closure_.is_null();
267 } 267 }
268 268
269 void VideoCaptureGpuJpegDecoder::RecordInitDecodeUMA_Locked() { 269 void VideoCaptureGpuJpegDecoder::RecordInitDecodeUMA_Locked() {
270 UMA_HISTOGRAM_BOOLEAN("Media.VideoCaptureGpuJpegDecoder.InitDecodeSuccess", 270 UMA_HISTOGRAM_BOOLEAN("Media.VideoCaptureGpuJpegDecoder.InitDecodeSuccess",
271 decoder_status_ == INIT_PASSED); 271 decoder_status_ == INIT_PASSED);
272 } 272 }
273 273
274 } // namespace content 274 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/video_capture_controller_unittest.cc ('k') | content/renderer/media/video_capture_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698