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

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

Issue 2805533002: Reland [Mojo Video Capture] Introduce abstraction VideoCaptureSystem (Closed)
Patch Set: Fix race condition in tests Created 3 years, 8 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
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 // MediaStreamManager is used to open media capture devices (video supported 5 // MediaStreamManager is used to open media capture devices (video supported
6 // now). Call flow: 6 // now). Call flow:
7 // 1. GenerateStream is called when a render process wants to use a capture 7 // 1. GenerateStream is called when a render process wants to use a capture
8 // device. 8 // device.
9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to 9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to
10 // use devices and for which device to use. 10 // use devices and for which device to use.
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 const MediaDeviceInfoArray& devices); 253 const MediaDeviceInfoArray& devices);
254 254
255 // This method is called when an audio or video device is removed. It makes 255 // This method is called when an audio or video device is removed. It makes
256 // sure all MediaStreams that use a removed device are stopped and that the 256 // sure all MediaStreams that use a removed device are stopped and that the
257 // render process is notified. 257 // render process is notified.
258 void StopRemovedDevice(MediaDeviceType type, const MediaDeviceInfo& device); 258 void StopRemovedDevice(MediaDeviceType type, const MediaDeviceInfo& device);
259 259
260 void SetGenerateStreamCallbackForTesting( 260 void SetGenerateStreamCallbackForTesting(
261 GenerateStreamTestCallback test_callback); 261 GenerateStreamTestCallback test_callback);
262 262
263 #if defined(OS_WIN)
264 void FlushVideoCaptureThreadForTesting();
265 #endif
266
267 // This method is called when all tracks are started. 263 // This method is called when all tracks are started.
268 void OnStreamStarted(const std::string& label); 264 void OnStreamStarted(const std::string& label);
269 265
270 private: 266 private:
271 // Contains all data needed to keep track of requests. 267 // Contains all data needed to keep track of requests.
272 class DeviceRequest; 268 class DeviceRequest;
273 269
274 // |DeviceRequests| is a list to ensure requests are processed in the order 270 // |DeviceRequests| is a list to ensure requests are processed in the order
275 // they arrive. The first member of the pair is the label of the 271 // they arrive. The first member of the pair is the label of the
276 // |DeviceRequest|. 272 // |DeviceRequest|.
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 std::map<int, base::Callback<void(const std::string&)>> log_callbacks_; 418 std::map<int, base::Callback<void(const std::string&)>> log_callbacks_;
423 419
424 GenerateStreamTestCallback generate_stream_test_callback_; 420 GenerateStreamTestCallback generate_stream_test_callback_;
425 421
426 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); 422 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager);
427 }; 423 };
428 424
429 } // namespace content 425 } // namespace content
430 426
431 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ 427 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698