1
0
mirror of https://github.com/wine-mirror/wine synced 2024-06-29 06:14:34 +00:00

winegstreamer: Add AVDecVideoAcceleration_H264 attribute for h264 decoder MFT.

This commit is contained in:
Paul Gofman 2023-10-13 18:56:48 -06:00 committed by Alexandre Julliard
parent 984032823b
commit deff1303fb
3 changed files with 12 additions and 0 deletions

View File

@ -45,6 +45,8 @@
#include "initguid.h"
#include "codecapi.h"
#include "d3d11_4.h"
DEFINE_GUID(DMOVideoFormat_RGB24,D3DFMT_R8G8B8,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
@ -3933,6 +3935,7 @@ static void test_h264_decoder(void)
ATTR_UINT32(MF_SA_D3D11_AWARE, 1),
ATTR_UINT32(MFT_DECODER_EXPOSE_OUTPUT_TYPES_IN_NATIVE_ORDER, 0, .todo = TRUE),
/* more H264 decoder specific attributes from CODECAPI */
ATTR_UINT32(AVDecVideoAcceleration_H264, 1),
{0},
};
static const DWORD input_width = 120, input_height = 248;

View File

@ -26,6 +26,10 @@
#include "wine/debug.h"
#include "initguid.h"
#include "codecapi.h"
WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
WINE_DECLARE_DEBUG_CHANNEL(winediag);
@ -881,6 +885,9 @@ HRESULT h264_decoder_create(REFIID riid, void **ret)
goto failed;
if (FAILED(hr = IMFAttributes_SetUINT32(decoder->attributes, &MF_SA_D3D11_AWARE, TRUE)))
goto failed;
if (FAILED(hr = IMFAttributes_SetUINT32(decoder->attributes, &AVDecVideoAcceleration_H264, TRUE)))
goto failed;
if (FAILED(hr = MFCreateAttributes(&decoder->output_attributes, 0)))
goto failed;
if (FAILED(hr = wg_sample_queue_create(&decoder->wg_sample_queue)))

View File

@ -61,4 +61,6 @@ enum eAVEncH264VLevel
eAVEncH264VLevel5_2 = 52
};
DEFINE_GUID(AVDecVideoAcceleration_H264, 0xf7db8a2f, 0x4f48, 0x4ee8, 0xae, 0x31, 0x8b, 0x6e, 0xbe, 0x55, 0x8a, 0xe2);
#endif /* __CODECAPI_H */