Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
cb3358b6
Commit
cb3358b6
authored
Jun 01, 2017
by
Timo Rothenpieler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/nvenc: print minimum driver version on error
parent
2d978d1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
nvenc.c
libavcodec/nvenc.c
+14
-1
No files found.
libavcodec/nvenc.c
View file @
cb3358b6
...
@@ -112,6 +112,16 @@ static int nvenc_print_error(void *log_ctx, NVENCSTATUS err,
...
@@ -112,6 +112,16 @@ static int nvenc_print_error(void *log_ctx, NVENCSTATUS err,
return
ret
;
return
ret
;
}
}
static
void
nvenc_print_driver_requirement
(
AVCodecContext
*
avctx
,
int
level
)
{
#if defined(_WIN32) || defined(__CYGWIN__)
const
char
*
minver
=
"378.66"
;
#else
const
char
*
minver
=
"378.13"
;
#endif
av_log
(
avctx
,
level
,
"The minimum required Nvidia driver for nvenc is %s or newer
\n
"
,
minver
);
}
static
av_cold
int
nvenc_load_libraries
(
AVCodecContext
*
avctx
)
static
av_cold
int
nvenc_load_libraries
(
AVCodecContext
*
avctx
)
{
{
NvencContext
*
ctx
=
avctx
->
priv_data
;
NvencContext
*
ctx
=
avctx
->
priv_data
;
...
@@ -125,8 +135,10 @@ static av_cold int nvenc_load_libraries(AVCodecContext *avctx)
...
@@ -125,8 +135,10 @@ static av_cold int nvenc_load_libraries(AVCodecContext *avctx)
return
ret
;
return
ret
;
ret
=
nvenc_load_functions
(
&
dl_fn
->
nvenc_dl
);
ret
=
nvenc_load_functions
(
&
dl_fn
->
nvenc_dl
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
nvenc_print_driver_requirement
(
avctx
,
AV_LOG_ERROR
);
return
ret
;
return
ret
;
}
err
=
dl_fn
->
nvenc_dl
->
NvEncodeAPIGetMaxSupportedVersion
(
&
nvenc_max_ver
);
err
=
dl_fn
->
nvenc_dl
->
NvEncodeAPIGetMaxSupportedVersion
(
&
nvenc_max_ver
);
if
(
err
!=
NV_ENC_SUCCESS
)
if
(
err
!=
NV_ENC_SUCCESS
)
...
@@ -139,6 +151,7 @@ static av_cold int nvenc_load_libraries(AVCodecContext *avctx)
...
@@ -139,6 +151,7 @@ static av_cold int nvenc_load_libraries(AVCodecContext *avctx)
"Required: %d.%d Found: %d.%d
\n
"
,
"Required: %d.%d Found: %d.%d
\n
"
,
NVENCAPI_MAJOR_VERSION
,
NVENCAPI_MINOR_VERSION
,
NVENCAPI_MAJOR_VERSION
,
NVENCAPI_MINOR_VERSION
,
nvenc_max_ver
>>
4
,
nvenc_max_ver
&
0xf
);
nvenc_max_ver
>>
4
,
nvenc_max_ver
&
0xf
);
nvenc_print_driver_requirement
(
avctx
,
AV_LOG_ERROR
);
return
AVERROR
(
ENOSYS
);
return
AVERROR
(
ENOSYS
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment