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
Clément Bœsch
19c1bf1525
ffprobe: reduce the number of AVBPrint resets.
13 years ago
Christian Schmidt
f7d5272456
ffprobe: display the codec profile in show_stream()
...
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
13 years ago
Stefano Sabatini
6374ee72df
ffprobe: remove ad-hoc behavior when nb_fmt_entries_to_show is 1
...
The special-case behavior may complicate parsing when the
-show_format_entry option is used programmatically in a script.
The option default=nk=1 achieves the same purpose, if the objective is to
skip printing the single field key.
13 years ago
Stefano Sabatini
e109e392ba
ffprobe: remove unused variable i in probe_file()
...
Fix warning:
ffprobe.c: In function ‘probe_file’:
ffprobe.c:1576:14: warning: unused variable ‘i’ [-Wunused-variable]
13 years ago
Michael Niedermayer
c457a29ece
ffprobe: add default_writer priv_size.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
b545b947dd
ffprobe: replace fast_asprintf() with bprint utils.
...
Also remove the unused print_fmt_opt() in the process.
13 years ago
Stefano Sabatini
3946187d60
ffprobe: add "nokey" option to default writer
...
Help simplifying parsing in certain cases.
13 years ago
Stefano Sabatini
f48f03a400
ffprobe: add "noprint_wrappers" option to default writer
...
The option is useful for simplifying parsing.
Also use the new option in fate, in order to fix the regression
introduced by the previous commit.
13 years ago
Stefano Sabatini
6cd06bd22c
ffprobe: simplify/fix logic for the -show_format_entry option
...
Do not skip chapter header/footer printing, which breaks the parsing for
most writers.
13 years ago
Stefano Sabatini
a0fd322195
ffprobe: remove unused print_format_entry() function
...
The function was introduced in 653d117c
, but is not required.
13 years ago
Nicolas George
b27383e453
ffprobe: do not try to decode empty packets.
...
Fixes sporadic decode failures and trac ticket #997 .
13 years ago
Stefano Sabatini
f0bb1a599c
ffprobe: use avbprint API
...
Simplify, increase robustness.
13 years ago
Matthieu Bouron
278d6ab900
ffprobe: report bit rate in stream description
...
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
13 years ago
Clément Bœsch
8688e6acba
ffprobe: fix crash if the file can't be opened.
13 years ago
Matthieu Bouron
29b9aee49f
ffprobe: add count_frames and count_packets options
...
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
13 years ago
Stefano Sabatini
1ca0812d90
ffprobe: fix typo in ESCAPE_CHECK_SIZE
13 years ago