Function allows to create string containing object's serialized options.
Such string may be passed back to av_set_options_string() in order to restore options.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
In general this commit prepares opt tests to be added to fate.
The commit set some non-zero defaults for test options.
It allows to check if defaults are really set.
Added printing of default values.
Added more cases for testing av_set_options_string
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
The emulation is unused and causes compilation trouble on systems
where fminf() is defined in <math.h> but missing from libm.
This should fix compilation on Debian powerpcspe.
__sync built-ins are considered legacy and will be deprecated.
These new memory model aware built-ins have been available since GCC 4.7.0
Use them by default when available except for __atomic_compare_exchange_n(),
which is slower, and is instead implemented as a fallback for when and if gcc
removes the legacy __sync built-ins.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
gmtime isn't thread safe in general. In msvcrt (which lacks gmtime_r),
the buffer used by gmtime is thread specific though.
One call to localtime is left in avconv_opt.c, where thread safety
shouldn't matter (instead of making avconv depend on the libavutil
internal header).
Signed-off-by: Martin Storsjö <martin@martin.st>
This allows writing most code as if they always are is available.
These are ok to use from other libraries even though it's not a
public header, since they only provide an inline declaration, and
doesn't add an actual dependency on lavu internals. (This can be
considered more a build system compatibility fallback than a
libavutil feature.)
Signed-off-by: Martin Storsjö <martin@martin.st>
Since av_gettime() is used in a number of places where actual
real time clock is required, the monotonic clock introduced in
ebef9f5a5 would have consequences that are hard to handle. Instead
split it into a separate function that can be used in the cases
where only relative time is desired.
On platform where no monotonic clock is available, the difference
between the two av_gettime functions is not clear, and one could
mistakenly use the relative clock where an absolute one is
required. Therefore add an offset, to make it evident that the
time returned from av_gettime_relative never is actual current
real time, even though it is based on av_gettime.
Based on a patch by Olivier Langlois.
Signed-off-by: Martin Storsjö <martin@martin.st>
av_match_list() is only used for whitelists, fix it so it works with
multi-named formats like "mov,mp4,m4a,3gp,3g2,mj2"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Add CODEC_FLAG2_SKIP_MANUAL (exposed as "skip_manual"), which makes
the decoder export sample skip information via side data, instead
of applying it automatically. The format of the side data is the
same as AV_PKT_DATA_SKIP_SAMPLES, but since AVPacket and AVFrame
side data constants overlap, AV_FRAME_DATA_SKIP_SAMPLES needs to
be introduced.
This is useful for applications which want to do the timestamp
calculations manually, or which actually want to retrieve the
padding.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>