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

Side by Side Diff: content/renderer/media/video_capture_impl.cc

Issue 1265433003: Preliminary change for new rtc rendering algorithm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Inner class Created 5 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Notes about usage of this object by VideoCaptureImplManager. 5 // Notes about usage of this object by VideoCaptureImplManager.
6 // 6 //
7 // VideoCaptureImplManager access this object by using a Unretained() 7 // VideoCaptureImplManager access this object by using a Unretained()
8 // binding and tasks on the IO thread. It is then important that 8 // binding and tasks on the IO thread. It is then important that
9 // VideoCaptureImpl never post task to itself. All operations must be 9 // VideoCaptureImpl never post task to itself. All operations must be
10 // synchronous. 10 // synchronous.
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 release_sync_point_storage = new uint32(0); 277 release_sync_point_storage = new uint32(0);
278 frame = media::VideoFrame::WrapNativeTexture( 278 frame = media::VideoFrame::WrapNativeTexture(
279 pixel_format, 279 pixel_format,
280 mailbox_holder, 280 mailbox_holder,
281 base::Bind(&SaveReleaseSyncPoint, release_sync_point_storage), 281 base::Bind(&SaveReleaseSyncPoint, release_sync_point_storage),
282 coded_size, 282 coded_size,
283 gfx::Rect(coded_size), 283 gfx::Rect(coded_size),
284 coded_size, 284 coded_size,
285 timestamp - first_frame_timestamp_); 285 timestamp - first_frame_timestamp_);
286 } 286 }
287 frame->metadata()->SetTimeTicks(media::VideoFrameMetadata::REFERENCE_TIME,
288 timestamp);
287 frame->AddDestructionObserver( 289 frame->AddDestructionObserver(
288 base::Bind(&VideoCaptureImpl::DidFinishConsumingFrame, 290 base::Bind(&VideoCaptureImpl::DidFinishConsumingFrame,
289 frame->metadata(), 291 frame->metadata(),
290 release_sync_point_storage, 292 release_sync_point_storage,
291 media::BindToCurrentLoop(base::Bind( 293 media::BindToCurrentLoop(base::Bind(
292 &VideoCaptureImpl::OnClientBufferFinished, 294 &VideoCaptureImpl::OnClientBufferFinished,
293 weak_factory_.GetWeakPtr(), 295 weak_factory_.GetWeakPtr(),
294 buffer_id, 296 buffer_id,
295 buffer)))); 297 buffer))));
296 298
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 double consumer_resource_utilization = -1.0; 460 double consumer_resource_utilization = -1.0;
459 if (!metadata->GetDouble(media::VideoFrameMetadata::RESOURCE_UTILIZATION, 461 if (!metadata->GetDouble(media::VideoFrameMetadata::RESOURCE_UTILIZATION,
460 &consumer_resource_utilization)) { 462 &consumer_resource_utilization)) {
461 consumer_resource_utilization = -1.0; 463 consumer_resource_utilization = -1.0;
462 } 464 }
463 465
464 callback_to_io_thread.Run(release_sync_point, consumer_resource_utilization); 466 callback_to_io_thread.Run(release_sync_point, consumer_resource_utilization);
465 } 467 }
466 468
467 } // namespace content 469 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/webmediaplayer_ms.h » ('j') | content/renderer/media/webmediaplayer_ms.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698