Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
8e07c22e
Commit
8e07c22e
authored
8 years ago
by
Anton Khirnov
Browse files
Options
Downloads
Patches
Plain Diff
qsvenc: print warnings from encode/init
parent
0956fd46
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
libavcodec/qsv.c
+10
-0
10 additions, 0 deletions
libavcodec/qsv.c
libavcodec/qsv_internal.h
+3
-0
3 additions, 0 deletions
libavcodec/qsv_internal.h
libavcodec/qsvenc.c
+6
-0
6 additions, 0 deletions
libavcodec/qsvenc.c
with
19 additions
and
0 deletions
libavcodec/qsv.c
+
10
−
0
View file @
8e07c22e
...
@@ -117,6 +117,16 @@ int ff_qsv_print_error(void *log_ctx, mfxStatus err,
...
@@ -117,6 +117,16 @@ int ff_qsv_print_error(void *log_ctx, mfxStatus err,
return
ret
;
return
ret
;
}
}
int
ff_qsv_print_warning
(
void
*
log_ctx
,
mfxStatus
err
,
const
char
*
warning_string
)
{
const
char
*
desc
;
int
ret
;
ret
=
ff_qsv_map_error
(
err
,
&
desc
);
av_log
(
log_ctx
,
AV_LOG_WARNING
,
"%s: %s (%d)
\n
"
,
warning_string
,
desc
,
err
);
return
ret
;
}
int
ff_qsv_map_pixfmt
(
enum
AVPixelFormat
format
,
uint32_t
*
fourcc
)
int
ff_qsv_map_pixfmt
(
enum
AVPixelFormat
format
,
uint32_t
*
fourcc
)
{
{
switch
(
format
)
{
switch
(
format
)
{
...
...
This diff is collapsed.
Click to expand it.
libavcodec/qsv_internal.h
+
3
−
0
View file @
8e07c22e
...
@@ -62,6 +62,9 @@ int ff_qsv_map_error(mfxStatus mfx_err, const char **desc);
...
@@ -62,6 +62,9 @@ int ff_qsv_map_error(mfxStatus mfx_err, const char **desc);
int
ff_qsv_print_error
(
void
*
log_ctx
,
mfxStatus
err
,
int
ff_qsv_print_error
(
void
*
log_ctx
,
mfxStatus
err
,
const
char
*
error_string
);
const
char
*
error_string
);
int
ff_qsv_print_warning
(
void
*
log_ctx
,
mfxStatus
err
,
const
char
*
warning_string
);
int
ff_qsv_codec_id_to_mfx
(
enum
AVCodecID
codec_id
);
int
ff_qsv_codec_id_to_mfx
(
enum
AVCodecID
codec_id
);
int
ff_qsv_map_pixfmt
(
enum
AVPixelFormat
format
,
uint32_t
*
fourcc
);
int
ff_qsv_map_pixfmt
(
enum
AVPixelFormat
format
,
uint32_t
*
fourcc
);
...
...
This diff is collapsed.
Click to expand it.
libavcodec/qsvenc.c
+
6
−
0
View file @
8e07c22e
...
@@ -794,6 +794,9 @@ int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext *q)
...
@@ -794,6 +794,9 @@ int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext *q)
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ff_qsv_print_error
(
avctx
,
ret
,
return
ff_qsv_print_error
(
avctx
,
ret
,
"Error initializing the encoder"
);
"Error initializing the encoder"
);
else
if
(
ret
>
0
)
ff_qsv_print_warning
(
avctx
,
ret
,
"Warning in encoder initialization"
);
ret
=
qsv_retrieve_enc_params
(
avctx
,
q
);
ret
=
qsv_retrieve_enc_params
(
avctx
,
q
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
...
@@ -974,6 +977,9 @@ static int encode_frame(AVCodecContext *avctx, QSVEncContext *q,
...
@@ -974,6 +977,9 @@ static int encode_frame(AVCodecContext *avctx, QSVEncContext *q,
av_usleep
(
1
);
av_usleep
(
1
);
}
while
(
ret
==
MFX_WRN_DEVICE_BUSY
||
ret
==
MFX_WRN_IN_EXECUTION
);
}
while
(
ret
==
MFX_WRN_DEVICE_BUSY
||
ret
==
MFX_WRN_IN_EXECUTION
);
if
(
ret
>
0
)
ff_qsv_print_warning
(
avctx
,
ret
,
"Warning during encoding"
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
av_packet_unref
(
&
new_pkt
);
av_packet_unref
(
&
new_pkt
);
av_freep
(
&
bs
);
av_freep
(
&
bs
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment