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

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

Issue 2583883003: Rebase of Removing gpu::SyncToken usage from video capture pipeline (Closed)
Patch Set: Rebase. Created 3 years, 11 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
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 bool HasActiveClient() const; 113 bool HasActiveClient() const;
114 114
115 // Return true if there is client paused. 115 // Return true if there is client paused.
116 bool HasPausedClient() const; 116 bool HasPausedClient() const;
117 117
118 // API called directly by VideoCaptureManager in case the device is 118 // API called directly by VideoCaptureManager in case the device is
119 // prematurely closed. 119 // prematurely closed.
120 void StopSession(int session_id); 120 void StopSession(int session_id);
121 121
122 // Return a buffer with id |buffer_id| previously given in 122 // Return a buffer with id |buffer_id| previously given in
123 // VideoCaptureControllerEventHandler::OnBufferReady. In the case that the 123 // VideoCaptureControllerEventHandler::OnBufferReady.
124 // buffer was backed by a texture, |sync_token| will be waited on before 124 // If the consumer provided resource utilization
125 // destroying or recycling the texture, to synchronize with texture users in
126 // the renderer process. If the consumer provided resource utilization
127 // feedback, this will be passed here (-1.0 indicates no feedback). 125 // feedback, this will be passed here (-1.0 indicates no feedback).
128 void ReturnBuffer(VideoCaptureControllerID id, 126 void ReturnBuffer(VideoCaptureControllerID id,
129 VideoCaptureControllerEventHandler* event_handler, 127 VideoCaptureControllerEventHandler* event_handler,
130 int buffer_id, 128 int buffer_id,
131 const gpu::SyncToken& sync_token,
132 double consumer_resource_utilization); 129 double consumer_resource_utilization);
133 130
134 const media::VideoCaptureFormat& GetVideoCaptureFormat() const; 131 const media::VideoCaptureFormat& GetVideoCaptureFormat() const;
135 132
136 bool has_received_frames() const { return has_received_frames_; } 133 bool has_received_frames() const { return has_received_frames_; }
137 134
138 // Implementation of media::VideoFrameReceiver interface: 135 // Implementation of media::VideoFrameReceiver interface:
139 void OnIncomingCapturedVideoFrame( 136 void OnIncomingCapturedVideoFrame(
140 std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer, 137 std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer,
141 scoped_refptr<media::VideoFrame> frame) override; 138 scoped_refptr<media::VideoFrame> frame) override;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 media::VideoCaptureFormat video_capture_format_; 206 media::VideoCaptureFormat video_capture_format_;
210 207
211 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; 208 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_;
212 209
213 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); 210 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController);
214 }; 211 };
215 212
216 } // namespace content 213 } // namespace content
217 214
218 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ 215 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698