Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
ab0ef1ab
Commit
ab0ef1ab
authored
Sep 27, 2019
by
Timo Rothenpieler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/nvenc: make use of new GetLastErrorString function
Signed-off-by:
Timo Rothenpieler
<
timo@rothenpieler.org
>
parent
51a23343
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
nvenc.c
libavcodec/nvenc.c
+14
-4
nvenc.h
libavcodec/nvenc.h
+1
-0
No files found.
libavcodec/nvenc.c
View file @
ab0ef1ab
...
@@ -110,13 +110,23 @@ static int nvenc_map_error(NVENCSTATUS err, const char **desc)
...
@@ -110,13 +110,23 @@ static int nvenc_map_error(NVENCSTATUS err, const char **desc)
return
AVERROR_UNKNOWN
;
return
AVERROR_UNKNOWN
;
}
}
static
int
nvenc_print_error
(
void
*
log_
ctx
,
NVENCSTATUS
err
,
static
int
nvenc_print_error
(
AVCodecContext
*
av
ctx
,
NVENCSTATUS
err
,
const
char
*
error_string
)
const
char
*
error_string
)
{
{
const
char
*
desc
;
const
char
*
desc
;
int
ret
;
const
char
*
details
=
"(no details)"
;
ret
=
nvenc_map_error
(
err
,
&
desc
);
int
ret
=
nvenc_map_error
(
err
,
&
desc
);
av_log
(
log_ctx
,
AV_LOG_ERROR
,
"%s: %s (%d)
\n
"
,
error_string
,
desc
,
err
);
#ifdef NVENC_HAVE_GETLASTERRORSTRING
NvencContext
*
ctx
=
avctx
->
priv_data
;
NV_ENCODE_API_FUNCTION_LIST
*
p_nvenc
=
&
ctx
->
nvenc_dload_funcs
.
nvenc_funcs
;
if
(
p_nvenc
&&
ctx
->
nvencoder
)
details
=
p_nvenc
->
nvEncGetLastErrorString
(
ctx
->
nvencoder
);
#endif
av_log
(
avctx
,
AV_LOG_ERROR
,
"%s: %s (%d): %s
\n
"
,
error_string
,
desc
,
err
,
details
);
return
ret
;
return
ret
;
}
}
...
...
libavcodec/nvenc.h
View file @
ab0ef1ab
...
@@ -58,6 +58,7 @@ typedef void ID3D11Device;
...
@@ -58,6 +58,7 @@ typedef void ID3D11Device;
#if NVENCAPI_CHECK_VERSION(9, 1)
#if NVENCAPI_CHECK_VERSION(9, 1)
#define NVENC_HAVE_MULTIPLE_REF_FRAMES
#define NVENC_HAVE_MULTIPLE_REF_FRAMES
#define NVENC_HAVE_CUSTREAM_PTR
#define NVENC_HAVE_CUSTREAM_PTR
#define NVENC_HAVE_GETLASTERRORSTRING
#endif
#endif
typedef
struct
NvencSurface
typedef
struct
NvencSurface
...
...
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