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

Side by Side Diff: content/browser/renderer_host/media/video_capture_controller.h

Issue 1427543002: Modified old wait sync point functions to also accept new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format 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 // VideoCaptureController is the glue between a VideoCaptureDevice and all 5 // VideoCaptureController is the glue between a VideoCaptureDevice and all
6 // VideoCaptureHosts that have connected to it. A controller exists on behalf of 6 // VideoCaptureHosts that have connected to it. A controller exists on behalf of
7 // one (and only one) VideoCaptureDevice; both are owned by the 7 // one (and only one) VideoCaptureDevice; both are owned by the
8 // VideoCaptureManager. 8 // VideoCaptureManager.
9 // 9 //
10 // The VideoCaptureController is responsible for: 10 // The VideoCaptureController is responsible for:
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 // Return a buffer with id |buffer_id| previously given in 108 // Return a buffer with id |buffer_id| previously given in
109 // VideoCaptureControllerEventHandler::OnBufferReady. In the case that the 109 // VideoCaptureControllerEventHandler::OnBufferReady. In the case that the
110 // buffer was backed by a texture, |sync_point| will be waited on before 110 // buffer was backed by a texture, |sync_point| will be waited on before
111 // destroying or recycling the texture, to synchronize with texture users in 111 // destroying or recycling the texture, to synchronize with texture users in
112 // the renderer process. If the consumer provided resource utilization 112 // the renderer process. If the consumer provided resource utilization
113 // feedback, this will be passed here (-1.0 indicates no feedback). 113 // feedback, this will be passed here (-1.0 indicates no feedback).
114 void ReturnBuffer(VideoCaptureControllerID id, 114 void ReturnBuffer(VideoCaptureControllerID id,
115 VideoCaptureControllerEventHandler* event_handler, 115 VideoCaptureControllerEventHandler* event_handler,
116 int buffer_id, 116 int buffer_id,
117 uint32 sync_point, 117 const gpu::SyncToken& sync_token,
118 double consumer_resource_utilization); 118 double consumer_resource_utilization);
119 119
120 const media::VideoCaptureFormat& GetVideoCaptureFormat() const; 120 const media::VideoCaptureFormat& GetVideoCaptureFormat() const;
121 121
122 bool has_received_frames() const { return has_received_frames_; } 122 bool has_received_frames() const { return has_received_frames_; }
123 123
124 // Worker functions on IO thread. Called by the VideoCaptureDeviceClient. 124 // Worker functions on IO thread. Called by the VideoCaptureDeviceClient.
125 virtual void DoIncomingCapturedVideoFrameOnIOThread( 125 virtual void DoIncomingCapturedVideoFrameOnIOThread(
126 scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer, 126 scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer,
127 const scoped_refptr<media::VideoFrame>& frame, 127 const scoped_refptr<media::VideoFrame>& frame,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 media::VideoCaptureFormat video_capture_format_; 164 media::VideoCaptureFormat video_capture_format_;
165 165
166 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; 166 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_;
167 167
168 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); 168 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController);
169 }; 169 };
170 170
171 } // namespace content 171 } // namespace content
172 172
173 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ 173 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698