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

Unified Diff: content/browser/renderer_host/media/in_process_video_capture_provider.h

Issue 2800493002: [Mojo Video Capture] Create abstraction VideoCaptureProvider (Closed)
Patch Set: Incorporated suggestions from PatchSet 2 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/in_process_video_capture_provider.h
diff --git a/content/browser/renderer_host/media/in_process_video_capture_provider.h b/content/browser/renderer_host/media/in_process_video_capture_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..57776135974495fcc6e5755a4e3e1ffddaab6d43
--- /dev/null
+++ b/content/browser/renderer_host/media/in_process_video_capture_provider.h
@@ -0,0 +1,40 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_IN_PROCESS_VIDEO_CAPTURE_SYSTEM_H_
+#define CONTENT_BROWSER_RENDERER_HOST_MEDIA_IN_PROCESS_VIDEO_CAPTURE_SYSTEM_H_
+
+#include "base/memory/ptr_util.h"
+#include "base/memory/ref_counted.h"
+#include "content/browser/renderer_host/media/video_capture_provider.h"
+#include "media/capture/video/video_capture_system.h"
+
+namespace content {
+
+class CONTENT_EXPORT InProcessVideoCaptureProvider
+ : public VideoCaptureProvider {
+ public:
+ InProcessVideoCaptureProvider(
+ std::unique_ptr<media::VideoCaptureSystem> video_capture_system,
+ scoped_refptr<base::SingleThreadTaskRunner> device_task_runner);
+ ~InProcessVideoCaptureProvider() override;
+
+ void GetDeviceInfosAsync(
+ const base::Callback<void(
+ const std::vector<media::VideoCaptureDeviceInfo>&)>& result_callback)
+ override;
+
+ std::unique_ptr<BuildableVideoCaptureDevice> CreateBuildableDevice(
+ const std::string& device_id,
+ MediaStreamType stream_type) override;
+
+ private:
+ const std::unique_ptr<media::VideoCaptureSystem> video_capture_system_;
+ // The message loop of media stream device thread, where VCD's live.
+ scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_IN_PROCESS_VIDEO_CAPTURE_SYSTEM_H_

Powered by Google App Engine
This is Rietveld 408576698