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
a64248d1
Commit
a64248d1
authored
Jul 02, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavu/opt: show default values
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
4943eff2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
opt.c
libavutil/opt.c
+34
-0
No files found.
libavutil/opt.c
View file @
a64248d1
...
@@ -936,6 +936,40 @@ static void opt_list(void *obj, void *av_log_obj, const char *unit,
...
@@ -936,6 +936,40 @@ static void opt_list(void *obj, void *av_log_obj, const char *unit,
av_opt_freep_ranges
(
&
r
);
av_opt_freep_ranges
(
&
r
);
}
}
if
(
opt
->
type
!=
AV_OPT_TYPE_CONST
&&
opt
->
type
!=
AV_OPT_TYPE_BINARY
&&
!
((
opt
->
type
==
AV_OPT_TYPE_COLOR
||
opt
->
type
==
AV_OPT_TYPE_IMAGE_SIZE
||
opt
->
type
==
AV_OPT_TYPE_STRING
||
opt
->
type
==
AV_OPT_TYPE_VIDEO_RATE
)
&&
!
opt
->
default_val
.
str
))
{
av_log
(
av_log_obj
,
AV_LOG_INFO
,
" (default "
);
switch
(
opt
->
type
)
{
case
AV_OPT_TYPE_FLAGS
:
av_log
(
av_log_obj
,
AV_LOG_INFO
,
"%0llX"
,
opt
->
default_val
.
i64
);
break
;
case
AV_OPT_TYPE_DURATION
:
case
AV_OPT_TYPE_INT
:
case
AV_OPT_TYPE_INT64
:
log_value
(
av_log_obj
,
AV_LOG_INFO
,
opt
->
default_val
.
i64
);
break
;
case
AV_OPT_TYPE_DOUBLE
:
case
AV_OPT_TYPE_FLOAT
:
log_value
(
av_log_obj
,
AV_LOG_INFO
,
opt
->
default_val
.
dbl
);
break
;
case
AV_OPT_TYPE_RATIONAL
:
{
AVRational
q
=
av_d2q
(
opt
->
default_val
.
dbl
,
INT_MAX
);
av_log
(
av_log_obj
,
AV_LOG_INFO
,
"%d/%d"
,
q
.
num
,
q
.
den
);
}
break
;
case
AV_OPT_TYPE_COLOR
:
case
AV_OPT_TYPE_IMAGE_SIZE
:
case
AV_OPT_TYPE_STRING
:
case
AV_OPT_TYPE_VIDEO_RATE
:
av_log
(
av_log_obj
,
AV_LOG_INFO
,
"
\"
%s
\"
"
,
opt
->
default_val
.
str
);
}
av_log
(
av_log_obj
,
AV_LOG_INFO
,
")"
);
}
av_log
(
av_log_obj
,
AV_LOG_INFO
,
"
\n
"
);
av_log
(
av_log_obj
,
AV_LOG_INFO
,
"
\n
"
);
if
(
opt
->
unit
&&
opt
->
type
!=
AV_OPT_TYPE_CONST
)
{
if
(
opt
->
unit
&&
opt
->
type
!=
AV_OPT_TYPE_CONST
)
{
opt_list
(
obj
,
av_log_obj
,
opt
->
unit
,
req_flags
,
rej_flags
);
opt_list
(
obj
,
av_log_obj
,
opt
->
unit
,
req_flags
,
rej_flags
);
...
...
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