View | Details | Raw Unified | Return to bug 200601
Collapse All | Expand All

(-)b/www/chromium/files/patch-media__video__capture__fake_video_capture_device_factory.cc (+11 lines)
Added Link Here
1
--- media/video/capture/fake_video_capture_device_factory.cc.orig	2015-06-19 21:21:37 UTC
2
+++ media/video/capture/fake_video_capture_device_factory.cc
3
@@ -48,7 +48,7 @@
4
   for (int n = 0; n < number_of_devices_; ++n) {
5
     VideoCaptureDevice::Name name(base::StringPrintf("fake_device_%d", n),
6
                                   base::StringPrintf("/dev/video%d", n)
7
-#if defined(OS_LINUX)
8
+#if defined(OS_LINUX) || defined(OS_BSD)
9
                                   , VideoCaptureDevice::Name::V4L2_SINGLE_PLANE
10
 #elif defined(OS_MACOSX)
11
                                   , VideoCaptureDevice::Name::AVFOUNDATION
(-)b/www/chromium/files/patch-media__video__capture__file_video_capture_device_factory.cc (+11 lines)
Added Link Here
1
--- media/video/capture/file_video_capture_device_factory.cc.orig	2015-06-19 21:29:29 UTC
2
+++ media/video/capture/file_video_capture_device_factory.cc
3
@@ -51,7 +51,7 @@
4
       command_line_file_path.value(),
5
       kFileVideoCaptureDeviceName,
6
       VideoCaptureDevice::Name::AVFOUNDATION));
7
-#elif defined(OS_LINUX)
8
+#elif defined(OS_LINUX) || defined(OS_BSD)
9
   device_names->push_back(VideoCaptureDevice::Name(
10
       command_line_file_path.value(),
11
       kFileVideoCaptureDeviceName,
(-)b/www/chromium/files/patch-media__video__capture__video_capture_device.cc (+31 lines)
Added Link Here
1
--- media/video/capture/video_capture_device.cc.orig	2015-06-19 21:26:28 UTC
2
+++ media/video/capture/video_capture_device.cc
3
@@ -9,6 +9,10 @@
4
 
5
 namespace media {
6
 
7
+const std::string VideoCaptureDevice::Name::GetModel() const {
8
+  return "";
9
+}
10
+
11
 const std::string VideoCaptureDevice::Name::GetNameAndModel() const {
12
   const std::string model_id = GetModel();
13
   if (model_id.empty())
14
@@ -24,7 +28,7 @@
15
 VideoCaptureDevice::Name::Name(const std::string& name, const std::string& id)
16
     : device_name_(name), unique_id_(id) {}
17
 
18
-#if defined(OS_LINUX)
19
+#if defined(OS_LINUX) || defined(OS_BSD)
20
 VideoCaptureDevice::Name::Name(const std::string& name,
21
                                const std::string& id,
22
                                const CaptureApiType api_type)
23
@@ -69,7 +73,7 @@
24
 
25
 VideoCaptureDevice::Name::~Name() {}
26
 
27
-#if defined(OS_LINUX)
28
+#if defined(OS_LINUX) || defined(OS_BSD)
29
 const char* VideoCaptureDevice::Name::GetCaptureApiTypeString() const {
30
   switch (capture_api_type()) {
31
     case V4L2_SINGLE_PLANE:
(-)b/www/chromium/files/patch-media__video__capture__video_capture_device.h (+38 lines)
Added Link Here
1
--- media/video/capture/video_capture_device.h.orig	2015-06-19 21:22:59 UTC
2
+++ media/video/capture/video_capture_device.h
3
@@ -41,7 +41,7 @@
4
     Name();
5
     Name(const std::string& name, const std::string& id);
6
 
7
-#if defined(OS_LINUX)
8
+#if defined(OS_LINUX) || defined(OS_BSD)
9
     // Linux/CrOS targets Capture Api type: it can only be set on construction.
10
     enum CaptureApiType {
11
       V4L2_SINGLE_PLANE,
12
@@ -85,7 +85,7 @@
13
 #endif
14
 
15
 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
16
-    defined(OS_ANDROID)
17
+    defined(OS_ANDROID) || defined(OS_BSD)
18
     Name(const std::string& name, const std::string& id,
19
          const CaptureApiType api_type);
20
 #endif
21
@@ -123,7 +123,7 @@
22
     }
23
 
24
 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
25
-    defined(OS_ANDROID)
26
+    defined(OS_ANDROID) || defined(OS_BSD)
27
     CaptureApiType capture_api_type() const {
28
       return capture_api_class_.capture_api_type();
29
     }
30
@@ -155,7 +155,7 @@
31
     std::string device_name_;
32
     std::string unique_id_;
33
 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
34
-    defined(OS_ANDROID)
35
+    defined(OS_ANDROID) || defined(OS_BSD)
36
     // This class wraps the CaptureApiType to give it a by default value if not
37
     // initialized.
38
     class CaptureApiClass {
(-)b/www/chromium/files/patch-media__video__capture__video_capture_device_factory.cc (-1 / +21 lines)
Added Link Here
0
- 
1
--- media/video/capture/video_capture_device_factory.cc.orig	2015-06-19 21:33:03 UTC
2
+++ media/video/capture/video_capture_device_factory.cc
3
@@ -14,6 +14,10 @@
4
 // static
5
 scoped_ptr<VideoCaptureDeviceFactory> VideoCaptureDeviceFactory::CreateFactory(
6
     scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
7
+#if defined(OS_BSD)
8
+  return scoped_ptr<VideoCaptureDeviceFactory>(new
9
+      media::FakeVideoCaptureDeviceFactory());
10
+#else
11
   const base::CommandLine* command_line =
12
       base::CommandLine::ForCurrentProcess();
13
   // Use a Fake or File Video Device Factory if the command line flags are
14
@@ -32,6 +36,7 @@
15
     return scoped_ptr<VideoCaptureDeviceFactory>(
16
         CreateVideoCaptureDeviceFactory(ui_task_runner));
17
   }
18
+#endif
19
 }
20
 
21
 VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() {

Return to bug 200601