Diego Biurrun
ab79966475
cmdutils: Conditionally compile libswscale-related bits
...
This fixes compilation with libswscale disabled.
12 years ago
Leon van Stuivenberg
c5be6192f0
cmdutils: avoid using cpp directives within printf macro arguments
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
It appears such construct has undefined behavior
12 years ago
Michael Niedermayer
0008e0d632
cmdutils: fix unclosed file on error
...
Fixes CID739865
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
aa47821344
cmdutils: remove writes in never read variable
...
Fixes CID739868
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
3f65eff408
Include sys/time.h before sys/resource.h
...
Some systems require sys/time.h being explicitly included before
sys/resource.h. The configure check already does this.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Michael Niedermayer
250fe6eeb4
cmdutils: apply option to codec and format contexts if possible.
...
This is needed for setting both contexts -err_detect at once.
Reviewed-by: Clément Bœsch <ubitux@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ce739e66f4
cmdutils: add missing check for ftell() return
...
Fixed CID703706
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
35daf3ca81
cmdutils: remove unneeded null check
...
Fixes CID703769
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
b7f1010c8f
tools: do not use av_pix_fmt_descriptors directly.
12 years ago
Janne Grunau
b94e4acb48
cmdutils_read_file: increment *size after writing the trailing \0
...
Fixes CID732166.
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Diego Elio Pettenò
5e3f9979fa
Use atexit() instead of defining a custom exit_program() interface.
12 years ago
Nicolas George
7200fecd9b
cmdutils: sort codec lists.
...
The lists are sorted first by type (video first)
and then alphabetically by name.
Fix ticket #1669 .
12 years ago
Bobby Bingham
d0c6ac0deb
Fix segfault with -filters option
...
Filters now use null pointers to indicate having no input/output pads,
rather than empty lists of pads. We can't assume pad is non-null
anymore.
Signed-off-by: Bobby Bingham <uhmmmm@gmail.com>
12 years ago
Derek Buitenhuis
e1b4496040
msvc: Add a va_copy compatability macro for msvc
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years ago
Anton Khirnov
990450c5bf
cmdutils: avoid setting data pointers to invalid values in alloc_buffer()
...
Fixes bug 352.
12 years ago
Anton Khirnov
11d957fbd8
avtools: remove the distinction between func_arg and func2_arg.
...
func2_arg is the same as func_arg, except it has one additional
parameter. Change all func_arg callbacks to take that parameter (and
ignore it).
13 years ago
Anton Khirnov
e2785fa728
cmdutils: make -codecs print lossy/lossless flags.
13 years ago
Nicolas George
786dadc014
cmdutils: add -layouts option.
...
Extract of the output:
| Individual channels:
| NAME DESCRIPTION
| FL front left
| FR front right
| <snip>
| SDR surround direct right
|
| Standard channel layouts:
| NAME DECOMPOSITION
| mono FC
| stereo FL+FR
| <snip>
| octagonal FL+FR+FC+BL+BR+BC+SL+SR
| downmix DL+DR
13 years ago
Carl Eugen Hoyos
4abb3539a6
Fix one of the problems with -codecs, -encoders and -decoders.
13 years ago
Anton Khirnov
a1bcc76e60
cmdutils: fix a memleak when specifying an option twice.
13 years ago
Anton Khirnov
f9fada2704
avconv: split printing "main options" into global and per-file.
13 years ago
Anton Khirnov
1136bd362a
avtools: add -h demuxer/muxer
13 years ago
Anton Khirnov
a3ad68d36c
cmdutils: extend -h to allow printing codec details.
13 years ago
Anton Khirnov
7c5012127f
cmdutils: change semantics of show_help_options() and document it.
...
Currently it takes a mask and value, such that options for which
(flags & mask) == value.
Change it to take required flags and forbidden flags instead. This is
shorter and simpler to understand.
13 years ago
Anton Khirnov
dc4c24a3d3
avtools: move some newlines to show_help_options().
...
Don't require every caller to supply them.
13 years ago
Anton Khirnov
f617135bc9
avtools: fix show_foo() signatures.
...
show_foo() functions are declared as void show_foo(void), but called as
int show_foo(const char*, const char*).
13 years ago
Anton Khirnov
7c10194996
cmdutils: refactor -codecs option.
...
Make it print a list of AVCodecDescriptors.
Add new -decoders and -encoders options that print lists of decoders and
encoders respectively.
13 years ago
Stefano Sabatini
ad5043e285
cmdutils: show options in show_help_children only if the context has options
...
Avoid to print a pointless name of the context followed by an empty list.
13 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
chinshou
55de89e25d
cmdutils/alloc_buffer: fix typo
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Nicolas George
b0629366a2
lavf: make cmdutils's check_stream_specifier public.
...
The new function is called avformat_match_stream_specifier()
and does not include logging the error message.
13 years ago
Mans Rullgard
45870f8b6e
Print full compiler identification, not only version number
...
This provides a more precise identification of the compiler used.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Ronald S. Bultje
66a297975d
cmutils: include shellapi.h on Win32 (for CommandLineToArgvW).
...
This is required for CommandLineToArgvW. Normally, shellapi.h is included
implicitly by windows.h, but if we define WIN32_LEAN_AND_MEAN (or some of
the other earlier headers have included windows.h with that option),
windows.h doesn't include this one.
Thus explicitly include the headers we really need, for clarity and
compatibility.
13 years ago
Carl Eugen Hoyos
50d0f6cee9
Extend -codecs output.
...
Allow to show different supported multi-threading methods for an
encoder/decoder pair.
Fixes ticket #1512
13 years ago
Michael Niedermayer
f91b7d8030
mdutils: print error message on error get_buffer related errors
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Martin Storsjö
d3ed1c9571
cmdutils: Pass the actual chosen encoder to filter_codec_opts
...
This allows passing the right options to encoders when there's more
than one encoder for a certain codec id.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
c13e490dce
codec_release_buffer: fix handling of non user buffers
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
8f1b139c10
cmdutils: dont return void from a void function
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Nicolas George
6668ef7567
cmdutils: include threading caps in codecs listing.
...
Suggested by Roger Pack on ffmpeg-user.
13 years ago
Anton Khirnov
d55c2e05b5
avtools: move buffer management code from avconv to cmdutils.
...
It will be used by avplay.
13 years ago
Clément Bœsch
e00b2d284e
options: stop after option is found.
...
This reverts 78da04384a6c22820518706d84631006d31a85ea; it is not
required anymore since the previous commit (these extended checks were
for the -timecode option in both muxers and encoders), and reduces the
diff with the fork.
13 years ago
Michael Niedermayer
89cf5bf39a
cmdutils: replace 1 line #ifs by if()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Gavin Kinsey
bf6fb563b9
Allow building of command line utils without swresample lib
...
This allows building ffprobe without swresample
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Nicolas George
ea07063fd8
cmdutils: allow to specify a stream by its ID.
...
The stream can be specified as "#129" or "#0x81".
It is especially useful for VOBs dumped from a DVD,
where the language-id mapping is available externally
and the probing can find the streams in a random order.
13 years ago
Diego Biurrun
7cf78b3476
cmdutils: Add fallback case to switch in check_stream_specifier().
...
This fixes the warning:
cmdutils.c:897: warning: ‘type’ may be used uninitialized in this function
13 years ago
Anton Khirnov
ac71230902
lavfi: add video buffer sink, and use it in avtools
...
Also add the public interface libavfilter/buffersink.h.
Based on a commit by Stefano Sabatini.
13 years ago
Michael Niedermayer
eadac34c80
cmdutils/avutil: Move cpu caps parse code into av_parse_cpu_caps()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Justin Ruggles
bcb82fe1f4
avconv: use libavresample
13 years ago
Anton Khirnov
b7327887ea
avconv: get output pixel format from lavfi.
...
This way we don't require a clearly defined corresponding input stream.
The result for the xwd test changes because rgb24 is now chosen instead
of bgra.
13 years ago