Index: content/common/gpu/media/v4l2_video_device.cc |
diff --git a/content/common/gpu/media/v4l2_video_device.cc b/content/common/gpu/media/v4l2_video_device.cc |
index c1b26586862709f73edcfc4d5c50f00629ea5db7..ffaa52b57aa73d608a07b6f42a76e53b09ea55fc 100644 |
--- a/content/common/gpu/media/v4l2_video_device.cc |
+++ b/content/common/gpu/media/v4l2_video_device.cc |
@@ -4,6 +4,7 @@ |
#include "base/debug/trace_event.h" |
#include "content/common/gpu/media/exynos_v4l2_video_device.h" |
+#include "content/common/gpu/media/tegra_v4l2_video_device.h" |
namespace content { |
@@ -12,14 +13,19 @@ V4L2Device::V4L2Device() {} |
V4L2Device::~V4L2Device() {} |
// static |
-scoped_ptr<V4L2Device> V4L2Device::Create() { |
+scoped_ptr<V4L2Device> V4L2Device::Create(EGLContext egl_context) { |
DVLOG(3) << __PRETTY_FUNCTION__; |
- scoped_ptr<ExynosV4L2Device> device(new ExynosV4L2Device()); |
- if (!device->Initialize()) { |
- // TODO(shivdasp): Try and create other V4L2Devices. |
- device.reset(NULL); |
+ scoped_ptr<ExynosV4L2Device> exynos_device(new ExynosV4L2Device()); |
+ if (!exynos_device->Initialize()) { |
+ exynos_device.reset(NULL); |
Ami GONE FROM CHROMIUM
2014/02/07 09:09:30
Can drop NULL (scoped_ptr::reset(NULL) is equiv to
shivdasp
2014/02/10 13:31:17
Done.
|
+ scoped_ptr<TegraV4L2Device> tegra_device(new TegraV4L2Device(egl_context)); |
+ if (!tegra_device->Initialize()) { |
+ DLOG(ERROR) << "Unable to open tegra v4l2 device "; |
+ tegra_device.reset(NULL); |
+ } |
+ return tegra_device.PassAs<V4L2Device>(); |
} |
- return device.PassAs<V4L2Device>(); |
+ return exynos_device.PassAs<V4L2Device>(); |
Ami GONE FROM CHROMIUM
2014/02/07 09:09:30
l.19-29 would be clearer as:
scoped_ptr<EV4L2D> e
Pawel Osciak
2014/02/10 06:36:17
+1 to this, but I don't think DLOGging failing to
shivdasp
2014/02/10 13:31:17
Agreed. Will make this change in next patchset.
O
|
} |
} // namespace content |