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

Side by Side Diff: content/common/gpu/media/v4l2_video_device.cc

Issue 137023008: Add support for Tegra V4L2 VDA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/debug/trace_event.h" 5 #include "base/debug/trace_event.h"
6 #include "content/common/gpu/media/exynos_v4l2_video_device.h" 6 #include "content/common/gpu/media/exynos_v4l2_video_device.h"
7 #include "content/common/gpu/media/tegra_v4l2_video_device.h"
7 8
8 namespace content { 9 namespace content {
9 10
10 V4L2Device::V4L2Device() {} 11 V4L2Device::V4L2Device() {}
11 12
12 V4L2Device::~V4L2Device() {} 13 V4L2Device::~V4L2Device() {}
13 14
14 // static 15 // static
15 scoped_ptr<V4L2Device> V4L2Device::Create() { 16 scoped_ptr<V4L2Device> V4L2Device::Create(EGLContext egl_context) {
16 DVLOG(3) << __PRETTY_FUNCTION__; 17 DVLOG(3) << __PRETTY_FUNCTION__;
17 18
18 scoped_ptr<ExynosV4L2Device> device(new ExynosV4L2Device()); 19 scoped_ptr<ExynosV4L2Device> exynos_device(new ExynosV4L2Device());
19 if (!device->Initialize()) { 20 if (exynos_device->Initialize())
20 // TODO(shivdasp): Try and create other V4L2Devices. 21 return exynos_device.PassAs<V4L2Device>();
21 device.reset(NULL); 22
22 } 23 scoped_ptr<TegraV4L2Device> tegra_device(new TegraV4L2Device(egl_context));
23 return device.PassAs<V4L2Device>(); 24 if (tegra_device->Initialize())
25 return tegra_device.PassAs<V4L2Device>();
26
27 DLOG(ERROR) << "Failed to create V4L2Device";
28 return scoped_ptr<V4L2Device>();
24 } 29 }
25 } // namespace content 30 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698