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

Side by Side Diff: media/gpu/vaapi_wrapper.cc

Issue 2783673003: Separate stubs for V4L2 and VAAPI. (Closed)
Patch Set: reference correct va_stubs.h Created 3 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
« no previous file with comments | « media/gpu/vaapi/va_x11.sigs ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "media/gpu/vaapi_wrapper.h" 5 #include "media/gpu/vaapi_wrapper.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/callback_helpers.h" 11 #include "base/callback_helpers.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/numerics/safe_conversions.h" 14 #include "base/numerics/safe_conversions.h"
15 #include "base/sys_info.h" 15 #include "base/sys_info.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 17
18 // Auto-generated for dlopen libva libraries 18 // Auto-generated for dlopen libva libraries
19 #include "media/gpu/va_stubs.h" 19 #include "media/gpu/vaapi/va_stubs.h"
20 20
21 #include "media/gpu/vaapi_picture.h" 21 #include "media/gpu/vaapi_picture.h"
22 #include "third_party/libyuv/include/libyuv.h" 22 #include "third_party/libyuv/include/libyuv.h"
23 #include "ui/gl/gl_bindings.h" 23 #include "ui/gl/gl_bindings.h"
24 24
25 #if defined(USE_X11) 25 #if defined(USE_X11)
26 #include "ui/gfx/x/x11_types.h" // nogncheck 26 #include "ui/gfx/x/x11_types.h" // nogncheck
27 #elif defined(USE_OZONE) 27 #elif defined(USE_OZONE)
28 #include "third_party/libva/va/drm/va_drm.h" 28 #include "third_party/libva/va/drm/va_drm.h"
29 #include "third_party/libva/va/va_drmcommon.h" 29 #include "third_party/libva/va/va_drmcommon.h"
30 #include "ui/gfx/buffer_format_util.h" 30 #include "ui/gfx/buffer_format_util.h"
31 #include "ui/ozone/public/ozone_platform.h" 31 #include "ui/ozone/public/ozone_platform.h"
32 #include "ui/ozone/public/surface_factory_ozone.h" 32 #include "ui/ozone/public/surface_factory_ozone.h"
33 #endif // USE_X11 33 #endif // USE_X11
34 34
35 using media_gpu::kModuleVa; 35 using media_gpu_vaapi::kModuleVa;
36 #if defined(USE_X11) 36 #if defined(USE_X11)
37 using media_gpu::kModuleVa_x11; 37 using media_gpu_vaapi::kModuleVa_x11;
38 #elif defined(USE_OZONE) 38 #elif defined(USE_OZONE)
39 using media_gpu::kModuleVa_drm; 39 using media_gpu_vaapi::kModuleVa_drm;
40 #endif // USE_X11 40 #endif // USE_X11
41 using media_gpu::InitializeStubs; 41 using media_gpu_vaapi::InitializeStubs;
42 using media_gpu::StubPathMap; 42 using media_gpu_vaapi::StubPathMap;
43 43
44 #define LOG_VA_ERROR_AND_REPORT(va_error, err_msg) \ 44 #define LOG_VA_ERROR_AND_REPORT(va_error, err_msg) \
45 do { \ 45 do { \
46 LOG(ERROR) << err_msg << " VA error: " << vaErrorStr(va_error); \ 46 LOG(ERROR) << err_msg << " VA error: " << vaErrorStr(va_error); \
47 report_error_to_uma_cb_.Run(); \ 47 report_error_to_uma_cb_.Run(); \
48 } while (0) 48 } while (0)
49 49
50 #define VA_LOG_ON_ERROR(va_error, err_msg) \ 50 #define VA_LOG_ON_ERROR(va_error, err_msg) \
51 do { \ 51 do { \
52 if ((va_error) != VA_STATUS_SUCCESS) \ 52 if ((va_error) != VA_STATUS_SUCCESS) \
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 drm_fd_.reset(HANDLE_EINTR(dup(fd))); 1253 drm_fd_.reset(HANDLE_EINTR(dup(fd)));
1254 } 1254 }
1255 #endif // USE_OZONE 1255 #endif // USE_OZONE
1256 1256
1257 bool VaapiWrapper::VADisplayState::VAAPIVersionLessThan(int major, int minor) { 1257 bool VaapiWrapper::VADisplayState::VAAPIVersionLessThan(int major, int minor) {
1258 return (major_version_ < major) || 1258 return (major_version_ < major) ||
1259 (major_version_ == major && minor_version_ < minor); 1259 (major_version_ == major && minor_version_ < minor);
1260 } 1260 }
1261 1261
1262 } // namespace media 1262 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/vaapi/va_x11.sigs ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698