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
f398617b
Commit
f398617b
authored
Sep 19, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffprobe: fix CSV writer output
Fix regression introduced in
749ddc14
.
parent
d0c6ac0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
17 deletions
+28
-17
ffprobe.texi
doc/ffprobe.texi
+10
-11
ffprobe.c
ffprobe.c
+18
-6
No files found.
doc/ffprobe.texi
View file @
f398617b
...
...
@@ -218,8 +218,11 @@ If set to 1 specify not to print the section header and footer.
Default value is 0.
@end table
@section compact
Compact format.
@section compact, csv
Compact and CSV format.
The @code
{
csv
}
writer is equivalent to @code
{
compact
}
, but supports
different defaults.
Each section is printed on a single line.
If no option is specifid, the output has the form:
...
...
@@ -240,14 +243,16 @@ The description of the accepted options follows.
@item item
_
sep, s
Specify the character to use for separating fields in the output line.
It must be a single printable character, it is "|" by default.
It must be a single printable character, it is "|" by default ("," for
the @code
{
csv
}
writer).
@item nokey, nk
If set to 1 specify not to print the key of each field. Its default
value is 0.
value is 0
(1 for the @code
{
csv
}
writer)
.
@item escape, e
Set the escape mode to use, default to "c".
Set the escape mode to use, default to "c" ("csv" for the @code
{
csv
}
writer).
It can assume one of the following values:
@table @option
...
...
@@ -275,12 +280,6 @@ Print the section name at the begin of each line if the value is
@end table
@section csv
CSV format.
This writer is equivalent to
@code
{
compact=item
_
sep=,:nokey=1:escape=csv
}
.
@section flat
Flat format.
...
...
ffprobe.c
View file @
f398617b
...
...
@@ -709,22 +709,34 @@ static const Writer compact_writer = {
/* 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
);
}
#undef OFFSET
#define OFFSET(x) offsetof(CompactContext, x)
static
const
AVOption
csv_options
[]
=
{
{
"item_sep"
,
"set item separator"
,
OFFSET
(
item_sep_str
),
AV_OPT_TYPE_STRING
,
{.
str
=
","
},
CHAR_MIN
,
CHAR_MAX
},
{
"s"
,
"set item separator"
,
OFFSET
(
item_sep_str
),
AV_OPT_TYPE_STRING
,
{.
str
=
","
},
CHAR_MIN
,
CHAR_MAX
},
{
"nokey"
,
"force no key printing"
,
OFFSET
(
nokey
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
},
{
"nk"
,
"force no key printing"
,
OFFSET
(
nokey
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
},
{
"escape"
,
"set escape mode"
,
OFFSET
(
escape_mode_str
),
AV_OPT_TYPE_STRING
,
{.
str
=
"csv"
},
CHAR_MIN
,
CHAR_MAX
},
{
"e"
,
"set escape mode"
,
OFFSET
(
escape_mode_str
),
AV_OPT_TYPE_STRING
,
{.
str
=
"csv"
},
CHAR_MIN
,
CHAR_MAX
},
{
"print_section"
,
"print section name"
,
OFFSET
(
print_section
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
},
{
"p"
,
"print section name"
,
OFFSET
(
print_section
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
},
{
NULL
},
};
DEFINE_WRITER_CLASS
(
csv
);
static
const
Writer
csv_writer
=
{
.
name
=
"csv"
,
.
priv_size
=
sizeof
(
CompactContext
),
.
init
=
c
sv
_init
,
.
init
=
c
ompact
_init
,
.
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
,
.
priv_class
=
&
c
ompact
_class
,
.
priv_class
=
&
c
sv
_class
,
};
/* Flat output */
...
...
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