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 DrmVaapiPictureProvider : public VaapiPictureProvider { | |
20 public: | |
21 DrmVaapiPictureProvider( | |
22 VADisplay va_display, | |
23 const base::Callback<bool(void)> make_context_current); | |
24 virtual ~DrmVaapiPictureProvider(); | |
25 | |
26 virtual scoped_ptr<VaapiPictureProvider::Picture> CreatePicture( | |
27 int32 picture_buffer_id, | |
28 uint32 texture_id, | |
29 const gfx::Size& size) OVERRIDE; | |
30 | |
31 virtual bool SetCodedSurfacesSize(const gfx::Size& size) OVERRIDE; | |
32 | |
33 // Converts a VASurface from decoder preferred format (NV12) to | |
34 // output picture format (RGBA) | |
35 bool PutSurfaceIntoPicture(VASurfaceID va_surface_id_src, | |
Pawel Osciak
2014/10/08 08:17:22
This should be private?
llandwerlin-old
2014/10/08 09:31:18
With VPP functions into the VaapiWrapper, this wil
| |
36 VASurfaceID va_surface_id_dest, | |
37 const gfx::Size& dest_size); | |
38 | |
39 private: | |
40 virtual bool Initialize() OVERRIDE; | |
41 | |
42 // Initialize the video post processing context with the |size| of | |
43 // the decoder output pictures. | |
44 bool InitializeVpp(const gfx::Size& size); | |
45 | |
46 // Deinitialize the video post processing context | |
47 void DeinitializeVpp(); | |
48 | |
49 base::Callback<bool(void)> make_context_current_; | |
50 | |
51 VADisplay va_display_; | |
52 | |
53 VAConfigID vpp_config_; | |
54 VAContextID vpp_context_; | |
55 VABufferID vpp_buffer_; | |
56 | |
57 gfx::Size coded_picture_size_; | |
58 }; | |
59 | |
60 } // namespace content | |
61 | |
62 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_PROVIDER_DRM_H_ | |
OLD | NEW |