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

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

Issue 1429213002: Converted video frame and image callbacks to use new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed typo Created 5 years, 1 month 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 94
95 private: 95 private:
96 friend class base::RefCountedThreadSafe<ClientBuffer2>; 96 friend class base::RefCountedThreadSafe<ClientBuffer2>;
97 97
98 virtual ~ClientBuffer2() { 98 virtual ~ClientBuffer2() {
99 for (auto& buffer : buffers_) 99 for (auto& buffer : buffers_)
100 buffer->Unmap(); 100 buffer->Unmap();
101 } 101 }
102 102
103 void DestroyGpuMemoryBuffer(uint32 sync_point) {} 103 void DestroyGpuMemoryBuffer(const gpu::SyncToken& sync_token) {}
104 104
105 const std::vector<gfx::GpuMemoryBufferHandle> handles_; 105 const std::vector<gfx::GpuMemoryBufferHandle> handles_;
106 const gfx::Size size_; 106 const gfx::Size size_;
107 ScopedVector<gfx::GpuMemoryBuffer> buffers_; 107 ScopedVector<gfx::GpuMemoryBuffer> buffers_;
108 uint8* data_[media::VideoFrame::kMaxPlanes]; 108 uint8* data_[media::VideoFrame::kMaxPlanes];
109 int32 strides_[media::VideoFrame::kMaxPlanes]; 109 int32 strides_[media::VideoFrame::kMaxPlanes];
110 110
111 DISALLOW_COPY_AND_ASSIGN(ClientBuffer2); 111 DISALLOW_COPY_AND_ASSIGN(ClientBuffer2);
112 }; 112 };
113 113
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 double consumer_resource_utilization = -1.0; 560 double consumer_resource_utilization = -1.0;
561 if (!metadata->GetDouble(media::VideoFrameMetadata::RESOURCE_UTILIZATION, 561 if (!metadata->GetDouble(media::VideoFrameMetadata::RESOURCE_UTILIZATION,
562 &consumer_resource_utilization)) { 562 &consumer_resource_utilization)) {
563 consumer_resource_utilization = -1.0; 563 consumer_resource_utilization = -1.0;
564 } 564 }
565 565
566 callback_to_io_thread.Run(*release_sync_token, consumer_resource_utilization); 566 callback_to_io_thread.Run(*release_sync_token, consumer_resource_utilization);
567 } 567 }
568 568
569 } // namespace content 569 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.cc ('k') | content/test/gpu_memory_buffer_impl_test_template.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698