Diego Biurrun
122de16dd8
Replace cmdutils_common_opts.h by a macro
8 years ago
Anton Khirnov
bd2ab27c48
avconv: use read_file() for reading the 2pass stats
...
Also, drop the now unused cmdutils_read_file(). There is no reason to
have two functions doing essentially the same thing.
9 years ago
Luca Barbato
85698be461
cmdutils: Mark exit_program as av_noreturn
11 years ago
Luca Barbato
f825d42bcc
avplay: Accept cpuflags option
...
Quite useful for debugging.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Luca Barbato
636ced8e1d
cmdutils: wrap exit explicitly
...
Some C runtime implementations deadlock when calling threading functions
on the atexit() handler.
Use a simpler wrapper similar to av_log to call the cleanup function
before exit.
Bug-Id: 523
12 years ago
Anton Khirnov
e19e8aeeaa
avtools: move media_type_string() from avprobe to cmdutils.
...
It will be useful outside of avprobe.
12 years ago
Anton Khirnov
9d3009c6c4
avconv: print an error on applying options of the wrong type.
...
I.e. input options to output files or vice versa.
12 years ago
Anton Khirnov
354468fc12
avplay: switch to new refcounted frames API
...
Remove now unused cmdutils get_buffer() implementation.
12 years ago
Justin Ruggles
5c7db097eb
avconv: pass libavresample options to AVFilterGraph
12 years ago
Anton Khirnov
c661cb6672
cmdutils: pass number of groups to split_commandline().
...
This makes the code simpler and avoids mixing designated and
non-designated initializers in a potentially unsafe way in avconv.
12 years ago
Anton Khirnov
8c9af5b205
cmdutils: add a commandline pre-parser.
...
It splits the commandline into a more convenient internal representation
for further parsing.
This will allow e.g.
- processing global options first independently of their location on the
commandline, eliminating ugly hacks for processing e.g. cpuflags
first
- better options validation and error reporting. It is now possible for
the parser to know that it's applying an input option to an output
file or vice versa and act accordingly.
12 years ago
Anton Khirnov
10bca66101
cmdutils: add a macro to simplify grow_array() calls.
12 years ago
Diego Biurrun
02e4275180
avconv_opt, cmdutils: Add missing function parameter Doxygen
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Diego Biurrun
e4cbf7529b
Give all anonymously typedeffed structs in headers a name
...
Anonymous structs cannot be forward declared and have no benefit.
12 years ago
Diego Elio Pettenò
5e3f9979fa
Use atexit() instead of defining a custom exit_program() interface.
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).
12 years ago
Anton Khirnov
f9fada2704
avconv: split printing "main options" into global and per-file.
12 years ago
Anton Khirnov
a3ad68d36c
cmdutils: extend -h to allow printing codec details.
12 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.
12 years ago
Anton Khirnov
79600a8354
avconv: deprecate -isync.
...
This option does not do anything.
Also remove OPT_GRAB, since -isync is the last option using it.
12 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*).
12 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.
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Reinhard Tartler
22662ca560
attributes: add av_noreturn
...
Also use it in the declaration of the various exit_program
implementations in avtools.
inspired by a clang-scan report.
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
Anton Khirnov
d55c2e05b5
avtools: move buffer management code from avconv to cmdutils.
...
It will be used by avplay.
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
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
Reinhard Tartler
050dc12778
Read preset files with suffix .avpreset
...
The preset files have been renamed some time ago.
CC: libav-stable@libav.org
13 years ago
Anton Khirnov
4138cd2907
avconv: add -cpuflags option for setting supported cpuflags.
...
Useful for testing.
13 years ago
Diego Biurrun
abe655a472
Drop unnecessary prefix from *sink* variable and struct names.
13 years ago
Diego Biurrun
45f2908d02
cosmetics: Rename ffsink to avsink.
13 years ago
Gaurav Narula
0184bbe2d1
avprobe, cmdutils: K&R formatting cosmetics
13 years ago
Diego Biurrun
da9cea77e3
Fix a bunch of common typos.
13 years ago
Diego Biurrun
e873c03ac7
misc Doxygen markup improvements
13 years ago
Martin Storsjö
02170990fd
cmdutils: Rename read_file to cmdutils_read_file
...
This symbol name clashes with a symbol in gnutls, if linking
statically to that library.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Anton Khirnov
7a6cd9957d
cmdutils/avtools: simplify show_help() by using av_opt_child_class_next()
13 years ago
Diego Biurrun
25c27f379f
doc: fix references to obsolete presets directories for avconv/ffmpeg
13 years ago
Anton Khirnov
182cbe433a
avtools: parse loglevel before all the other options.
...
This way it can be applied to cmdutils too -- e.g. showing the banner
and printing startup messages.
13 years ago
Anton Khirnov
05bffc12c4
avconv: move audio_sample_fmt to options context.
...
Also document it and replace undocumented and inconsistent
'-sample_fmt list' syntax with -sample_fmts.
13 years ago
Anton Khirnov
33f75d72e6
avconv: move ts scale to options context.
13 years ago
Anton Khirnov
6b779cccaa
avconv: move start_time, recording_time and input_ts_offset to options context
13 years ago
Anton Khirnov
6361c5e1e6
cmdutils: allow storing per-stream/chapter/.... options in a generic way
13 years ago
Anton Khirnov
2f8e586df1
cmdutils: split per-option code out of parse_options().
...
This allows options like -target, which are just shortcuts for other
options, to work without dummy function for all options they invoke.
13 years ago
Anton Khirnov
7cc8d6385a
cmdutils: add support for caller-provided option context.
...
This is the first step to removing the globals plague from avtools.
13 years ago
Anton Khirnov
7efe05ab29
cmdutils: declare only one pointer type in OptionDef
...
This will be useful in the following commit.
13 years ago
Anton Khirnov
cac651c834
cmdutils: move grow_array() from avconv to cmdutils.
13 years ago
Anton Khirnov
dad09ff93f
cmdutils: move exit_program() declaration to cmdutils from avconv
...
Allows cmdutils to call each tool's own cleanup function.
13 years ago
Anton Khirnov
d4863fc1a8
cmdutils: allow precisely specifying a stream for AVOptions.
13 years ago