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

Unified Diff: media/gpu/vaapi_wrapper.h

Issue 1882373004: Migrate content/common/gpu/media code to media/gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix several more bot-identified build issues Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: media/gpu/vaapi_wrapper.h
diff --git a/content/common/gpu/media/vaapi_wrapper.h b/media/gpu/vaapi_wrapper.h
similarity index 96%
rename from content/common/gpu/media/vaapi_wrapper.h
rename to media/gpu/vaapi_wrapper.h
index 4394bc36b928ebf12d39b8bbb4a22af738bf8537..e5f84a4f92d211f925711df821e6b0d3789787a9 100644
--- a/content/common/gpu/media/vaapi_wrapper.h
+++ b/media/gpu/vaapi_wrapper.h
@@ -7,8 +7,8 @@
// and VaapiVideoEncodeAccelerator for encode, to interface
// with libva (VA-API library for hardware video codec).
-#ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_
-#define CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_
+#ifndef MEDIA_GPU_VAAPI_WRAPPER_H_
+#define MEDIA_GPU_VAAPI_WRAPPER_H_
#include <stddef.h>
#include <stdint.h>
@@ -21,16 +21,17 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
-#include "content/common/content_export.h"
-#include "content/common/gpu/media/va_surface.h"
#include "media/base/video_decoder_config.h"
#include "media/base/video_frame.h"
+#include "media/gpu/media_gpu_export.h"
+#include "media/gpu/va_surface.h"
#include "media/video/jpeg_decode_accelerator.h"
#include "media/video/video_decode_accelerator.h"
#include "media/video/video_encode_accelerator.h"
#include "third_party/libva/va/va.h"
#include "third_party/libva/va/va_vpp.h"
#include "ui/gfx/geometry/size.h"
+
#if defined(USE_X11)
#include "third_party/libva/va/va_x11.h"
#endif // USE_X11
@@ -41,7 +42,7 @@ class NativePixmap;
}
#endif
-namespace content {
+namespace media {
// This class handles VA-API calls and ensures proper locking of VA-API calls
// to libva, the userspace shim to the HW codec driver. libva is not
@@ -53,7 +54,7 @@ namespace content {
// It is also responsible for managing and freeing VABuffers (not VASurfaces),
// which are used to queue parameters and slice data to the HW codec,
// as well as underlying memory for VASurfaces themselves.
-class CONTENT_EXPORT VaapiWrapper
+class MEDIA_GPU_EXPORT VaapiWrapper
: public base::RefCountedThreadSafe<VaapiWrapper> {
public:
enum CodecMode {
@@ -81,11 +82,11 @@ class CONTENT_EXPORT VaapiWrapper
// Return the supported video encode profiles.
static media::VideoEncodeAccelerator::SupportedProfiles
- GetSupportedEncodeProfiles();
+ GetSupportedEncodeProfiles();
// Return the supported video decode profiles.
static media::VideoDecodeAccelerator::SupportedProfiles
- GetSupportedDecodeProfiles();
+ GetSupportedDecodeProfiles();
// Return true when JPEG decode is supported.
static bool IsJpegDecodeSupported();
@@ -309,11 +310,10 @@ class CONTENT_EXPORT VaapiWrapper
// Get maximum resolution for |va_profile| and |entrypoint| with
// |required_attribs|. If return value is true, |resolution| is the maximum
// resolution. |va_lock_| must be held on entry.
- bool GetMaxResolution_Locked(
- VAProfile va_profile,
- VAEntrypoint entrypoint,
- std::vector<VAConfigAttrib>& required_attribs,
- gfx::Size* resolution);
+ bool GetMaxResolution_Locked(VAProfile va_profile,
+ VAEntrypoint entrypoint,
+ std::vector<VAConfigAttrib>& required_attribs,
+ gfx::Size* resolution);
// Destroys a |va_surface| created using CreateUnownedSurface.
void DestroyUnownedSurface(VASurfaceID va_surface_id);
@@ -393,6 +393,6 @@ class CONTENT_EXPORT VaapiWrapper
DISALLOW_COPY_AND_ASSIGN(VaapiWrapper);
};
-} // namespace content
+} // namespace media
-#endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_
+#endif // MEDIA_GPU_VAAPI_WRAPPER_H_

Powered by Google App Engine
This is Rietveld 408576698