File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,9 @@ GUID CodecGuid(const Codec codec) {
236
236
switch (codec) {
237
237
case Codec::H264: return NV_ENC_CODEC_H264_GUID;
238
238
case Codec::HEVC: return NV_ENC_CODEC_HEVC_GUID;
239
+ #if (NVENCAPI_MAJOR_VERSION >= 12)
240
+ case Codec::AV1: return NV_ENC_CODEC_AV1_GUID;
241
+ #endif
239
242
default : break ;
240
243
}
241
244
std::string msg = " Unknown codec: cudacodec::VideoWriter only supports CODEC_VW::H264 and CODEC_VW::HEVC" ;
@@ -318,7 +321,9 @@ GUID EncodingPresetGuid(const EncodePreset nvPreset) {
318
321
std::string GetVideoCodecString (const GUID codec) {
319
322
if (codec == NV_ENC_CODEC_H264_GUID) return " AVC/H.264" ;
320
323
else if (codec == NV_ENC_CODEC_HEVC_GUID) return " H.265/HEVC" ;
324
+ #if (NVENCAPI_MAJOR_VERSION >= 12)
321
325
else if (codec == NV_ENC_CODEC_AV1_GUID) return " AV1" ;
326
+ #endif
322
327
else return " Unknown" ;
323
328
}
324
329
You can’t perform that action at this time.
0 commit comments