Index: content/common/gpu/media/vaapi_picture_provider_x11.h |
diff --git a/content/common/gpu/media/vaapi_picture_provider_x11.h b/content/common/gpu/media/vaapi_picture_provider_x11.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..18aaf63b8b2d300c4b017476a784e1948919cf17 |
--- /dev/null |
+++ b/content/common/gpu/media/vaapi_picture_provider_x11.h |
@@ -0,0 +1,51 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+// |
+// This file contains an implementation of picture allocation for the |
+// X11 window system used by VaapiPictureProvider to produce output |
+// pictures. |
+ |
+#ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_PROVIDER_X11_H_ |
+#define CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_PROVIDER_X11_H_ |
+ |
+#include "base/callback.h" |
+#include "content/common/gpu/media/vaapi_picture_provider.h" |
+#include "content/common/gpu/media/vaapi_wrapper.h" |
Pawel Osciak
2014/10/26 13:06:47
Would declaration be enough like in drm case?
llandwerlin-old
2014/10/29 13:52:48
Sadly since I've moved the vaDestroySurfaces() int
|
+#include "third_party/libva/va/va.h" |
+#include "ui/gfx/size.h" |
+#include "ui/gl/gl_bindings.h" |
+#include "ui/gl/gl_context_glx.h" |
+ |
+namespace content { |
+ |
+class X11VaapiPictureProvider : public VaapiPictureProvider { |
+ public: |
+ X11VaapiPictureProvider( |
+ scoped_refptr<VaapiWrapper> vaapi_wrapper, |
+ gfx::GLContextGLX* glx_context, |
+ const base::Callback<bool(void)> make_context_current); |
+ virtual ~X11VaapiPictureProvider(); |
+ |
+ virtual linked_ptr<VaapiPictureProvider::Picture> CreatePicture( |
+ int32 picture_buffer_id, |
+ uint32 texture_id, |
+ const gfx::Size& size) OVERRIDE; |
+ |
+ private: |
+ virtual bool Initialize() OVERRIDE; |
+ |
+ gfx::GLContextGLX* glx_context_; |
+ base::Callback<bool(void)> make_context_current_; |
+ |
+ Display* x_display_; |
+ GLXFBConfig fb_config_; |
+ |
+ scoped_refptr<VaapiWrapper> vaapi_wrapper_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(X11VaapiPictureProvider); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_PROVIDER_X11_H_ |