Stefano Sabatini
23564a4a4a
ffprobe: add support to library ident printing
12 years ago
Stefano Sabatini
ed2b69a4c3
ffprobe: remove unused "args" argument in writer init callback
...
The parameter is no longer used, since the arguments are parsed at the
framework level.
12 years ago
Stefano Sabatini
163f7afbe6
ffprobe: fix indentation of the first line of packets_and_frames sections in the json output
12 years ago
Stefano Sabatini
4552e9b56c
ffprobe: generalize writer subsection nesting model
...
Discard unflexible structure based on the root/chapter/section layout in
favor of a generalized concept of section.
This should allow to represent sections at a generic level of nesting,
and allow subsection fields selection.
Also, simplify the code.
12 years ago
Stefano Sabatini
2089f93300
ffprobe: drop pointless opaque parameter in writer init callback
...
The parameter was never used.
12 years ago
Stefano Sabatini
58e9025993
ffprobe: reindent after previous commit
12 years ago
Stefano Sabatini
4b370d6126
ffprobe: rework checking logic in writer_print_time() and writer_print_rational()
...
Make writer_print_time() and writer_print_rational() always call
writer_print_int() or writer_print_string(). This way the checks for
determining if the value should be printed or not are consistently
performed in the low level functions.
writer_print_rational() is moved downward in order to avoid a forward
reference.
Simplify/amend the overall logic.
12 years ago
Alexander Strasser
dde8068856
ffprobe: Consider the chosen separator when doing CSV escaping
...
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
12 years ago
Alexander Strasser
dd83028374
ffprobe: Rename variable in csv_escape_str()
...
Sync to 3245be9
.
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
12 years ago
Alexander Strasser
f70122dd57
ffprobe: Simplify CSV field quoting code
...
Sync with bac1b31
.
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
12 years ago
Stefano Sabatini
42047c3e86
ffprobe: reindent after the previous commit
12 years ago
Stefano Sabatini
4cd1addcc4
ffprobe: add -bitexact boolean option
...
The option is mostly useful to make ffprobe output independent from the
build, and in particular to fix FATE --enable-small failures.
12 years ago
Stefano Sabatini
9543cd593e
ffprobe: print format long_name only if non-NULL
...
Fix possible crash when long_name is not defined (for example if
--enable-small).
12 years ago
Stefano Sabatini
0f40105aaa
ffprobe: print codec_long_name only when available
...
Avoid possible segmentation fault if codec_long_name is defined as
NULL (for example if --enable-small).
12 years ago
Stefano Sabatini
f398617b19
ffprobe: fix CSV writer output
...
Fix regression introduced in 749ddc14fc
.
12 years ago
Derek Buitenhuis
8e2a950b29
ffprobe: Add a few common disposition cases
...
This info is crucial in knowing which stream to pick in an
automated setup.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years ago
Stefano Sabatini
8d0e871f25
ffprobe: kill initializers with nested union field definition
...
The c99-to-c89 converter (for MSVC support) doesn't currently handle
designated initializers or compound literals with nested unions or
structs.
This is apparently the only place where this construct is used in the
FFmpeg codebase.
12 years ago
Stefano Sabatini
5e99a23b2d
ffprobe: avoid potentially lossy long long int -> double cast in value_string()
...
Previously the cast long long int -> double was always performed (and
then the double was converted back to long long int) even when it was
avoidable.
12 years ago
Stefano Sabatini
f9dd2e5e1a
ffprobe: print start_pts and duration_ts stream information
12 years ago
Stefano Sabatini
749ddc14fc
ffprobe: add priv_class field to Writer, and factorize writer options initialization
12 years ago
Stefano Sabatini
0c71d5a077
ffprobe: add print_section option to the compact writer
...
Allow to skip section name at the begin of each line. Possibly simplify
output.
12 years ago
Stefano Sabatini
f740c1a9c2
ffprobe: add and use DEFINE_WRITER_CLASS macro
...
Factorize writer class definition.
12 years ago
Stefano Sabatini
e4fe4d01fc
ffprobe: simplify default printer
...
Remove pointless default_print_footer() and
default_print_chapter_header() callbacks, also avoid to print an
empty line when noprint_wrappers is selected.
12 years ago
Michael Niedermayer
7992814920
ffprobe: avoid unsafe usage of the snprintf() return code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b027156b19
ffprobe: use exp2 instead of pow(2, ...)
12 years ago
Clément Bœsch
cc650cf029
Remove "Error parsing options string [...]" messages.
...
This reduces from 3 to 2 messages for the same syntax error in ffprobe,
and from 4 to 3 in filters.
12 years ago
Nicolas George
d74ade7d5f
ffprobe: refactor frames decoding.
12 years ago
Nicolas George
89898cd3b6
ffprobe: fix validity error with tags and data.
...
Add "data" and "extradata" attributes to the schema.
Add "tag" element in "streams".
Print extradata before tags to avoid closing the element.
Fix trac ticket #1588 .
12 years ago
Stefano Sabatini
c809b89a12
ffprobe: show audio frame channels and channel_layout
12 years ago
Stefano Sabatini
10b44f4932
ffprobe: use av_guess_sample_aspect_ratio() for guessing the aspect ratio
...
This is consistent with what av_dump_format() does.
In particular, fix trac ticket #1568 .
12 years ago
Stefano Sabatini
9a1963fbb8
ffprobe: reindent after the previous commit
13 years ago
Stefano Sabatini
5626e812d2
ffprobe: only decode frame if the codec is available
...
Fix crash when a stream codec is unknown, in particular fix trac
ticket #1243 .
13 years ago
Stefano Sabatini
6c3b3cfd90
ffprobe: add frame metadata printing
13 years ago
Lou Logan
b22ecbc6a5
cosmetics: various spelling fixes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Nicolas George
c49e960a60
ffprobe: dump AVPacket.convergence_duration.
13 years ago
Nicolas George
9ae3e45521
ffprobe: add -show_data option.
13 years ago
Stefano Sabatini
a1411eec21
ffprobe: add writer_print_rational()
...
Improve overall consistency, allow some factorization.
13 years ago
Stefano Sabatini
8d1de449f0
ffprobe: show packet duration in frame
13 years ago
Stefano Sabatini
9083d09ebb
ffprobe: honour special value for duration
...
A duration value is undefined when is 0, take into consideration this
fact when printing optional fields.
13 years ago
Clément Bœsch
bae99f7651
ffprobe/flat: add escape for '`' and '$'.
13 years ago
Clément Bœsch
fd0c83c666
ffprobe: add flat output format.
13 years ago
Clément Bœsch
db839544d6
ffprobe/xml: use writer multiple_sections instead of local context variable.
13 years ago
Clément Bœsch
2248db946c
ffprobe: move packets_and_frames work to writer context.
13 years ago
Clément Bœsch
8619362ff1
ffprobe: fix C escaping.
13 years ago
Clément Bœsch
dae8505492
ffprobe: make -of an alias for -print_format.
...
This is for interoperability purpose with the fork.
13 years ago
Stefano Sabatini
ad381ac97f
ffprobe: fix chapter printing, fix JSON output
...
Make writer_print_chapter_header() set the internal values *before* the
private writer callback is called, otherwise the accessed internal values
will be wrong.
Fix regression introduced in fa6cb2fdff
.
Found-By: Daemon404
13 years ago
Stefano Sabatini
89d49acb3b
ffprobe: add INI writer
...
Liberally based on the work of Luca Barbato <lu_zero@gentoo.org>, done
for libav/avprobe.
13 years ago
Stefano Sabatini
fa6cb2fdff
ffprobe: add multiple_sections field to WriterContext
...
Move the field "multiple_entries" from the JSON writer private context to
WriterContext, and rename it "multiple_sections".
This allows to factorize the code with the pending INI format patch.
13 years ago
Stefano Sabatini
c365cdf202
ffprobe: add support to '\b' and '\f' escaping in c_escape_str()
13 years ago
Stefano Sabatini
6994b552a6
ffprobe: make c_escape_str() documentation terser
...
Avoid to specify implementation details, better to check the code for
that.
13 years ago