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
8271f55b
Commit
8271f55b
authored
May 26, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avprobe: restore pseudo-INI old style format for compatibility.
parent
d30acfa9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
3 deletions
+63
-3
Changelog
Changelog
+2
-1
avprobe.c
avprobe.c
+50
-0
avprobe.texi
doc/avprobe.texi
+11
-2
No files found.
Changelog
View file @
8271f55b
...
...
@@ -21,7 +21,8 @@ version <next>:
- add fps filter
- audio split filter
- audio mix filter
- avprobe output is now standard INI or JSON.
- avprobe output is now standard INI or JSON. The old format can still
be used with -of old.
version 0.8:
...
...
avprobe.c
View file @
8271f55b
...
...
@@ -280,6 +280,50 @@ static void json_print_string(const char *key, const char *value)
avio_w8
(
probe_out
,
'\"'
);
}
/*
* old-style pseudo-INI
*/
static
void
old_print_object_header
(
const
char
*
name
)
{
char
*
str
,
*
p
;
if
(
!
strcmp
(
name
,
"tags"
))
return
;
str
=
p
=
av_strdup
(
name
);
while
(
*
p
)
{
*
p
=
toupper
(
*
p
);
p
++
;
}
avio_printf
(
probe_out
,
"[%s]
\n
"
,
str
);
av_freep
(
&
str
);
}
static
void
old_print_object_footer
(
const
char
*
name
)
{
char
*
str
,
*
p
;
if
(
!
strcmp
(
name
,
"tags"
))
return
;
str
=
p
=
av_strdup
(
name
);
while
(
*
p
)
{
*
p
=
toupper
(
*
p
);
p
++
;
}
avio_printf
(
probe_out
,
"[/%s]
\n
"
,
str
);
av_freep
(
&
str
);
}
static
void
old_print_string
(
const
char
*
key
,
const
char
*
value
)
{
if
(
!
strcmp
(
octx
.
prefix
[
octx
.
level
-
1
].
name
,
"tags"
))
avio_printf
(
probe_out
,
"TAG:"
);
ini_print_string
(
key
,
value
);
}
/*
* Simple Formatter for single entries.
*/
...
...
@@ -783,6 +827,12 @@ static int opt_output_format(const char *opt, const char *arg)
print_integer
=
ini_print_integer
;
print_string
=
ini_print_string
;
}
else
if
(
!
strcmp
(
arg
,
"old"
))
{
print_header
=
NULL
;
print_object_header
=
old_print_object_header
;
print_object_footer
=
old_print_object_footer
;
print_string
=
old_print_string
;
}
else
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Unsupported formatter %s
\n
"
,
arg
);
return
AVERROR
(
EINVAL
);
...
...
doc/avprobe.texi
View file @
8271f55b
...
...
@@ -59,8 +59,17 @@ parsers.
Force format to use.
@item -of @var
{
formatter
}
Use a specific formatter to output the document, either @var
{
ini
}
or
@var
{
json
}
available.
Use a specific formatter to output the document. The following
formatters are available
@table @option
@item ini
@item json
@item old
Pseudo-INI format that used to be the only one available in old
avprobe versions.
@end table
@item -unit
Show the unit of the displayed values.
...
...
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