mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
mediafoundation: Test compile steps v/s step , and set build flag
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15244
Backport-to: *
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41221>
(cherry picked from commit c5b184a02a)
This commit is contained in:
parent
001efa73d1
commit
41c7c287db
3 changed files with 34 additions and 1 deletions
|
|
@ -3174,7 +3174,7 @@
|
|||
"description": "mediafoundation: Test compile steps v/s step , and set build flag",
|
||||
"nominated": true,
|
||||
"nomination_type": 4,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -958,7 +958,11 @@ CDX12EncHMFT::GetValue( const GUID *Api, VARIANT *Value )
|
|||
hevcDeltaQPSettings.dataType = CODEC_API_QP_MAP_INT8;
|
||||
hevcDeltaQPSettings.minValue = static_cast<INT16>( m_uiMinQP );
|
||||
hevcDeltaQPSettings.maxValue = static_cast<INT16>( m_uiMaxQP );
|
||||
#if defined(INPUTQPSETTINGS_HAS_STEPS)
|
||||
hevcDeltaQPSettings.steps = 1;
|
||||
#else
|
||||
hevcDeltaQPSettings.step = 1;
|
||||
#endif
|
||||
|
||||
SAFEARRAYBOUND bound = { static_cast<ULONG>( sizeof( hevcDeltaQPSettings ) ),
|
||||
static_cast<LONG>( 0 ) }; // cElements , lower bound
|
||||
|
|
|
|||
|
|
@ -47,6 +47,35 @@ if get_option('mediafoundation-store-dll')
|
|||
mf_cpp_args += '-DBUILD_FOR_MSDK' # Can use #if BUILD_FOR_MSDK in .cpp code
|
||||
endif
|
||||
|
||||
# InputQPSettings::step was renamed to ::steps in BR (Bromine) SDK
|
||||
# Probe which field name the installed SDK exposes.
|
||||
_inputqp_has_steps = cc.compiles(
|
||||
'''
|
||||
#include <windows.h>
|
||||
#include <mfapi.h>
|
||||
void test() { InputQPSettings s; (void)s.steps; }
|
||||
''',
|
||||
name : 'InputQPSettings::steps present',
|
||||
)
|
||||
if _inputqp_has_steps
|
||||
message('InputQPSettings: using field "steps"')
|
||||
mf_cpp_args += '-DINPUTQPSETTINGS_HAS_STEPS'
|
||||
else
|
||||
_inputqp_has_step = cc.compiles(
|
||||
'''
|
||||
#include <windows.h>
|
||||
#include <mfapi.h>
|
||||
void test() { InputQPSettings s; (void)s.step; }
|
||||
''',
|
||||
name : 'InputQPSettings::step present',
|
||||
)
|
||||
if _inputqp_has_step
|
||||
message('InputQPSettings: using field "step"')
|
||||
else
|
||||
error('InputQPSettings has neither "steps" nor "step" — unsupported Windows SDK version')
|
||||
endif
|
||||
endif
|
||||
|
||||
mediafoundation_files = files(
|
||||
'codecapi.cpp',
|
||||
'encode.cpp',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue