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
a839dbb9
Commit
a839dbb9
authored
Mar 26, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dvenc: print allowed profiles if the video doesn't conform to any of them.
parent
3c6607eb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
dv.c
libavcodec/dv.c
+4
-2
dvdata.c
libavcodec/dvdata.c
+12
-0
dvdata.h
libavcodec/dvdata.h
+5
-0
No files found.
libavcodec/dv.c
View file @
a839dbb9
...
...
@@ -323,9 +323,11 @@ av_cold int ff_dvvideo_init(AVCodecContext *avctx)
static
av_cold
int
dvvideo_init_encoder
(
AVCodecContext
*
avctx
)
{
if
(
!
avpriv_dv_codec_profile
(
avctx
))
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Found no DV profile for %ix%i %s video
\n
"
,
av_log
(
avctx
,
AV_LOG_ERROR
,
"Found no DV profile for %ix%i %s video. "
"Valid DV profiles are:
\n
"
,
avctx
->
width
,
avctx
->
height
,
av_get_pix_fmt_name
(
avctx
->
pix_fmt
));
return
-
1
;
ff_dv_print_profiles
(
avctx
,
AV_LOG_ERROR
);
return
AVERROR
(
EINVAL
);
}
return
ff_dvvideo_init
(
avctx
);
...
...
libavcodec/dvdata.c
View file @
a839dbb9
...
...
@@ -25,6 +25,7 @@
*/
#include "libavutil/rational.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "dvdata.h"
...
...
@@ -322,3 +323,14 @@ const DVprofile* avpriv_dv_codec_profile(AVCodecContext* codec)
return
NULL
;
}
void
ff_dv_print_profiles
(
void
*
logctx
,
int
loglevel
)
{
int
i
;
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
dv_profiles
);
i
++
)
{
const
DVprofile
*
p
=
&
dv_profiles
[
i
];
av_log
(
logctx
,
loglevel
,
"Frame size: %dx%d; pixel format: %s, "
"framerate: %d/%d
\n
"
,
p
->
width
,
p
->
height
,
av_get_pix_fmt_name
(
p
->
pix_fmt
),
p
->
time_base
.
den
,
p
->
time_base
.
num
);
}
}
libavcodec/dvdata.h
View file @
a839dbb9
...
...
@@ -154,4 +154,9 @@ static inline void dv_calculate_mb_xy(DVVideoContext *s, DVwork_chunk *work_chun
}
}
/**
* Print all allowed DV profiles into logctx at specified logging level.
*/
void
ff_dv_print_profiles
(
void
*
logctx
,
int
loglevel
);
#endif
/* AVCODEC_DVDATA_H */
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