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

Side by Side Diff: content/common/gpu/media/vaapi_wrapper.h

Issue 1239443003: Revert of Create VA surface with correct VA RT format for MJPEG decode acceleration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
OLDNEW
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 an implementation of VaapiWrapper, used by 5 // This file contains an implementation of VaapiWrapper, used by
6 // VaapiVideoDecodeAccelerator and VaapiH264Decoder for decode, 6 // VaapiVideoDecodeAccelerator and VaapiH264Decoder for decode,
7 // and VaapiVideoEncodeAccelerator for encode, to interface 7 // and VaapiVideoEncodeAccelerator for encode, to interface
8 // with libva (VA-API library for hardware video codec). 8 // with libva (VA-API library for hardware video codec).
9 9
10 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_ 10 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Return the supported encode profiles. 70 // Return the supported encode profiles.
71 static media::VideoEncodeAccelerator::SupportedProfiles 71 static media::VideoEncodeAccelerator::SupportedProfiles
72 GetSupportedEncodeProfiles(); 72 GetSupportedEncodeProfiles();
73 73
74 // Return the supported decode profiles. 74 // Return the supported decode profiles.
75 static media::VideoDecodeAccelerator::SupportedProfiles 75 static media::VideoDecodeAccelerator::SupportedProfiles
76 GetSupportedDecodeProfiles(); 76 GetSupportedDecodeProfiles();
77 77
78 ~VaapiWrapper(); 78 ~VaapiWrapper();
79 79
80 // Create |num_surfaces| backing surfaces in driver for VASurfaces of 80 // Create |num_surfaces| backing surfaces in driver for VASurfaces, each
81 // |va_format|, each of size |size|. Returns true when successful, with the 81 // of size |size|. Returns true when successful, with the created IDs in
82 // created IDs in |va_surfaces| to be managed and later wrapped in 82 // |va_surfaces| to be managed and later wrapped in VASurfaces.
83 // VASurfaces.
84 // The client must DestroySurfaces() each time before calling this method 83 // The client must DestroySurfaces() each time before calling this method
85 // again to free the allocated surfaces first, but is not required to do so 84 // again to free the allocated surfaces first, but is not required to do so
86 // at destruction time, as this will be done automatically from 85 // at destruction time, as this will be done automatically from
87 // the destructor. 86 // the destructor.
88 bool CreateSurfaces(unsigned int va_format, 87 bool CreateSurfaces(const gfx::Size& size,
89 const gfx::Size& size,
90 size_t num_surfaces, 88 size_t num_surfaces,
91 std::vector<VASurfaceID>* va_surfaces); 89 std::vector<VASurfaceID>* va_surfaces);
92 90
93 // Free all memory allocated in CreateSurfaces. 91 // Free all memory allocated in CreateSurfaces.
94 void DestroySurfaces(); 92 void DestroySurfaces();
95 93
96 // Create a VASurface of |va_format|, |size| and using |va_attribs| 94 // Create a VASurface of |va_format|, |size| and using |va_attribs|
97 // attributes. The ownership of the surface is transferred to the 95 // attributes. The ownership of the surface is transferred to the
98 // caller. It differs from surfaces created using CreateSurfaces(), 96 // caller. It differs from surfaces created using CreateSurfaces(),
99 // where VaapiWrapper is the owner of the surfaces. 97 // where VaapiWrapper is the owner of the surfaces.
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 // Singleton variable to store supported profile information for encode and 353 // Singleton variable to store supported profile information for encode and
356 // decode. 354 // decode.
357 static base::LazyInstance<LazyProfileInfos> profile_infos_; 355 static base::LazyInstance<LazyProfileInfos> profile_infos_;
358 356
359 DISALLOW_COPY_AND_ASSIGN(VaapiWrapper); 357 DISALLOW_COPY_AND_ASSIGN(VaapiWrapper);
360 }; 358 };
361 359
362 } // namespace content 360 } // namespace content
363 361
364 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_ 362 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_
OLDNEW
« no previous file with comments | « content/common/gpu/media/vaapi_video_encode_accelerator.cc ('k') | content/common/gpu/media/vaapi_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698