| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #include "talk/media/webrtc/webrtcvideocapturer.h" | 28 #include "talk/media/webrtc/webrtcvideocapturer.h" |
| 29 #include "talk/media/webrtc/webrtcvideocapturerfactory.h" | 29 #include "talk/media/webrtc/webrtcvideocapturerfactory.h" |
| 30 #include "webrtc/base/scoped_ptr.h" | 30 #include "webrtc/base/scoped_ptr.h" |
| 31 | 31 |
| 32 namespace cricket { | 32 namespace cricket { |
| 33 | 33 |
| 34 VideoCapturer* WebRtcVideoDeviceCapturerFactory::Create(const Device& device) { | 34 VideoCapturer* WebRtcVideoDeviceCapturerFactory::Create(const Device& device) { |
| 35 #ifdef HAVE_WEBRTC_VIDEO |
| 35 rtc::scoped_ptr<WebRtcVideoCapturer> capturer( | 36 rtc::scoped_ptr<WebRtcVideoCapturer> capturer( |
| 36 new WebRtcVideoCapturer()); | 37 new WebRtcVideoCapturer()); |
| 37 if (!capturer->Init(device)) { | 38 if (!capturer->Init(device)) { |
| 38 return NULL; | 39 return nullptr; |
| 39 } | 40 } |
| 40 return capturer.release(); | 41 return capturer.release(); |
| 42 #else |
| 43 return nullptr; |
| 44 #endif |
| 41 } | 45 } |
| 42 | 46 |
| 43 } // namespace cricket | 47 } // namespace cricket |
| OLD | NEW |