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

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

Issue 2857303002: [Mojo Video Capture] Implement a VideoCaptureProvider using the Mojo service (part 2) (Closed)
Patch Set: Added back update to |state_| which was accidentally dropped in PatchSet 3 Created 3 years, 7 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_SERVICE_VIDEO_CAPTURE_DEVICE_LAUNCHE R_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_SERVICE_VIDEO_CAPTURE_DEVICE_LAUNCHE R_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_SERVICE_VIDEO_CAPTURE_DEVICE_LAUNCHE R_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_SERVICE_VIDEO_CAPTURE_DEVICE_LAUNCHE R_H_
7 7
8 #include "content/browser/renderer_host/media/video_capture_provider.h" 8 #include "content/browser/renderer_host/media/video_capture_provider.h"
9 #include "content/public/common/media_stream_request.h" 9 #include "content/public/common/media_stream_request.h"
10 #include "services/video_capture/public/interfaces/device_factory.mojom.h" 10 #include "services/video_capture/public/interfaces/device_factory.mojom.h"
(...skipping 13 matching lines...) Expand all
24 MediaStreamType stream_type, 24 MediaStreamType stream_type,
25 const media::VideoCaptureParams& params, 25 const media::VideoCaptureParams& params,
26 base::WeakPtr<media::VideoFrameReceiver> receiver, 26 base::WeakPtr<media::VideoFrameReceiver> receiver,
27 Callbacks* callbacks, 27 Callbacks* callbacks,
28 base::OnceClosure done_cb) override; 28 base::OnceClosure done_cb) override;
29 void AbortLaunch() override; 29 void AbortLaunch() override;
30 30
31 void OnUtilizationReport(int frame_feedback_id, double utilization); 31 void OnUtilizationReport(int frame_feedback_id, double utilization);
32 32
33 private: 33 private:
34 enum class State {
35 READY_TO_LAUNCH,
36 DEVICE_START_IN_PROGRESS,
37 DEVICE_START_ABORTING
38 };
39
40 void OnCreateDeviceCallback(
41 const media::VideoCaptureParams& params,
42 video_capture::mojom::DevicePtr device,
43 base::WeakPtr<media::VideoFrameReceiver> receiver,
44 Callbacks* callbacks,
45 base::OnceClosure done_cb,
46 video_capture::mojom::DeviceAccessResultCode result_code);
47
34 video_capture::mojom::DeviceFactoryPtr* const device_factory_; 48 video_capture::mojom::DeviceFactoryPtr* const device_factory_;
49 State state_;
50 base::SequenceChecker sequence_checker_;
35 }; 51 };
36 52
37 } // namespace content 53 } // namespace content
38 54
39 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_SERVICE_VIDEO_CAPTURE_DEVICE_LAUN CHER_H_ 55 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_SERVICE_VIDEO_CAPTURE_DEVICE_LAUN CHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698