OLD | NEW |
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 <dlfcn.h> | 5 #include <dlfcn.h> |
6 #include <fcntl.h> | 6 #include <fcntl.h> |
7 #include <linux/videodev2.h> | 7 #include <linux/videodev2.h> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/posix/eintr_wrapper.h" | 10 #include "base/posix/eintr_wrapper.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 bool initialized() { return initialized_; } | 84 bool initialized() { return initialized_; } |
85 | 85 |
86 private: | 86 private: |
87 bool initialized_; | 87 bool initialized_; |
88 }; | 88 }; |
89 | 89 |
90 base::LazyInstance<TegraFunctionSymbolFinder> g_tegra_function_symbol_finder_ = | 90 base::LazyInstance<TegraFunctionSymbolFinder> g_tegra_function_symbol_finder_ = |
91 LAZY_INSTANCE_INITIALIZER; | 91 LAZY_INSTANCE_INITIALIZER; |
92 | 92 |
93 TegraV4L2Device::TegraV4L2Device(Type type) | 93 TegraV4L2Device::TegraV4L2Device(Type type) |
94 : type_(type), | 94 : V4L2Device(type), |
95 device_fd_(-1) { | 95 device_fd_(-1) { |
96 } | 96 } |
97 | 97 |
98 TegraV4L2Device::~TegraV4L2Device() { | 98 TegraV4L2Device::~TegraV4L2Device() { |
99 if (device_fd_ != -1) { | 99 if (device_fd_ != -1) { |
100 TegraV4L2_Close(device_fd_); | 100 TegraV4L2_Close(device_fd_); |
101 device_fd_ = -1; | 101 device_fd_ = -1; |
102 } | 102 } |
103 } | 103 } |
104 | 104 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 GLenum TegraV4L2Device::GetTextureTarget() { return GL_TEXTURE_2D; } | 214 GLenum TegraV4L2Device::GetTextureTarget() { return GL_TEXTURE_2D; } |
215 | 215 |
216 uint32 TegraV4L2Device::PreferredInputFormat() { | 216 uint32 TegraV4L2Device::PreferredInputFormat() { |
217 // TODO(posciak): We should support "dontcare" returns here once we | 217 // TODO(posciak): We should support "dontcare" returns here once we |
218 // implement proper handling (fallback, negotiation) for this in users. | 218 // implement proper handling (fallback, negotiation) for this in users. |
219 CHECK_EQ(type_, kEncoder); | 219 CHECK_EQ(type_, kEncoder); |
220 return V4L2_PIX_FMT_YUV420M; | 220 return V4L2_PIX_FMT_YUV420M; |
221 } | 221 } |
222 | 222 |
223 } // namespace content | 223 } // namespace content |
OLD | NEW |