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
3946187d
Commit
3946187d
authored
May 09, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffprobe: add "nokey" option to default writer
Help simplifying parsing in certain cases.
parent
f48f03a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
ffprobe.texi
doc/ffprobe.texi
+4
-1
ffprobe.c
ffprobe.c
+12
-2
No files found.
doc/ffprobe.texi
View file @
3946187d
...
...
@@ -202,10 +202,13 @@ A description of the accepted options follows.
@table @option
@item nokey, nk
If set to 1 specify not to print the key of each field. Default value
is 0.
@item noprint
_
wrappers, nw
If set to 1 specify not to print the section header and footer.
Default value is 0.
@end table
@section compact
...
...
ffprobe.c
View file @
3946187d
...
...
@@ -403,6 +403,7 @@ fail:
typedef
struct
DefaultContext
{
const
AVClass
*
class
;
int
nokey
;
int
noprint_wrappers
;
}
DefaultContext
;
...
...
@@ -411,6 +412,8 @@ typedef struct DefaultContext {
static
const
AVOption
default_options
[]
=
{
{
"noprint_wrappers"
,
"do not print headers and footers"
,
OFFSET
(
noprint_wrappers
),
AV_OPT_TYPE_INT
,
{.
dbl
=
0
},
0
,
1
},
{
"nw"
,
"do not print headers and footers"
,
OFFSET
(
noprint_wrappers
),
AV_OPT_TYPE_INT
,
{.
dbl
=
0
},
0
,
1
},
{
"nokey"
,
"force no key printing"
,
OFFSET
(
nokey
),
AV_OPT_TYPE_INT
,
{.
dbl
=
0
},
0
,
1
},
{
"nk"
,
"force no key printing"
,
OFFSET
(
nokey
),
AV_OPT_TYPE_INT
,
{.
dbl
=
0
},
0
,
1
},
{
NULL
},
};
...
...
@@ -490,12 +493,19 @@ static void default_print_section_footer(WriterContext *wctx, const char *sectio
static
void
default_print_str
(
WriterContext
*
wctx
,
const
char
*
key
,
const
char
*
value
)
{
printf
(
"%s=%s
\n
"
,
key
,
value
);
DefaultContext
*
def
=
wctx
->
priv
;
if
(
!
def
->
nokey
)
printf
(
"%s="
,
key
);
printf
(
"%s
\n
"
,
value
);
}
static
void
default_print_int
(
WriterContext
*
wctx
,
const
char
*
key
,
long
long
int
value
)
{
printf
(
"%s=%lld
\n
"
,
key
,
value
);
DefaultContext
*
def
=
wctx
->
priv
;
if
(
!
def
->
nokey
)
printf
(
"%s="
,
key
);
printf
(
"%lld
\n
"
,
value
);
}
static
void
default_show_tags
(
WriterContext
*
wctx
,
AVDictionary
*
dict
)
...
...
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