Alistair Leslie-Hughes : include: Add MFSetAttributeSize/ MFSetAttributeRatio inline functions.

Alexandre Julliard julliard at winehq.org
Tue Jan 29 15:18:16 CST 2019


Module: wine
Branch: master
Commit: cffb77e95f472c7613e69716570ff981d81397f5
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=cffb77e95f472c7613e69716570ff981d81397f5

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Tue Jan 29 02:31:03 2019 +0000

include: Add MFSetAttributeSize/MFSetAttributeRatio inline functions.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/mfidl.idl | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/include/mfidl.idl b/include/mfidl.idl
index 2373e41..124ae3c 100644
--- a/include/mfidl.idl
+++ b/include/mfidl.idl
@@ -349,3 +349,14 @@ cpp_quote("#define MF_RESOLUTION_KEEP_BYTE_STREAM_ALIVE_ON_FAIL
 cpp_quote("#define MF_RESOLUTION_READ                                                  0x00010000")
 cpp_quote("#define MF_RESOLUTION_WRITE                                                 0x00020000")
 cpp_quote("#define MF_RESOLUTION_DISABLE_LOCAL_PLUGINS                                 0x00000040")
+
+cpp_quote("#ifdef __cplusplus")
+cpp_quote("static inline HRESULT MFSetAttributeSize(IMFAttributes *attributes, REFGUID key, UINT32 width, UINT32 height)")
+cpp_quote("{")
+cpp_quote("    return attributes->SetUINT64(key, ((UINT64)width << 32) | height);")
+cpp_quote("}")
+cpp_quote("static inline HRESULT MFSetAttributeRatio(IMFAttributes *attributes, REFGUID key, UINT32 numerator, UINT32 denominator)")
+cpp_quote("{")
+cpp_quote("    return attributes->SetUINT64(key, ((UINT64)numerator << 32) | denominator);")
+cpp_quote("}")
+cpp_quote("#endif")




More information about the wine-cvs mailing list