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

Unified Diff: media/gpu/generic_v4l2_device.cc

Issue 1939683002: Test X11 header pollution (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/gpu/generic_v4l2_device.h ('k') | media/gpu/gpu_video_accelerator_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/generic_v4l2_device.cc
diff --git a/content/common/gpu/media/generic_v4l2_device.cc b/media/gpu/generic_v4l2_device.cc
similarity index 90%
rename from content/common/gpu/media/generic_v4l2_device.cc
rename to media/gpu/generic_v4l2_device.cc
index 5438f15bb728cde84fb7c65ebfdbc202937cbc0e..57fe87a7cb63cf197a456a0aef492a2a76df69b6 100644
--- a/content/common/gpu/media/generic_v4l2_device.cc
+++ b/media/gpu/generic_v4l2_device.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
//
-#include "content/common/gpu/media/generic_v4l2_device.h"
+#include "media/gpu/generic_v4l2_device.h"
#include <errno.h>
#include <fcntl.h>
@@ -22,23 +22,24 @@
#include "base/posix/eintr_wrapper.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
+#include "media/gpu/generic_v4l2_device.h"
#include "ui/gl/egl_util.h"
#include "ui/gl/gl_bindings.h"
#if defined(USE_LIBV4L2)
// Auto-generated for dlopen libv4l2 libraries
-#include "content/common/gpu/media/v4l2_stubs.h"
+#include "media/gpu/v4l2_stubs.h"
#include "third_party/v4l-utils/lib/include/libv4l2.h"
-using content_common_gpu_media::kModuleV4l2;
-using content_common_gpu_media::InitializeStubs;
-using content_common_gpu_media::StubPathMap;
+using media_gpu::kModuleV4l2;
+using media_gpu::InitializeStubs;
+using media_gpu::StubPathMap;
static const base::FilePath::CharType kV4l2Lib[] =
FILE_PATH_LITERAL("/usr/lib/libv4l2.so");
#endif
-namespace content {
+namespace media {
namespace {
const char kDecoderDevice[] = "/dev/video-dec";
@@ -48,9 +49,7 @@ const char kJpegDecoderDevice[] = "/dev/jpeg-dec";
}
GenericV4L2Device::GenericV4L2Device(Type type)
- : V4L2Device(type),
- use_libv4l2_(false) {
-}
+ : V4L2Device(type), use_libv4l2_(false) {}
GenericV4L2Device::~GenericV4L2Device() {
#if defined(USE_LIBV4L2)
@@ -93,10 +92,10 @@ bool GenericV4L2Device::Poll(bool poll_device, bool* event_pending) {
}
void* GenericV4L2Device::Mmap(void* addr,
- unsigned int len,
- int prot,
- int flags,
- unsigned int offset) {
+ unsigned int len,
+ int prot,
+ int flags,
+ unsigned int offset) {
return mmap(addr, len, prot, flags, device_fd_.get(), offset);
}
@@ -213,10 +212,10 @@ bool GenericV4L2Device::CanCreateEGLImageFrom(uint32_t v4l2_pixfmt) {
};
return std::find(
- kEGLImageDrmFmtsSupported,
- kEGLImageDrmFmtsSupported + arraysize(kEGLImageDrmFmtsSupported),
- V4L2PixFmtToDrmFormat(v4l2_pixfmt)) !=
- kEGLImageDrmFmtsSupported + arraysize(kEGLImageDrmFmtsSupported);
+ kEGLImageDrmFmtsSupported,
+ kEGLImageDrmFmtsSupported + arraysize(kEGLImageDrmFmtsSupported),
+ V4L2PixFmtToDrmFormat(v4l2_pixfmt)) !=
+ kEGLImageDrmFmtsSupported + arraysize(kEGLImageDrmFmtsSupported);
}
EGLImageKHR GenericV4L2Device::CreateEGLImage(
@@ -294,11 +293,13 @@ EGLImageKHR GenericV4L2Device::CreateEGLImage(
}
EGLBoolean GenericV4L2Device::DestroyEGLImage(EGLDisplay egl_display,
- EGLImageKHR egl_image) {
+ EGLImageKHR egl_image) {
return eglDestroyImageKHR(egl_display, egl_image);
}
-GLenum GenericV4L2Device::GetTextureTarget() { return GL_TEXTURE_EXTERNAL_OES; }
+GLenum GenericV4L2Device::GetTextureTarget() {
+ return GL_TEXTURE_EXTERNAL_OES;
+}
uint32_t GenericV4L2Device::PreferredInputFormat() {
// TODO(posciak): We should support "dontcare" returns here once we
@@ -319,4 +320,4 @@ bool GenericV4L2Device::PostSandboxInitialization() {
#endif
}
-} // namespace content
+} // namespace media
« no previous file with comments | « media/gpu/generic_v4l2_device.h ('k') | media/gpu/gpu_video_accelerator_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698