Chromium Code Reviews| Index: media/video/capture/video_capture_device_factory.cc |
| diff --git a/media/video/capture/video_capture_device_factory.cc b/media/video/capture/video_capture_device_factory.cc |
| index e63225dc178c9ea375bd62f965ccea9440b73f4f..c2417bcc413f07702e47d7843fc5f76b1910241f 100644 |
| --- a/media/video/capture/video_capture_device_factory.cc |
| +++ b/media/video/capture/video_capture_device_factory.cc |
| @@ -4,30 +4,57 @@ |
| #include "media/video/capture/video_capture_device_factory.h" |
|
perkj_chrome
2014/05/06 06:44:46
#if defined(OS_MACOSX)
#include ....
mcasas
2014/05/06 07:26:30
Done.
|
| +#include "media/video/capture/mac/video_capture_device_factory_mac.h" |
| + |
| namespace media { |
| +// static |
| +scoped_ptr<VideoCaptureDeviceFactory> VideoCaptureDeviceFactory::Create() { |
| +#if defined(OS_MACOSX) |
| + return scoped_ptr<VideoCaptureDeviceFactory>(new |
| + VideoCaptureDeviceFactoryMac()); |
| +#else |
| + return scoped_ptr<VideoCaptureDeviceFactory>(new VideoCaptureDeviceFactory()); |
| +#endif |
|
perkj_chrome
2014/05/06 06:44:46
Why not create the fake ones here too?
mcasas
2014/05/06 07:26:30
Done.
|
| +} |
| + |
| VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() { |
| thread_checker_.DetachFromThread(); |
| -}; |
| +} |
| + |
| +VideoCaptureDeviceFactory::~VideoCaptureDeviceFactory() {} |
| scoped_ptr<VideoCaptureDevice> VideoCaptureDeviceFactory::Create( |
| const VideoCaptureDevice::Name& device_name) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| +// TODO(mcasas): Remove the #if parts when all platforms have splitted the |
| +// VideoCaptureDevice into VideoCaptureDevice and VideoCaptureDeviceFactory. |
| +// Remove as well the call to the VideoCaptureDevice static method. |
|
perkj_chrome
2014/05/06 06:44:46
no need for this since you override VideoCaptureDe
mcasas
2014/05/06 07:26:30
I completely agree but the linker gives a missing
|
| +#if !defined(OS_MACOSX) |
| return scoped_ptr<VideoCaptureDevice>( |
| VideoCaptureDevice::Create(device_name)); |
| +#else |
| + return scoped_ptr<VideoCaptureDevice>(); |
| +#endif |
| } |
| void VideoCaptureDeviceFactory::GetDeviceNames( |
| VideoCaptureDevice::Names* device_names) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| +// See TODO in Create(). |
| +#if !defined(OS_MACOSX) |
|
perkj_chrome
2014/05/06 06:44:46
dito
mcasas
2014/05/06 07:26:30
See before.
|
| VideoCaptureDevice::GetDeviceNames(device_names); |
| +#endif |
| } |
| void VideoCaptureDeviceFactory::GetDeviceSupportedFormats( |
| const VideoCaptureDevice::Name& device, |
| VideoCaptureFormats* supported_formats) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| +// See TODO in Create(). |
| +#if !defined(OS_MACOSX) |
|
perkj_chrome
2014/05/06 06:44:46
dito
mcasas
2014/05/06 07:26:30
See before.
|
| VideoCaptureDevice::GetDeviceSupportedFormats(device, supported_formats); |
| +#endif |
| } |
| } // namespace media |