summaryrefslogtreecommitdiff
path: root/chromium/media/base/win/mf_helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/media/base/win/mf_helpers.h')
-rw-r--r--chromium/media/base/win/mf_helpers.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/chromium/media/base/win/mf_helpers.h b/chromium/media/base/win/mf_helpers.h
index aa56e5e437e..6bebf0310f5 100644
--- a/chromium/media/base/win/mf_helpers.h
+++ b/chromium/media/base/win/mf_helpers.h
@@ -13,6 +13,8 @@
#include "base/macros.h"
#include "media/base/win/mf_initializer_export.h"
+struct ID3D11DeviceChild;
+
namespace media {
// Helper function to print HRESULT to std::string.
@@ -62,6 +64,7 @@ class MF_INITIALIZER_EXPORT MediaBufferScopedPointer {
uint8_t* get() { return buffer_; }
DWORD current_length() const { return current_length_; }
+ DWORD max_length() const { return max_length_; }
private:
Microsoft::WRL::ComPtr<IMFMediaBuffer> media_buffer_;
@@ -72,24 +75,14 @@ class MF_INITIALIZER_EXPORT MediaBufferScopedPointer {
DISALLOW_COPY_AND_ASSIGN(MediaBufferScopedPointer);
};
-// Wrap around the usage of device handle from |device_manager|.
-class MF_INITIALIZER_EXPORT DXGIDeviceScopedHandle {
- public:
- explicit DXGIDeviceScopedHandle(IMFDXGIDeviceManager* device_manager);
- ~DXGIDeviceScopedHandle();
-
- HRESULT LockDevice(REFIID riid, void** device_out);
-
- private:
- Microsoft::WRL::ComPtr<IMFDXGIDeviceManager> device_manager_;
-
- HANDLE device_handle_ = INVALID_HANDLE_VALUE;
-};
-
// Copies |in_string| to |out_string| that is allocated with CoTaskMemAlloc().
MF_INITIALIZER_EXPORT HRESULT CopyCoTaskMemWideString(LPCWSTR in_string,
LPWSTR* out_string);
+// Set the debug name of a D3D11 resource for use with ETW debugging tools.
+// D3D11 retains the string passed to this function.
+MF_INITIALIZER_EXPORT HRESULT
+SetDebugName(ID3D11DeviceChild* d3d11_device_child, const char* debug_string);
} // namespace media
#endif // MEDIA_BASE_WIN_MF_HELPERS_H_