On 08.05.2018 23:00, James Almer wrote:
> On 5/8/2018 3:36 PM, Timo Rothenpieler wrote:
>> ---
>> configure | 6 ++++--
>> doc/APIchanges | 3 +++
>> libavutil/hwcontext_cuda.c | 3 +++
>> libavutil/hwcontext_cuda.h | 1 +
>> libavutil/version.h | 2 +-
>> 5 files changed, 12 insertions(+), 3 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 6626111ff2..9743de05d0 100755
>> --- a/configure
>> +++ b/configure
>> @@ -5887,8 +5887,10 @@ check_type "va/va.h va/va_enc_vp9.h"
>> "VAEncPictureParameterBufferVP9"
>> check_type "vdpau/vdpau.h" "VdpPictureInfoHEVC"
>>
>> if ! disabled ffnvcodec; then
>> - check_pkg_config ffnvcodec "ffnvcodec >= 8.0.14.1" \
>> - "ffnvcodec/nvEncodeAPI.h ffnvcodec/dynlink_cuda.h
>> ffnvcodec/dynlink_cuviddec.h ffnvcodec/dynlink_nvcuvid.h" ""
>> + check_pkg_config ffnvcodec "ffnvcodec >= 8.1.24.2" \
>> + "ffnvcodec/nvEncodeAPI.h ffnvcodec/dynlink_cuda.h
>> ffnvcodec/dynlink_cuviddec.h ffnvcodec/dynlink_nvcuvid.h" "" || \
>> + { test_pkg_config ffnvcodec_tmp "ffnvcodec < 8.1" "" "" &&
>> check_pkg_config ffnvcodec "ffnvcodec >= 8.0.14.2" \
>> + "ffnvcodec/nvEncodeAPI.h ffnvcodec/dynlink_cuda.h
>> ffnvcodec/dynlink_cuviddec.h ffnvcodec/dynlink_nvcuvid.h" ""; }
>
> ffnvcodec_tmp?I haven't found a more elegant way to do this. Basically, the version requirement is ffnvcodec >= 8.1.24.2 || (ffnvcodec < 8.1 && ffnvcodec >= 8.0.14.2) As < 8.1 would also match 8.0.14.1, it must not enable ffnvcodec, which is why i appended the _tmp. pkg-config does not seem able to evaluate such complex version checks, and there is no lower level function than test_pkg_config.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ ffmpeg-devel mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
