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

Unified Diff: content/common/gpu/media/dxva_video_decode_accelerator_win.h

Issue 1851713002: Add support for detecting the maximum resolution supported by the GPU for H.264 videos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove newline Created 4 years, 9 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: content/common/gpu/media/dxva_video_decode_accelerator_win.h
diff --git a/content/common/gpu/media/dxva_video_decode_accelerator_win.h b/content/common/gpu/media/dxva_video_decode_accelerator_win.h
index 950eda5a090cd079a7bcd1f510722562b1236304..b050a71d0dd63f5da9425f13a9eaabcc30b26c23 100644
--- a/content/common/gpu/media/dxva_video_decode_accelerator_win.h
+++ b/content/common/gpu/media/dxva_video_decode_accelerator_win.h
@@ -7,6 +7,7 @@
#include <d3d11.h>
#include <d3d9.h>
+#include <initguid.h>
#include <stdint.h>
// Work around bug in this header by disabling the relevant warning for it.
// https://connect.microsoft.com/VisualStudio/feedback/details/911260/dxva2api-h-in-win8-sdk-triggers-c4201-with-w4
@@ -127,6 +128,24 @@ class CONTENT_EXPORT DXVAVideoDecodeAccelerator
typedef void* EGLConfig;
typedef void* EGLSurface;
+ // Returns the minimum resolution for the |profile| passed in.
+ static std::pair<int, int> GetMinResolution(
+ const media::VideoCodecProfile profile);
+
+ // Returns the maximum resolution for the |profile| passed in.
+ static std::pair<int, int> GetMaxResolution(
+ const media::VideoCodecProfile profile);
+
+ // Returns the maximum resolution for H264 video.
+ static std::pair<int, int> GetMaxH264Resolution();
+
+ // Helper function for create a D3D11 device and context.
+ // The device is returned in the |device| parameter.
+ // The context is returned in the |context| parameter. It can be null.
+ // Returns S_OK on success.
+ static HRESULT CreateD3D11DeviceHelper(ID3D11Device** device,
+ ID3D11DeviceContext** context);
+
// Creates and initializes an instance of the D3D device and the
// corresponding device manager. The device manager instance is eventually
// passed to the IMFTransform interface implemented by the decoder.

Powered by Google App Engine
This is Rietveld 408576698