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

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

Issue 490233002: VaapiVideoAccelerator: make Vaapi accelerator work with ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missing modifications in video accelerators Created 6 years, 2 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 f600cdfa1d17198d00f4fd67b4b59767ea60795e..edf97fb615b0b3c13422aebf7e8d5d8bb0c534f2 100644
--- a/content/common/gpu/media/vaapi_wrapper.h
+++ b/content/common/gpu/media/vaapi_wrapper.h
@@ -14,13 +14,12 @@
#include <vector>
#include "base/callback.h"
-#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "content/common/content_export.h"
#include "content/common/gpu/media/va_surface.h"
#include "media/base/video_decoder_config.h"
#include "media/base/video_frame.h"
-#include "third_party/libva/va/va_x11.h"
+#include "third_party/libva/va/va.h"
#include "ui/gfx/size.h"
namespace content {
@@ -47,7 +46,6 @@ class CONTENT_EXPORT VaapiWrapper {
static scoped_ptr<VaapiWrapper> Create(
CodecMode mode,
media::VideoCodecProfile profile,
- Display* x_display,
const base::Closure& report_error_to_uma_cb);
~VaapiWrapper();
@@ -59,7 +57,7 @@ class CONTENT_EXPORT VaapiWrapper {
// again to free the allocated surfaces first, but is not required to do so
// at destruction time, as this will be done automatically from
// the destructor.
- bool CreateSurfaces(gfx::Size size,
+ bool CreateSurfaces(const gfx::Size& size,
size_t num_surfaces,
std::vector<VASurfaceID>* va_surfaces);
@@ -92,12 +90,6 @@ class CONTENT_EXPORT VaapiWrapper {
// buffers. Return false if Execute() fails.
bool ExecuteAndDestroyPendingBuffers(VASurfaceID va_surface_id);
- // 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);
-
// Returns true if the VAAPI version is less than the specified version.
bool VAAPIVersionLessThan(int major, int minor);
@@ -134,12 +126,15 @@ class CONTENT_EXPORT VaapiWrapper {
// Destroy all previously-allocated (and not yet destroyed) coded buffers.
void DestroyCodedBuffers();
+ // Returns the initialized VADisplay
Pawel Osciak 2014/10/08 08:17:22 I feel really uncomfortable about this. We should
llandwerlin-old 2014/10/08 09:31:18 I will implement the VPP functions into the VaapiW
+ VADisplay GetDisplay();
+
private:
VaapiWrapper();
- bool Initialize(CodecMode mode,
+ bool Initialize(VADisplay display,
+ CodecMode mode,
media::VideoCodecProfile profile,
- Display* x_display,
const base::Closure& report_error__to_uma_cb);
void Deinitialize();
@@ -167,7 +162,7 @@ class CONTENT_EXPORT VaapiWrapper {
int major_version_, minor_version_;
// VA handles.
- // Both valid after successful Initialize() and until Deinitialize().
+ // All valid after successful Initialize() and until Deinitialize().
VADisplay va_display_;
VAConfigID va_config_id_;
// Created for the current set of va_surface_ids_ in CreateSurfaces() and

Powered by Google App Engine
This is Rietveld 408576698