27#include <kiwano/core/Library.h>
30#include <mfreadwrite.h>
32#ifndef KGE_DOXYGEN_DO_NOT_INCLUDE
40class KGE_API MediaFoundation
43 static inline MediaFoundation& Get()
45 static MediaFoundation instance;
50 typedef HRESULT(WINAPI* PFN_MFStartup)(ULONG, DWORD);
51 typedef HRESULT(WINAPI* PFN_MFShutdown)();
52 typedef HRESULT(WINAPI* PFN_MFCreateMediaType)(IMFMediaType**);
53 typedef HRESULT(WINAPI* PFN_MFCreateWaveFormatExFromMFMediaType)(IMFMediaType*, WAVEFORMATEX**, UINT32*, UINT32);
54 typedef HRESULT(WINAPI* PFN_MFCreateSourceReaderFromURL)(LPCWSTR, IMFAttributes*, IMFSourceReader**);
55 typedef HRESULT(WINAPI* PFN_MFCreateSourceReaderFromByteStream)(IMFByteStream*, IMFAttributes*, IMFSourceReader**);
56 typedef HRESULT(WINAPI* PFN_MFCreateMFByteStreamOnStream)(IStream*, IMFByteStream**);
58 PFN_MFStartup MFStartup;
59 PFN_MFShutdown MFShutdown;
60 PFN_MFCreateMediaType MFCreateMediaType;
61 PFN_MFCreateWaveFormatExFromMFMediaType MFCreateWaveFormatExFromMFMediaType;
62 PFN_MFCreateSourceReaderFromURL MFCreateSourceReaderFromURL;
63 PFN_MFCreateSourceReaderFromByteStream MFCreateSourceReaderFromByteStream;
64 PFN_MFCreateMFByteStreamOnStream MFCreateMFByteStreamOnStream;
69 MediaFoundation(
const MediaFoundation&) =
delete;
70 MediaFoundation& operator=(
const MediaFoundation&) =
delete;