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

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

Issue 2442193002: Removing gpu::SyncToken usage from video capture pipeline, part 1.
Patch Set: Removing gpu::SyncToken usage from video capture pipeline, part 1. Created 4 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 bool HasActiveClient() const; 106 bool HasActiveClient() const;
107 107
108 // Return true if there is client paused. 108 // Return true if there is client paused.
109 bool HasPausedClient() const; 109 bool HasPausedClient() const;
110 110
111 // API called directly by VideoCaptureManager in case the device is 111 // API called directly by VideoCaptureManager in case the device is
112 // prematurely closed. 112 // prematurely closed.
113 void StopSession(int session_id); 113 void StopSession(int session_id);
114 114
115 // Return a buffer with id |buffer_id| previously given in 115 // Return a buffer with id |buffer_id| previously given in
116 // VideoCaptureControllerEventHandler::OnBufferReady. In the case that the 116 // VideoCaptureControllerEventHandler::OnBufferReady.
117 // buffer was backed by a texture, |sync_token| will be waited on before 117 // If the consumer provided resource utilization
emircan 2016/11/09 22:14:38 nit: Can you fix the alignment here? // Return a
118 // destroying or recycling the texture, to synchronize with texture users in
119 // the renderer process. If the consumer provided resource utilization
120 // feedback, this will be passed here (-1.0 indicates no feedback). 118 // feedback, this will be passed here (-1.0 indicates no feedback).
121 void ReturnBuffer(VideoCaptureControllerID id, 119 void ReturnBuffer(VideoCaptureControllerID id,
122 VideoCaptureControllerEventHandler* event_handler, 120 VideoCaptureControllerEventHandler* event_handler,
123 int buffer_id, 121 int buffer_id,
124 const gpu::SyncToken& sync_token,
125 double consumer_resource_utilization); 122 double consumer_resource_utilization);
126 123
127 const media::VideoCaptureFormat& GetVideoCaptureFormat() const; 124 const media::VideoCaptureFormat& GetVideoCaptureFormat() const;
128 125
129 bool has_received_frames() const { return has_received_frames_; } 126 bool has_received_frames() const { return has_received_frames_; }
130 127
131 // Implementation of media::VideoFrameReceiver interface: 128 // Implementation of media::VideoFrameReceiver interface:
132 void OnIncomingCapturedVideoFrame( 129 void OnIncomingCapturedVideoFrame(
133 std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer, 130 std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> buffer,
134 const scoped_refptr<media::VideoFrame>& frame) override; 131 const scoped_refptr<media::VideoFrame>& frame) override;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 media::VideoCaptureFormat video_capture_format_; 167 media::VideoCaptureFormat video_capture_format_;
171 168
172 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_; 169 base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_;
173 170
174 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController); 171 DISALLOW_COPY_AND_ASSIGN(VideoCaptureController);
175 }; 172 };
176 173
177 } // namespace content 174 } // namespace content
178 175
179 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_ 176 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698