OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // This file contains the definition of VASurface class, used for decoding by | 5 // This file contains the definition of VASurface class, used for decoding by |
6 // VaapiVideoDecodeAccelerator and VaapiH264Decoder. | 6 // VaapiVideoDecodeAccelerator and VaapiH264Decoder. |
7 | 7 |
8 #ifndef CONTENT_COMMON_GPU_MEDIA_VA_SURFACE_H_ | 8 #ifndef CONTENT_COMMON_GPU_MEDIA_VA_SURFACE_H_ |
9 #define CONTENT_COMMON_GPU_MEDIA_VA_SURFACE_H_ | 9 #define CONTENT_COMMON_GPU_MEDIA_VA_SURFACE_H_ |
10 | 10 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
83 // VaapiWrapper frees VASurfaceID. | 83 // VaapiWrapper frees VASurfaceID. |
84 // | 84 // |
85 class CONTENT_EXPORT VASurface : public base::RefCountedThreadSafe<VASurface> { | 85 class CONTENT_EXPORT VASurface : public base::RefCountedThreadSafe<VASurface> { |
86 public: | 86 public: |
87 // Provided by user, will be called when all references to the surface | 87 // Provided by user, will be called when all references to the surface |
88 // are released. | 88 // are released. |
89 typedef base::Callback<void(VASurfaceID)> ReleaseCB; | 89 typedef base::Callback<void(VASurfaceID)> ReleaseCB; |
90 | 90 |
91 VASurface(VASurfaceID va_surface_id, | 91 VASurface(VASurfaceID va_surface_id, |
92 const gfx::Size& size, | 92 const gfx::Size& size, |
93 const unsigned int format, | |
93 const ReleaseCB& release_cb); | 94 const ReleaseCB& release_cb); |
Pawel Osciak
2015/11/10 06:09:24
Nit: const in format not needed.
william.xie1
2015/11/10 06:25:54
Done.
| |
94 | 95 |
95 VASurfaceID id() { | 96 VASurfaceID id() { |
96 return va_surface_id_; | 97 return va_surface_id_; |
97 } | 98 } |
98 | 99 |
99 const gfx::Size& size() const { return size_; } | 100 const gfx::Size& size() const { return size_; } |
101 const unsigned int format() const { return format_; } | |
Pawel Osciak
2015/11/10 06:09:24
Nit: const in return type not needed.
william.xie1
2015/11/10 06:25:54
Done.
| |
100 | 102 |
101 private: | 103 private: |
102 friend class base::RefCountedThreadSafe<VASurface>; | 104 friend class base::RefCountedThreadSafe<VASurface>; |
103 ~VASurface(); | 105 ~VASurface(); |
104 | 106 |
105 const VASurfaceID va_surface_id_; | 107 const VASurfaceID va_surface_id_; |
106 gfx::Size size_; | 108 gfx::Size size_; |
109 unsigned int format_; | |
107 ReleaseCB release_cb_; | 110 ReleaseCB release_cb_; |
108 | 111 |
109 DISALLOW_COPY_AND_ASSIGN(VASurface); | 112 DISALLOW_COPY_AND_ASSIGN(VASurface); |
110 }; | 113 }; |
111 | 114 |
112 } // namespace content | 115 } // namespace content |
113 | 116 |
114 #endif // CONTENT_COMMON_GPU_MEDIA_VA_SURFACE_H_ | 117 #endif // CONTENT_COMMON_GPU_MEDIA_VA_SURFACE_H_ |
OLD | NEW |