1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
FFmpeg/libavutil
Olivier Langlois 0eec06ed87 lavu: add av_gettime_relative()
These functions are using the POSIX clock_gettime() function with the
CLOCK_MONOTONIC clock id. If these are not present on the targeted
platform, the new functions will fallback on using the original realtime functions
av_gettime() and av_usleep().

Monotonic support can be added on other platforms with their
equivalent native system API eventually if possible.

Whenever time is requested to measure relative time, the monotonic clock,
when available, is superior to the system realtime clock because it is
not affected by discontinuous jumps in the system time

In a future step, offering the flexibility to let the user choose between
rt and monotonic clock for avdevices packets will be investigated.

It is very easy to experience the issues that this patch attempt to address
by rewinding back in the past the system time while ffmpeg is running.

this is breaking the ffmpeg report printing (ffmepg.c:print_report()) and
the the rate emulator functionality (-re) without the patch.

Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-17 15:28:03 +02:00
..
aarch64 Merge commit '8675bcb0addb1c7fb0b04682d1f3f95d5b8dae14' 2014-04-07 02:15:18 +02:00
arm Merge commit '831a1180785a786272cdcefb71566a770bfb879e' 2014-03-13 23:59:56 +01:00
avr32
bfin Merge commit 'da785231ea0b82b5c2526babbb2871c935b21a87' 2014-03-14 01:56:25 +01:00
mips mips: optimization for float aac decoder (sbr module) 2013-02-21 22:43:08 +01:00
ppc Merge commit 'f61bece684d9685b07895508e6c1c733b5564ccf' 2013-08-29 14:24:07 +02:00
sh4
tomi Merge remote-tracking branch 'qatar/master' 2013-02-20 12:04:50 +01:00
x86 inline asm: fix arrays as named constraints. 2014-05-07 15:02:45 +02:00
adler32.c adler32: Fix doxy group definition 2014-04-07 01:31:02 +02:00
adler32.h adler32: Fix doxy group definition 2014-04-07 01:31:02 +02:00
aes.c Merge commit 'fb0c9d41d685abb58575c5482ca33b8cd457c5ec' 2014-01-26 01:54:55 +01:00
aes.h lavu: keep context size variables 2012-10-28 14:33:41 +01:00
atomic_gcc.h Merge commit '6327c10702922eabcb1c6170abd3f03d23ce4c51' 2013-03-12 21:39:38 +01:00
atomic_suncc.h atomic: Add include guards to the implementation headers 2013-03-08 20:54:40 +01:00
atomic_win32.h atomic: Add include guards to the implementation headers 2013-03-08 20:54:40 +01:00
atomic.c Merge commit '874c751cc5b99cd68932e21c2c3a0d21134207e0' 2014-02-19 21:53:58 +01:00
atomic.h Merge remote-tracking branch 'qatar/master' 2013-12-20 13:16:56 +01:00
attributes.h Merge commit '5858a67f135a7395c548482c73cf3d39bcdd3022' 2013-11-03 12:38:13 +01:00
audio_fifo.c avutil/audio_fifo: Use av_mallocz_array() 2014-05-05 18:59:56 +02:00
audio_fifo.h Reinstate proper FFmpeg license for all files. 2013-08-30 15:47:38 +00:00
audioconvert.h lavu: rename audioconvert.* to channel_layout.* and deprecate audioconvert.h 2012-11-11 13:35:12 -05:00
avassert.h av_assert should use AV_LOG_PANIC. 2012-12-05 20:25:32 +01:00
avstring.c avutil/avstring: do not lose ascii characters when decoding non utf-8 with av_utf8_decode() 2014-04-13 15:33:23 +02:00
avstring.h avutil/avstring: add av_strnlen() 2013-12-22 22:25:15 +01:00
avutil.h avutil/avutil.h: remove duplicate rational.h include 2014-04-23 00:58:15 +02:00
avutilres.rc Add Windows resource file support for shared libraries 2013-12-05 23:42:07 +01:00
base64.c Merge commit 'fb0c9d41d685abb58575c5482ca33b8cd457c5ec' 2014-01-26 01:54:55 +01:00
base64.h lavu/base64: extend/clarify doxy for the base64 API 2013-01-02 23:52:35 +01:00
blowfish.c Merge remote-tracking branch 'qatar/master' 2013-09-11 12:51:01 +02:00
blowfish.h
bprint.c lavu/bprint: add append buffer function 2013-08-30 22:36:38 +02:00
bprint.h lavu/bprint: add append buffer function 2013-08-30 22:36:38 +02:00
bswap.h Merge remote-tracking branch 'qatar/master' 2014-01-15 05:23:03 +01:00
buffer_internal.h avutil/buffer: Fix race in pool. 2013-03-18 19:19:22 +01:00
buffer.c Revert "lavu/buffer: add release function" 2014-03-06 03:23:40 +01:00
buffer.h Revert "lavu/buffer: add release function" 2014-03-06 03:23:40 +01:00
channel_layout.c Merge remote-tracking branch 'qatar/master' 2013-11-24 05:21:19 +01:00
channel_layout.h Merge commit '5c437fb' 2014-01-05 21:55:58 +01:00
colorspace.h
common.h Merge remote-tracking branch 'qatar/master' 2013-11-24 05:21:19 +01:00
cpu_internal.h Merge commit 'b7b17ed66e199afc7246e642bf3b35c3f8eca217' 2014-01-15 14:42:49 +01:00
cpu.c Merge commit '8675bcb0addb1c7fb0b04682d1f3f95d5b8dae14' 2014-04-07 02:15:18 +02:00
cpu.h Merge commit '8675bcb0addb1c7fb0b04682d1f3f95d5b8dae14' 2014-04-07 02:15:18 +02:00
crc.c Merge commit '0983d48111f578e17e8c1967d25ce593fce62b63' 2014-04-17 22:38:51 +02:00
crc.h Merge commit '0983d48111f578e17e8c1967d25ce593fce62b63' 2014-04-17 22:38:51 +02:00
des.c Merge remote-tracking branch 'qatar/master' 2013-09-11 12:51:01 +02:00
des.h
dict.c avutil/dict: delay addition of const from e12a73246d until next major ABI bump 2014-05-14 15:44:01 +02:00
dict.h avutil/dict: delay addition of const from e12a73246d until next major ABI bump 2014-05-14 15:44:01 +02:00
downmix_info.c Merge commit 'c98f3169bfb578c1a4e407b44524f0bfa3b4dc0c' 2014-02-16 02:05:29 +01:00
downmix_info.h Merge commit 'c98f3169bfb578c1a4e407b44524f0bfa3b4dc0c' 2014-02-16 02:05:29 +01:00
dynarray.h avutil/dynarray: remove debug av_log() from AV_DYNARRAY_ADD 2014-03-22 21:47:38 +01:00
error.c Merge commit 'c3e15f7b39aac2012f09ee4ca86d2bc674ffdbd4' 2012-10-22 14:39:12 +02:00
error.h error.h: Do not circularly depend on avutil.h 2013-12-25 00:12:05 +01:00
eval.c Merge commit 'fb0c9d41d685abb58575c5482ca33b8cd457c5ec' 2014-01-26 01:54:55 +01:00
eval.h Do not leave positive values undefined when negative are defined as error 2013-10-19 16:42:57 +02:00
fifo.c avutil/fifo: delay addition of const from 78d3453c4a until next major ABI bump 2014-05-14 15:44:01 +02:00
fifo.h avutil/fifo: delay addition of const from 78d3453c4a until next major ABI bump 2014-05-14 15:44:01 +02:00
file_open.c avutil/file_open: Use av_mallocz_array() 2014-05-05 19:00:38 +02:00
file.c Merge commit 'a76d0cdf21c3d9e464623cc0ad1c005abf952afa' 2013-08-10 10:37:20 +02:00
file.h cosmetics: Fix "dont" "wont" "doesnt" typos 2013-06-29 02:31:16 +02:00
fixed_dsp.c avutil/fixed_dsp: remove redundant cast 2014-04-01 17:57:30 +02:00
fixed_dsp.h libavutil: Add fixed_dsp 2014-04-01 17:36:33 +02:00
float_dsp.c Merge remote-tracking branch 'qatar/master' 2014-03-22 18:52:21 +01:00
float_dsp.h Merge remote-tracking branch 'qatar/master' 2014-03-19 02:52:08 +01:00
frame.c avutil/frame: use av_malloc(z)_array() 2014-04-15 13:51:48 +02:00
frame.h avutil/frame: undeprecate AVFrame.motion_val API 2014-03-26 18:22:49 +01:00
hash.c lavu/hash: add hash_final helpers. 2014-04-29 13:24:11 +02:00
hash.h lavu/hash: add hash_final helpers. 2014-04-29 13:24:11 +02:00
hmac.c avutil/hmac: make const tables static const 2013-08-06 20:30:55 +02:00
hmac.h lavu/hmac: Add support for SHA-2 2013-06-12 01:47:42 +02:00
imgutils.c replace remaining PIX_FMT_* flags with AV_PIX_FMT_FLAG_* 2013-05-15 11:23:14 +02:00
imgutils.h lavu/imgutils: add consistency checks to av_image_copy_plane() 2012-11-25 18:19:59 +01:00
integer.c
integer.h
internal.h lavu: add LOCAL_ALIGNED_32 2014-04-25 06:12:51 +02:00
intfloat_readwrite.c avutil: Remove deprecated intfloat_readwrite code 2013-12-16 17:51:00 +01:00
intfloat_readwrite.h avutil: Remove deprecated intfloat_readwrite code 2013-12-16 17:51:00 +01:00
intfloat.h Reinstate proper FFmpeg license for all files. 2013-08-30 15:47:38 +00:00
intmath.c Merge commit '5ff998a233d759d0de83ea6f95c383d03d25d88e' 2012-11-05 22:51:20 +01:00
intmath.h Merge commit '5ff998a233d759d0de83ea6f95c383d03d25d88e' 2012-11-05 22:51:20 +01:00
intreadwrite.h lavu/intreadwrite: add AV_[RW][BLN]48 2013-02-13 15:35:54 +00:00
lfg.c
lfg.h Merge remote-tracking branch 'qatar/master' 2012-10-06 13:45:08 +02:00
libavutil.v Merge commit '468ea9d5b14f92fe61f47f034e67066f65163f5f' 2012-10-23 13:34:42 +02:00
libm.h libm: Add fallback definition for cbrt() using pow() 2013-01-22 16:02:31 +01:00
lls1.c avutil: reintroduce lls1 as the 52 ABI needs it 2013-11-17 16:44:32 +01:00
lls1.h avutil: reintroduce lls1 as the 52 ABI needs it 2013-11-17 16:44:32 +01:00
lls2.c rename new lls code to lls2 to avoid conflict with the old which has a different ABI 2013-11-17 16:41:08 +01:00
lls2.h rename new lls code to lls2 to avoid conflict with the old which has a different ABI 2013-11-17 16:41:08 +01:00
log2_tab.c Merge commit '930c9d4373e0f3cb7c64fcfc129127a309f6d066' 2012-10-13 14:24:58 +02:00
log.c avutil/log: fix memleak from 669a09fb37 2014-04-29 03:13:51 +02:00
log.h Add AV_LOG_PRINT_LEVEL flag to include log severity in default log formatting. 2014-04-26 19:27:33 +02:00
lzo.c Merge commit 'ca6c3f2c53be70aa3c38e8f1292809db89ea1ba6' 2013-03-16 14:10:09 +01:00
lzo.h Merge remote-tracking branch 'qatar/master' 2012-10-25 13:15:58 +02:00
macros.h Merge remote-tracking branch 'qatar/master' 2013-12-30 11:23:32 +01:00
Makefile Move av_find_best_pix_fmt_of_2() from avcodec to avutil 2014-04-30 23:14:05 +02:00
mathematics.c Merge commit 'de69aedf9935631b7f78e8b8da6e460422a9bc5f' 2014-05-03 23:46:36 +02:00
mathematics.h Fix compilation with msvc/icl due to missing header and define. 2014-02-03 19:48:41 +01:00
md5.c avutil/md5: reindent after previous commits 2013-05-25 16:11:08 +02:00
md5.h lavu/md5: Add doxy 2013-06-15 02:22:39 +02:00
mem.c lavu/mem: add av_dynarray_add_nofree function 2014-03-29 09:48:48 +01:00
mem.h lavu/mem: add av_dynarray_add_nofree function 2014-03-29 09:48:48 +01:00
murmur3.c murmur3: fix memleak 2013-05-15 12:10:09 +02:00
murmur3.h Add 128 bit murmur3 hash function. 2013-05-13 21:42:37 +02:00
old_pix_fmts.h Merge remote-tracking branch 'qatar/master' 2013-11-14 03:26:35 +01:00
opencl_internal.c lavu/opencl_internal: use av_opencl_errstr 2013-05-06 12:08:04 +02:00
opencl_internal.h lavu/opencl:add opencl set param function 2013-04-26 03:04:42 +02:00
opencl.c opencl: Make init_mtx static with volatile lock 2014-05-10 15:07:33 +02:00
opencl.h opencl: add support for non-pthread locking 2014-05-01 19:28:31 +02:00
opt.c lavu/opt: add av_opt_set_dict2() function 2014-05-02 18:04:05 +02:00
opt.h lavu/opt: add av_opt_set_dict2() function 2014-05-02 18:04:05 +02:00
parseutils.c Merge commit '6b45f05ef5b241fd1513702119af9c30056a0ac5' 2013-12-12 19:12:33 +01:00
parseutils.h lavu/parseutils: add av_get_known_color_name() 2013-10-27 09:16:05 +01:00
pca.c avutil/pca: Use av_malloc_array() 2014-05-04 19:00:16 +02:00
pca.h
pixdesc.c Merge commit '66e6c8a7b4e3ac926302529606bd3e323c28b20f' 2014-05-12 00:37:12 +02:00
pixdesc.h Move av_find_best_pix_fmt_of_2() from avcodec to avutil 2014-04-30 23:14:05 +02:00
pixfmt.h Merge commit '66e6c8a7b4e3ac926302529606bd3e323c28b20f' 2014-05-12 00:37:12 +02:00
qsort.h
random_seed.c Merge commit '01d245ef4392152dbdc78a6ba4dfa0a6e8b08e6f' 2014-01-06 22:12:29 +01:00
random_seed.h
rational.c avutil/rational: av_add_stable() test code 2014-01-04 15:10:14 +01:00
rational.h lavu/rational: add syntactic sugar. 2014-01-19 17:12:22 +01:00
rc4.c
rc4.h
replaygain.h Merge commit '8542f9c4f17125d483c40c0c5723842f1c982f81' 2014-04-04 22:52:12 +02:00
ripemd.c lavu/ripemd: Add a size optimized version of the transform functions 2013-09-09 11:18:48 +02:00
ripemd.h lavu: Add RIPEMD hashing 2013-06-15 18:54:01 -03:00
samplefmt.c Merge commit '0e830094ad0dc251613a0aa3234d9c5c397e02e6' 2014-02-05 01:30:24 +01:00
samplefmt.h lavu/samplefmt: add av_samples_alloc_array_and_pointers() 2013-03-31 18:00:44 +02:00
sha512.c lavu/sha512: Fully unroll the transform function loops 2013-09-11 21:55:59 +02:00
sha512.h lavu: Add SHA-2 512 hashing 2013-06-02 11:27:19 +02:00
sha.c lavu/sha: Fully unroll the transform function loops 2013-09-11 21:55:59 +02:00
sha.h lavu: keep context size variables 2012-10-28 14:33:41 +01:00
softfloat.c avutil/softfloat: remove unneeded include assert.h 2013-07-19 18:56:33 +02:00
softfloat.h
stereo3d.c Merge commit '7e244c68600f479270e979258e389ed5240885fb' 2013-12-09 21:33:51 +01:00
stereo3d.h Merge remote-tracking branch 'qatar/master' 2013-12-17 19:37:50 +01:00
time.c lavu: add av_gettime_relative() 2014-05-17 15:28:03 +02:00
time.h lavu: add av_gettime_relative() 2014-05-17 15:28:03 +02:00
timecode.c lavu/timecode: fix time code calculation for 60000/1001 drop frame 2013-01-24 21:06:24 +01:00
timecode.h lavu: drop disabled FF_API_OLD_TC_ADJUST_FRAMENUM code 2012-11-04 18:10:39 +01:00
timer.h avutil/timer: Fix units for x86 after c708b54033 2014-03-09 15:22:02 +01:00
timestamp.h avutil/timestamp: Warn about missing __STDC_FORMAT_MACROS for C++ use 2014-03-13 17:32:15 +01:00
tree.c tree-test: Don't return restricted exit codes 2013-10-24 10:59:26 +01:00
tree.h Merge commit 'a9b04b2c43f95cc17c2291f83c27a3119471d986' 2013-08-01 10:41:06 +02:00
utf8.c avutil/utf8: put under #ifdef TEST 2013-11-22 17:16:11 +01:00
utils.c avutil: Add av_get_time_base_q() 2014-04-22 16:38:33 -04:00
version.h lavu: add av_gettime_relative() 2014-05-17 15:28:03 +02:00
x86_cpu.h
xga_font_data.c Move xGA font data from lavc to lavu. 2012-10-01 22:24:17 +02:00
xga_font_data.h Mark data symbols shared between libraries with av_export 2012-10-20 01:56:50 +02:00
xtea.c xtea: Add Doxy @file and group 2014-04-07 01:31:36 +02:00
xtea.h xtea: Add Doxy @file and group 2014-04-07 01:31:36 +02:00