mfplat: Implement GetVideoFormat().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7171a63f06
commit
cb43efe901
|
@ -38,6 +38,7 @@ struct media_type
|
||||||
struct attributes attributes;
|
struct attributes attributes;
|
||||||
IMFMediaType IMFMediaType_iface;
|
IMFMediaType IMFMediaType_iface;
|
||||||
IMFVideoMediaType IMFVideoMediaType_iface;
|
IMFVideoMediaType IMFVideoMediaType_iface;
|
||||||
|
MFVIDEOFORMAT *video_format;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct stream_desc
|
struct stream_desc
|
||||||
|
@ -648,6 +649,7 @@ static ULONG WINAPI video_mediatype_Release(IMFVideoMediaType *iface)
|
||||||
if (!refcount)
|
if (!refcount)
|
||||||
{
|
{
|
||||||
clear_attributes_object(&media_type->attributes);
|
clear_attributes_object(&media_type->attributes);
|
||||||
|
CoTaskMemFree(media_type->video_format);
|
||||||
heap_free(media_type);
|
heap_free(media_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -971,9 +973,17 @@ static HRESULT WINAPI video_mediatype_FreeRepresentation(IMFVideoMediaType *ifac
|
||||||
|
|
||||||
static const MFVIDEOFORMAT * WINAPI video_mediatype_GetVideoFormat(IMFVideoMediaType *iface)
|
static const MFVIDEOFORMAT * WINAPI video_mediatype_GetVideoFormat(IMFVideoMediaType *iface)
|
||||||
{
|
{
|
||||||
FIXME("%p.\n", iface);
|
struct media_type *media_type = impl_from_IMFVideoMediaType(iface);
|
||||||
|
unsigned int size;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
return NULL;
|
TRACE("%p.\n", iface);
|
||||||
|
|
||||||
|
CoTaskMemFree(media_type->video_format);
|
||||||
|
if (FAILED(hr = MFCreateMFVideoFormatFromMFMediaType((IMFMediaType *)iface, &media_type->video_format, &size)))
|
||||||
|
WARN("Failed to create format description, hr %#x.\n", hr);
|
||||||
|
|
||||||
|
return media_type->video_format;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI video_mediatype_GetVideoRepresentation(IMFVideoMediaType *iface, GUID representation,
|
static HRESULT WINAPI video_mediatype_GetVideoRepresentation(IMFVideoMediaType *iface, GUID representation,
|
||||||
|
|
Loading…
Reference in New Issue