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
1f0d937f
Commit
1f0d937f
authored
Nov 15, 2011
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffprobe: add csv writer
parent
4e7b3ef3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
2 deletions
+30
-2
Changelog
Changelog
+1
-1
ffprobe.texi
doc/ffprobe.texi
+6
-0
ffprobe.c
ffprobe.c
+23
-1
No files found.
Changelog
View file @
1f0d937f
...
...
@@ -121,7 +121,7 @@ easier to use. The changes are:
- Discworld II BMV decoding support
- VBLE Decoder
- OS X Video Decoder Acceleration (VDA) support
- compact output in ffprobe
- compact
and csv
output in ffprobe
version 0.8:
...
...
doc/ffprobe.texi
View file @
1f0d937f
...
...
@@ -199,6 +199,12 @@ Perform no escaping.
@end table
@section csv
CSV format.
This writer is equivalent to
@code
{
compact=item
_
sep=,:nokey=1:escape=csv
}
.
@section json
JSON based format.
...
...
ffprobe.c
View file @
1f0d937f
...
...
@@ -688,6 +688,26 @@ static Writer compact_writer = {
.
flags
=
WRITER_FLAG_DISPLAY_OPTIONAL_FIELDS
};
/* CSV output */
static
av_cold
int
csv_init
(
WriterContext
*
wctx
,
const
char
*
args
,
void
*
opaque
)
{
return
compact_init
(
wctx
,
"item_sep=,:nokey=1:escape=csv"
,
opaque
);
}
static
Writer
csv_writer
=
{
.
name
=
"csv"
,
.
priv_size
=
sizeof
(
CompactContext
),
.
init
=
csv_init
,
.
uninit
=
compact_uninit
,
.
print_section_header
=
compact_print_section_header
,
.
print_section_footer
=
compact_print_section_footer
,
.
print_integer
=
compact_print_int
,
.
print_string
=
compact_print_str
,
.
show_tags
=
compact_show_tags
,
.
flags
=
WRITER_FLAG_DISPLAY_OPTIONAL_FIELDS
,
};
/* JSON output */
typedef
struct
{
...
...
@@ -857,6 +877,7 @@ static void writer_register_all(void)
writer_register
(
&
default_writer
);
writer_register
(
&
compact_writer
);
writer_register
(
&
csv_writer
);
writer_register
(
&
json_writer
);
}
...
...
@@ -1203,7 +1224,8 @@ static const OptionDef options[] = {
"use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units"
},
{
"pretty"
,
0
,
{(
void
*
)
&
opt_pretty
},
"prettify the format of displayed values, make it more human readable"
},
{
"print_format"
,
OPT_STRING
|
HAS_ARG
,
{(
void
*
)
&
print_format
},
"set the output printing format (available formats are: default, compact, json)"
,
"format"
},
{
"print_format"
,
OPT_STRING
|
HAS_ARG
,
{(
void
*
)
&
print_format
},
"set the output printing format (available formats are: default, compact, csv, json)"
,
"format"
},
{
"show_format"
,
OPT_BOOL
,
{(
void
*
)
&
do_show_format
}
,
"show format/container info"
},
{
"show_packets"
,
OPT_BOOL
,
{(
void
*
)
&
do_show_packets
},
"show packets info"
},
{
"show_streams"
,
OPT_BOOL
,
{(
void
*
)
&
do_show_streams
},
"show streams info"
},
...
...
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