mfplat: Added MFCreateAudioMediaType().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4ac1c48e9d
commit
85d4cabc84
|
@ -3063,6 +3063,33 @@ HRESULT WINAPI MFCreateVideoMediaTypeFromSubtype(const GUID *subtype, IMFVideoMe
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* MFCreateAudioMediaType (mfplat.@)
|
||||
*/
|
||||
HRESULT WINAPI MFCreateAudioMediaType(const WAVEFORMATEX *format, IMFAudioMediaType **media_type)
|
||||
{
|
||||
struct media_type *object;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("%p, %p.\n", format, media_type);
|
||||
|
||||
if (!media_type)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (FAILED(hr = create_media_type(&object)))
|
||||
return hr;
|
||||
|
||||
if (FAILED(hr = MFInitMediaTypeFromWaveFormatEx(&object->IMFMediaType_iface, format, sizeof(*format) + format->cbSize)))
|
||||
{
|
||||
IMFMediaType_Release(&object->IMFMediaType_iface);
|
||||
return hr;
|
||||
}
|
||||
|
||||
*media_type = &object->IMFAudioMediaType_iface;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static void media_type_get_ratio(IMFMediaType *media_type, const GUID *attr, UINT32 *numerator,
|
||||
UINT32 *denominator)
|
||||
{
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
@ stdcall MFCreateAlignedMemoryBuffer(long long ptr)
|
||||
@ stdcall MFCreateAsyncResult(ptr ptr ptr ptr) rtworkq.RtwqCreateAsyncResult
|
||||
@ stdcall MFCreateAttributes(ptr long)
|
||||
@ stub MFCreateAudioMediaType
|
||||
@ stdcall MFCreateAudioMediaType(ptr ptr)
|
||||
@ stdcall MFCreateCollection(ptr)
|
||||
@ stdcall MFCreateDXGIDeviceManager(ptr ptr)
|
||||
@ stdcall MFCreateDXGISurfaceBuffer(ptr ptr long long ptr)
|
||||
|
|
|
@ -508,6 +508,7 @@ HRESULT WINAPI MFCreate2DMediaBuffer(DWORD width, DWORD height, DWORD fourcc, BO
|
|||
HRESULT WINAPI MFCreateAlignedMemoryBuffer(DWORD max_length, DWORD alignment, IMFMediaBuffer **buffer);
|
||||
HRESULT WINAPI MFCreateAttributes(IMFAttributes **attributes, UINT32 size);
|
||||
HRESULT WINAPI MFCreateAsyncResult(IUnknown *object, IMFAsyncCallback *callback, IUnknown *state, IMFAsyncResult **result);
|
||||
HRESULT WINAPI MFCreateAudioMediaType(const WAVEFORMATEX *audioformat, IMFAudioMediaType **mediatype);
|
||||
HRESULT WINAPI MFCreateCollection(IMFCollection **collection);
|
||||
HRESULT WINAPI MFCreateDXGIDeviceManager(UINT *token, IMFDXGIDeviceManager **manager);
|
||||
HRESULT WINAPI MFCreateDXGISurfaceBuffer(REFIID riid, IUnknown *surface, UINT subresource, BOOL bottomup,
|
||||
|
|
Loading…
Reference in New Issue