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

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: Fix mock gpu video accelerator factory 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // Return a buffer with id |buffer_id| previously given in 110 // Return a buffer with id |buffer_id| previously given in
111 // VideoCaptureControllerEventHandler::OnBufferReady. In the case that the 111 // VideoCaptureControllerEventHandler::OnBufferReady. In the case that the
112 // buffer was backed by a texture, |sync_point| will be waited on before 112 // buffer was backed by a texture, |sync_point| will be waited on before
113 // destroying or recycling the texture, to synchronize with texture users in 113 // destroying or recycling the texture, to synchronize with texture users in
114 // the renderer process. If the consumer provided resource utilization 114 // the renderer process. If the consumer provided resource utilization
115 // feedback, this will be passed here (-1.0 indicates no feedback). 115 // feedback, this will be passed here (-1.0 indicates no feedback).
116 void ReturnBuffer(VideoCaptureControllerID id, 116 void ReturnBuffer(VideoCaptureControllerID id,
117 VideoCaptureControllerEventHandler* event_handler, 117 VideoCaptureControllerEventHandler* event_handler,
118 int buffer_id, 118 int buffer_id,
119 uint32 sync_point, 119 uint32 sync_point,
120 const gpu::SyncToken& sync_token,
120 double consumer_resource_utilization); 121 double consumer_resource_utilization);
121 122
122 const media::VideoCaptureFormat& GetVideoCaptureFormat() const; 123 const media::VideoCaptureFormat& GetVideoCaptureFormat() const;
123 124
124 bool has_received_frames() const { return has_received_frames_; } 125 bool has_received_frames() const { return has_received_frames_; }
125 126
126 // Worker functions on IO thread. Called by the VideoCaptureDeviceClient. 127 // Worker functions on IO thread. Called by the VideoCaptureDeviceClient.
127 virtual void DoIncomingCapturedVideoFrameOnIOThread( 128 virtual void DoIncomingCapturedVideoFrameOnIOThread(
128 scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer, 129 scoped_ptr<media::VideoCaptureDevice::Client::Buffer> buffer,
129 const scoped_refptr<media::VideoFrame>& frame, 130 const scoped_refptr<media::VideoFrame>& frame,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 media::VideoCaptureFormat video_capture_format_; 162 media::VideoCaptureFormat video_capture_format_;
162 163
163 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; 164 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_;
164 165
165 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); 166 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController);
166 }; 167 };
167 168
168 } // namespace content 169 } // namespace content
169 170
170 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ 171 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698