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

Unified Diff: content/common/gpu/media/vaapi_wrapper.h

Issue 240113009: Enable HW VAVDA by libva-wayland backend. (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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/media/vaapi_wrapper.h
diff --git a/content/common/gpu/media/vaapi_wrapper.h b/content/common/gpu/media/vaapi_wrapper.h
index 5570360ecd16e8eeac56219b7aa5b407a7cb314a..c2cd7c694cb07876b89eb09750e415c285cb66dc 100644
--- a/content/common/gpu/media/vaapi_wrapper.h
+++ b/content/common/gpu/media/vaapi_wrapper.h
@@ -9,6 +9,7 @@
#ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_
#define CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_
+#include <vector>
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
@@ -16,7 +17,11 @@
#include "content/common/gpu/media/va_surface.h"
#include "media/base/video_decoder_config.h"
#include "media/base/video_frame.h"
+#if defined (USE_OZONE)
+#include "third_party/libva/va/wayland/va_wayland.h"
+#else
#include "third_party/libva/va/va_x11.h"
+#endif
#include "ui/gfx/size.h"
namespace content {
@@ -37,7 +42,7 @@ class CONTENT_EXPORT VaapiWrapper {
// errors to clients via method return values.
static scoped_ptr<VaapiWrapper> Create(
media::VideoCodecProfile profile,
- Display* x_display,
+ void* display,
const base::Closure& report_error_to_uma_cb);
~VaapiWrapper();
@@ -72,12 +77,23 @@ class CONTENT_EXPORT VaapiWrapper {
// buffers. Return false if SubmitDecode() fails.
bool DecodeAndDestroyPendingBuffers(VASurfaceID va_surface_id);
+#if defined (USE_OZONE)
+ bool CreateRGBImage(gfx::Size size, VAImage* image);
Ami GONE FROM CHROMIUM 2014/04/18 22:40:25 document methods please.
+ void DestroyImage(VAImage* image);
+
+ bool MapImage(VAImage* image, void** buffer);
+ void UnmapImage(VAImage* image);
+
+ // Put data from |va_surface_id| into |va_image|, converting/scaling it.
+ bool PutSurfaceIntoImage(VASurfaceID va_surface_id,
+ VAImage* va_image);
+#else
// Put data from |va_surface_id| into |x_pixmap| of size |size|,
// converting/scaling to it.
bool PutSurfaceIntoPixmap(VASurfaceID va_surface_id,
Pixmap x_pixmap,
gfx::Size dest_size);
-
+#endif
// Returns true if the VAAPI version is less than the specified version.
bool VAAPIVersionLessThan(int major, int minor);
@@ -96,7 +112,7 @@ class CONTENT_EXPORT VaapiWrapper {
VaapiWrapper();
bool Initialize(media::VideoCodecProfile profile,
- Display* x_display,
+ void* display,
const base::Closure& report_error__to_uma_cb);
void Deinitialize();

Powered by Google App Engine
This is Rietveld 408576698