Commit Graph

8 Commits

Author SHA1 Message Date
Olivier Langlois e205429fcf tools: Use av_gettime_relative
Whenever av_gettime() is used to measure relative period of time,
av_gettime_relative() is prefered as it guarantee monotonic time
on supported platforms.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-24 09:53:43 +03:00
Martin Storsjö 87acd33c09 aviocat: Add support for specifying the input duration
This avoids the caller having to calculate the byte rate if wanting
to push a file in a rate resembling realtime.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-17 09:32:09 +02:00
Martin Storsjö 03f2de5856 aviocat: Check the argv array length before reading element i+1
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-17 09:31:53 +02:00
Mans Rullgard 896bb0d742 Replace usleep() calls with av_usleep()
This reduces the dependency on unistd.h which is not available
on all systems.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-22 17:15:36 +01:00
Diego Biurrun 4e81b5f517 tools: K&R reformatting cosmetics 2012-01-25 15:31:11 +01:00
Martin Storsjö 7ba34575fd aviocat: Remove useless includes
Also include stdlib.h explicitly - currently it is used
implicitly via avformat.h.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-21 12:04:02 +02:00
Martin Storsjö 6a73f3bbdf aviocat: Flush the output before closing
Without this, the end of the file might not be transmitted/written.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-21 01:12:00 +02:00
Martin Storsjö 23e57d167a Add a tool that uses avio to read and write, doing a plain copy of data
It also optionally can throttle its operation to a particular
speed, to simulate realtime writing.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-20 22:19:09 +02:00