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

Unified Diff: content/common/sandbox_linux/bpf_gpu_policy_linux.cc

Issue 1946153002: Fix V4L2 device failed to create on veyron board (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | media/gpu/v4l2_device.h » ('j') | media/gpu/v4l2_device.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_linux/bpf_gpu_policy_linux.cc
diff --git a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
index d356897d9e0740668884c496307960ca5c91dddb..673b8161da997d9c846e019dd374f565c2380260 100644
--- a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
@@ -27,6 +27,7 @@
#include "content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h"
#include "content/common/set_process_title.h"
#include "content/public/common/content_switches.h"
+#include "media/gpu/v4l2_device.h"
#include "sandbox/linux/bpf_dsl/bpf_dsl.h"
#include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h"
#include "sandbox/linux/seccomp-bpf-helpers/syscall_sets.h"
@@ -86,14 +87,6 @@ inline bool IsOzone() {
#endif
}
-inline bool UseLibV4L2() {
-#if defined(USE_LIBV4L2)
- return true;
-#else
- return false;
-#endif
-}
-
bool IsAcceleratedVaapiVideoEncodeEnabled() {
bool accelerated_encode_enabled = false;
#if defined(OS_CHROMEOS)
@@ -345,7 +338,7 @@ void GpuProcessPolicy::InitGpuBrokerProcess(
BrokerFilePermission::ReadWriteCreateUnlinkRecursive(kDevShm));
} else if (IsArchitectureArm() || IsOzone()){
AddV4L2GpuWhitelist(&permissions);
- if (UseLibV4L2()) {
+ if (media::V4L2Device::IsUsingLibV4L2()) {
dlopen("/usr/lib/libv4l2.so", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE);
// This is a device-specific encoder plugin.
dlopen("/usr/lib/libv4l/plugins/libv4l-encplugin.so",
« no previous file with comments | « no previous file | media/gpu/v4l2_device.h » ('j') | media/gpu/v4l2_device.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698