OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 // |
| 5 // This file contains an implementation of picture allocation for the |
| 6 // Ozone window system used by VaapiPictureProvider to produce output |
| 7 // pictures. |
| 8 |
| 9 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_PROVIDER_DRM_H_ |
| 10 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_PROVIDER_DRM_H_ |
| 11 |
| 12 #include "base/callback.h" |
| 13 #include "content/common/gpu/media/vaapi_picture_provider.h" |
| 14 #include "third_party/libva/va/va.h" |
| 15 #include "ui/gfx/size.h" |
| 16 |
| 17 namespace content { |
| 18 |
| 19 class VaapiWrapper; |
| 20 |
| 21 class DrmVaapiPictureProvider : public VaapiPictureProvider { |
| 22 public: |
| 23 DrmVaapiPictureProvider( |
| 24 scoped_refptr<VaapiWrapper> vaapi_wrapper, |
| 25 const base::Callback<bool(void)> make_context_current); |
| 26 virtual ~DrmVaapiPictureProvider(); |
| 27 |
| 28 virtual linked_ptr<VaapiPictureProvider::Picture> CreatePicture( |
| 29 int32 picture_buffer_id, |
| 30 uint32 texture_id, |
| 31 const gfx::Size& size) OVERRIDE; |
| 32 |
| 33 private: |
| 34 virtual bool Initialize() OVERRIDE; |
| 35 |
| 36 base::Callback<bool(void)> make_context_current_; |
| 37 |
| 38 scoped_refptr<VaapiWrapper> vaapi_wrapper_; |
| 39 |
| 40 DISALLOW_COPY_AND_ASSIGN(DrmVaapiPictureProvider); |
| 41 }; |
| 42 |
| 43 } // namespace content |
| 44 |
| 45 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_PROVIDER_DRM_H_ |
OLD | NEW |