Mans Rullgard [Thu, 21 Jun 2012 19:31:44 +0000 (20:31 +0100)]
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>
Mans Rullgard [Thu, 21 Jun 2012 16:00:25 +0000 (17:00 +0100)]
lavu: add av_usleep() function
This function implements a delay using the first available
of the following functions:
- nanosleep()
- usleep()
- Sleep() (Windows)
The conditional #includes in time.c are simplified by including
unistd.h and windows.h whenever they are available rather than
having these lines triggered by specific functions.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Hendrik Leppkes [Thu, 21 Jun 2012 21:11:24 +0000 (21:11 +0000)]
utvideo: mark interlaced frames as such
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Carl Eugen Hoyos [Thu, 21 Jun 2012 21:11:23 +0000 (21:11 +0000)]
utvideo: Fix interlaced prediction for RGB utvideo.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diego Biurrun [Thu, 21 Jun 2012 09:44:53 +0000 (11:44 +0200)]
cosmetics: do not use full path for local headers
Mans Rullgard [Thu, 21 Jun 2012 15:54:02 +0000 (16:54 +0100)]
lavu/file: include unistd.h only when available
The unistd.h header is only needed for the close() declaration.
If this header is not available, the close() declaration may be
provided by another header, e.g. io.h.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Thu, 21 Jun 2012 15:34:10 +0000 (16:34 +0100)]
configure: check for unistd.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Thu, 21 Jun 2012 15:33:36 +0000 (16:33 +0100)]
log: include unistd.h only when needed
The only symbol this file uses from unistd.h is isatty(). By
including the header only when this function is used, the file
can be built on systems without unistd.h (which presumably also
lack isatty).
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Thu, 21 Jun 2012 15:36:15 +0000 (16:36 +0100)]
lavf: include libavutil/time.h instead of redeclaring av_gettime()
This avoids some warnings about redundant declarations.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Janne Grunau [Thu, 21 Jun 2012 15:59:56 +0000 (17:59 +0200)]
fix hardcoded tables compililation caused by missing math constants
Add -D_XOPEN_SOURCE=600 to host cflags to make the constants in math.h
available. Include math.h where necessary and remove redundant M_PI
defines.
Ronald S. Bultje [Wed, 20 Jun 2012 17:25:00 +0000 (10:25 -0700)]
lavf: Make codec_tag arrays constant
Signed-off-by: Martin Storsjö <martin@martin.st>
Ronald S. Bultje [Wed, 20 Jun 2012 17:11:43 +0000 (10:11 -0700)]
twinvq: give massive struct a name.
Signed-off-by: Martin Storsjö <martin@martin.st>
Mans Rullgard [Wed, 20 Jun 2012 16:28:34 +0000 (17:28 +0100)]
lavf, lavu: version bumps and APIchanges for av_gettime() move
Signed-off-by: Mans Rullgard <mans@mansr.com>
Anton Khirnov [Sun, 17 Jun 2012 08:21:49 +0000 (10:21 +0200)]
lavfi/audio: don't set cur_buf in ff_filter_samples().
It's redundant, since the input buffer is passed as a parameter to the
filter_samples() callback, and can lead to stale pointers remaining on
the link.
Anton Khirnov [Wed, 16 May 2012 06:21:47 +0000 (08:21 +0200)]
lavfi/fifo: add audio version of the fifo filter.
Anton Khirnov [Sun, 27 May 2012 20:45:52 +0000 (22:45 +0200)]
fifo: fix parenthesis placement.
Anton Khirnov [Wed, 16 May 2012 06:15:54 +0000 (08:15 +0200)]
lavfi: rename vf_fifo.c -> fifo.c
It will be used for audio too.
Anton Khirnov [Wed, 20 Jun 2012 16:36:14 +0000 (18:36 +0200)]
lavc: remove stats_in from AVCodecContext options table.
Its documentation states that it is allocated/freed by the caller, but
it is declared as an AV_OPT_TYPE_STRING AVOption. Since
367732832faaf1bac4ece37cf7fef8c911e16312 the AVOptions system frees
strings automatically. This can be considered an API break, since it
won't work when the caller doesn't use av_malloc() to allocate the
memory or wants to use the string after closing the codec.
Since there is not much value in this field being an AVOption, the best
solution is to remove it from the options table.
Kostya Shishkov [Fri, 15 Jun 2012 18:37:37 +0000 (20:37 +0200)]
MS Screen 1 decoder
Alex Converse [Wed, 20 Jun 2012 02:06:34 +0000 (19:06 -0700)]
aacdec: Fix popping channel layouts.
'channel_layout' not 'channels' from the stored configuration should go
to AVCodecContext's 'channel_layout'.
Mans Rullgard [Wed, 20 Jun 2012 12:46:52 +0000 (13:46 +0100)]
av_gettime: support Win32 without gettimeofday()
Based on patch by Ronald S. Bultje.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Wed, 20 Jun 2012 00:34:38 +0000 (01:34 +0100)]
Use av_gettime() in various places
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Wed, 20 Jun 2012 00:24:39 +0000 (01:24 +0100)]
Move av_gettime() to libavutil
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Wed, 20 Jun 2012 12:50:45 +0000 (13:50 +0100)]
dct-test: use emms_c() from libavutil instead of duplicating it
Ronald S. Bultje [Mon, 18 Jun 2012 19:06:35 +0000 (20:06 +0100)]
mov: fix operator precedence bug
Janne Grunau [Thu, 14 Jun 2012 18:13:00 +0000 (20:13 +0200)]
mathematics.h: remove a couple of math defines
While these defines are not defined by the C standard they are
standardized as X/Open System Interfaces Extension. We use the
appropiate _XOPEN_SOURCE define to make them available. They
seem to be available on all FATE configs since the constants
are used in files where mathematics.h is not included.
Mans Rullgard [Tue, 19 Jun 2012 21:08:35 +0000 (22:08 +0100)]
Remove unnecessary inclusions of [sys/]time.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Tue, 19 Jun 2012 14:11:34 +0000 (15:11 +0100)]
lavf: remove unnecessary inclusions of unistd.h
These files do not use anything provided by unistd.h.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Tue, 19 Jun 2012 14:14:33 +0000 (15:14 +0100)]
bfin: libswscale: add const where appropriate to fix warnings
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Tue, 19 Jun 2012 14:12:57 +0000 (15:12 +0100)]
bfin: libswscale: remove unnecessary #includes
Signed-off-by: Mans Rullgard <mans@mansr.com>
Martin Storsjö [Tue, 19 Jun 2012 14:59:57 +0000 (17:59 +0300)]
udp: Properly check for invalid sockets
If stdin has been closed, 0 is a valid socket descriptor.
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Tue, 19 Jun 2012 14:50:38 +0000 (17:50 +0300)]
tcp: Check the return value from getsockopt
Make sure we actually have an error code in ret, in case
getsockopt failed.
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Tue, 19 Jun 2012 12:37:06 +0000 (15:37 +0300)]
network: Use av_strerror for getting error messages
Also use ff_neterrno() instead of errno directly (which doesn't work
on windows), for getting the error code.
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Tue, 19 Jun 2012 12:28:48 +0000 (15:28 +0300)]
udp: Properly print error from getnameinfo
getnameinfo doesn't set errno on failure, it returns an error code,
which should be handled by gai_strerror instead of the normal
strerror.
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Tue, 19 Jun 2012 12:21:43 +0000 (15:21 +0300)]
mmst: Use AVUNERROR() to convert error codes to the right range for strerror
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Mon, 18 Jun 2012 20:39:30 +0000 (23:39 +0300)]
network: Pass pointers of the right type to get/setsockopt/ioctlsocket on windows
This avoids warnings.
Signed-off-by: Martin Storsjö <martin@martin.st>
Samuel Pitoiset [Tue, 19 Jun 2012 11:21:09 +0000 (13:21 +0200)]
rtmp: Reduce the number of idle posts sent by sleeping 50ms
Rtmpt is effectively half duplex - the server can't return any
data unless we send a request (to which the server responds). If
we don't have any data to send currently, and the server didn't
return any data either, wait a little before doing the next request.
This avoids busy looping with idle posts with empty replies, while
waiting for more data from the server.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diego Biurrun [Fri, 29 Jul 2011 10:02:54 +0000 (12:02 +0200)]
flvdec: remove incomplete, disabled seeking code
Ronald S. Bultje [Mon, 18 Jun 2012 13:37:02 +0000 (14:37 +0100)]
mem: add support for _aligned_malloc() as found on Windows
The check uses check_func_header, since this function is
conditionally available depending on the targeted MSVCRT
version.
Signed-off-by: Martin Storsjö <martin@martin.st>
Simon A. Eugster [Sat, 9 Jun 2012 09:16:12 +0000 (11:16 +0200)]
lavc: Extend the documentation for avcodec_init_packet
Add a note that pkt->data and pkt->size must be initialized.
Signed-off-by: Martin Storsjö <martin@martin.st>
Ronald S. Bultje [Mon, 18 Jun 2012 14:22:15 +0000 (15:22 +0100)]
flvdec: remove incomplete, disabled seeking code
Ronald S. Bultje [Mon, 18 Jun 2012 13:02:43 +0000 (14:02 +0100)]
http: replace atoll() with strtoll()
Ronald S. Bultje [Mon, 18 Jun 2012 12:57:59 +0000 (13:57 +0100)]
mpegts: remove unused/incomplete/broken seeking code
Justin Ruggles [Sat, 9 Jun 2012 03:59:04 +0000 (23:59 -0400)]
af_amix: allow float planar sample format as input
Justin Ruggles [Sat, 9 Jun 2012 02:34:30 +0000 (22:34 -0400)]
af_amix: use AVFloatDSPContext.vector_fmac_scalar()
Justin Ruggles [Sat, 9 Jun 2012 03:20:59 +0000 (23:20 -0400)]
float_dsp: add x86-optimized functions for vector_fmac_scalar()
Justin Ruggles [Fri, 8 Jun 2012 17:49:56 +0000 (13:49 -0400)]
float_dsp: Move vector_fmac_scalar() from libavcodec to libavutil
Justin Ruggles [Fri, 20 Apr 2012 20:09:15 +0000 (16:09 -0400)]
lavr: Add x86-optimized function for flt to s32 conversion
Justin Ruggles [Tue, 24 Apr 2012 02:22:28 +0000 (22:22 -0400)]
lavr: Add x86-optimized function for flt to s16 conversion
Justin Ruggles [Mon, 23 Apr 2012 22:29:58 +0000 (18:29 -0400)]
lavr: Add x86-optimized functions for s32 to flt conversion
Justin Ruggles [Fri, 20 Apr 2012 17:49:53 +0000 (13:49 -0400)]
lavr: Add x86-optimized functions for s32 to s16 conversion
Justin Ruggles [Tue, 24 Apr 2012 02:10:26 +0000 (22:10 -0400)]
lavr: Add x86-optimized functions for s16 to flt conversion
Justin Ruggles [Fri, 20 Apr 2012 19:48:08 +0000 (15:48 -0400)]
lavr: Add x86-optimized function for s16 to s32 conversion
Martin Storsjö [Sun, 17 Jun 2012 14:25:46 +0000 (17:25 +0300)]
rtpenc: Support packetizing iLBC
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Sun, 17 Jun 2012 13:12:53 +0000 (16:12 +0300)]
rtpdec: Add a depacketizer for iLBC
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Sun, 17 Jun 2012 12:54:31 +0000 (15:54 +0300)]
Implement the iLBC storage file format
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Sat, 16 Jun 2012 21:29:26 +0000 (00:29 +0300)]
mov: Support muxing/demuxing iLBC
The packet size, signalled via block_align, has to be passed via
the container.
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Fri, 15 Jun 2012 21:42:13 +0000 (00:42 +0300)]
Add support for iLBC decoding/encoding via the external library libilbc
The library is 3-clause BSD licensed.
Signed-off-by: Martin Storsjö <martin@martin.st>
Samuel Pitoiset [Mon, 18 Jun 2012 12:55:55 +0000 (14:55 +0200)]
rtmp: Don't send every flv packet in a separate HTTP request in RTMPT
Add a new option 'rtmp_flush_interval' that allows specifying the
number of packets to write before sending it off as a HTTP request.
This is mostly relevant for RTMPT - for plain RTMP, it only controls
how often we check the socket for incoming packets, which shouldn't
affect the performance in any noticeable way.
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Mon, 18 Jun 2012 13:19:33 +0000 (16:19 +0300)]
rtsp: Send mode=record instead of mode=receive
This seems to be the correct mode to send, according to the
original RTSP RFC, and matches the method RECORD which is
sent later when starting to send data.
Darwin Streaming Server works fine with either of them.
Signed-off-by: Martin Storsjö <martin@martin.st>
Ronald S. Bultje [Mon, 18 Jun 2012 11:57:25 +0000 (12:57 +0100)]
dirac: replace compound literal with normal initialiser
Signed-off-by: Mans Rullgard <mans@mansr.com>
Justin Ruggles [Tue, 29 May 2012 21:03:56 +0000 (17:03 -0400)]
lavr: add x86-optimized functions for mixing 1-to-2 s16p with flt coeffs
Justin Ruggles [Tue, 29 May 2012 21:03:40 +0000 (17:03 -0400)]
lavr: add x86-optimized functions for mixing 1-to-2 fltp with flt coeffs
John Stebbins [Sat, 9 Jun 2012 20:45:49 +0000 (13:45 -0700)]
Add Dolby/DPLII downmix support to libavresample
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Mans Rullgard [Sat, 16 Jun 2012 17:08:03 +0000 (18:08 +0100)]
vorbisdec: replace div/mod in loop with a counter
2x speedup of surround decoding on Cortex-A9.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Sat, 16 Jun 2012 15:14:21 +0000 (16:14 +0100)]
fate: vorbis: add 5.1 surround test
Signed-off-by: Mans Rullgard <mans@mansr.com>
Martin Storsjö [Mon, 28 May 2012 09:11:26 +0000 (12:11 +0300)]
rtpenc: Allow requesting H264 RTP packetization mode 0
This requires all NAL units to fit within single RTP packets. It
doesn't change the actual packetization for packets that fit, but
errors out and gives a helpful hint if the NAL units would have to
be split, and signals the right packetization mode in the SDP.
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Sun, 17 Jun 2012 21:05:52 +0000 (00:05 +0300)]
configure: Sort the library listings in the help text alphabetically
Only these three libraries were out of order, the rest was already
neatly sorted.
Signed-off-by: Martin Storsjö <martin@martin.st>
Ronald S. Bultje [Thu, 14 Jun 2012 10:47:55 +0000 (11:47 +0100)]
dwt: remove variable-length arrays
Signed-off-by: Mans Rullgard <mans@mansr.com>
Samuel Pitoiset [Sun, 17 Jun 2012 18:24:43 +0000 (20:24 +0200)]
RTMPT protocol support
This adds two protocols, but one of them is an internal implementation
detail just used as an abstraction layer/generalization in the code. The
RTMPT protocol implementation uses rtmphttp:// as an alternative to the
tcp:// protocol. This allows moving most of the lower level logic out
from the higher level generic rtmp code.
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Sun, 17 Jun 2012 18:19:41 +0000 (21:19 +0300)]
http: Properly handle chunked transfer-encoding for replies to post data
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Sun, 17 Jun 2012 18:15:32 +0000 (21:15 +0300)]
http: Fail reading if the connection has gone away
This can happen if doing a new request using the same socket,
but the new request failed, which clears the urlcontext.
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Sun, 17 Jun 2012 16:08:23 +0000 (19:08 +0300)]
amr: Mark an array const
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Sun, 17 Jun 2012 16:06:56 +0000 (19:06 +0300)]
amr: More space cleanup
This was missed in the previous cleanup patch.
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Sun, 17 Jun 2012 15:18:16 +0000 (18:18 +0300)]
rtpenc: Fix memory leaks in the muxer open function
Also return a proper error code in these cases.
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Sun, 17 Jun 2012 15:07:27 +0000 (18:07 +0300)]
amr: Cosmetic cleanup
Add spaces around operators, fix brace placement and whitespace to
match K&R style, vertically align code, remove redundant != 0 and
convert x == 0 into !x, drop useless braces.
Signed-off-by: Martin Storsjö <martin@martin.st>
Martin Storsjö [Sat, 16 Jun 2012 23:08:00 +0000 (02:08 +0300)]
mov_chan: Fix operator precedence by adding parentheses
Signed-off-by: Martin Storsjö <martin@martin.st>
Diego Biurrun [Thu, 14 Jun 2012 08:34:16 +0000 (10:34 +0200)]
doc: Add missing protocols to list of supported protocols.
Jordi Ortiz [Sat, 16 Jun 2012 10:29:53 +0000 (12:29 +0200)]
tcp: Check the listen call
Signed-off-by: Martin Storsjö <martin@martin.st>
Anton Khirnov [Fri, 15 Jun 2012 12:39:23 +0000 (14:39 +0200)]
flacdec: read attached pictures.
Anton Khirnov [Fri, 15 Jun 2012 17:58:11 +0000 (19:58 +0200)]
lavf: don't segfault when a NULL filename is passed to avformat_open_input()
This can easily happen when the caller is using a custom AVIOContext.
Behave as if the filename was an empty string in this case.
CC: libav-stable@libav.org
Janne Grunau [Fri, 15 Jun 2012 14:07:29 +0000 (16:07 +0200)]
af_resample: fix format modifier in debug string for FF_API_SAMPLERATE64
Janne Grunau [Thu, 14 Jun 2012 16:41:47 +0000 (18:41 +0200)]
segment: remove unnecessary <strings.h> include
Mans Rullgard [Thu, 14 Jun 2012 12:58:08 +0000 (12:58 +0000)]
fate: add snow hpel tests
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Diego Biurrun [Thu, 14 Jun 2012 08:19:06 +0000 (10:19 +0200)]
Avoid C99 variable declarations within for statements.
We generally do not declare variables within for statements and
there are compilers that choke on such constructs.
Samuel Pitoiset [Thu, 14 Jun 2012 13:28:40 +0000 (15:28 +0200)]
rtmp: Read and handle incoming packets while writing data
This makes sure all incoming packets are read and handled (and reacted
to) while sending an FLV stream over RTMP to a server. If there were
enough incoming data to fill the TCP buffers, this could potentially
make things block at unexpected places. For the upcoming RTMPT support,
we need to consume all incoming data before we can send the next
request.
Signed-off-by: Martin Storsjö <martin@martin.st>
Luca Barbato [Thu, 14 Jun 2012 18:27:31 +0000 (20:27 +0200)]
doc: document THREAD_TYPE fate variable
Martin Storsjö [Thu, 14 Jun 2012 12:13:14 +0000 (15:13 +0300)]
rtpdec: Don't require frames to start with a Mode A packet
While there is no reason for starting a frame with anything else
than a Mode A packet, some senders seem to consistently use Mode B
packets for everything. This fixes depacketization of such streams.
Signed-off-by: Martin Storsjö <martin@martin.st>
Anton Khirnov [Wed, 13 Jun 2012 11:33:42 +0000 (13:33 +0200)]
avconv: don't try to free threads that were not initialized.
Samuel Pitoiset [Wed, 13 Jun 2012 13:02:03 +0000 (15:02 +0200)]
rtmp: Add a new option 'rtmp_buffer', for setting the client buffer time
Signed-off-by: Martin Storsjö <martin@martin.st>
Samuel Pitoiset [Wed, 13 Jun 2012 12:48:02 +0000 (14:48 +0200)]
rtmp: Set the client buffer time to 3s instead of 0.26s
This factorizes existing code into a new function gen_buffer_time(),
which generates the client buffer time message and sends it to the
server.
Signed-off-by: Martin Storsjö <martin@martin.st>
Samuel Pitoiset [Wed, 13 Jun 2012 12:47:26 +0000 (14:47 +0200)]
rtmp: Handle server bandwidth packets
Signed-off-by: Martin Storsjö <martin@martin.st>
Samuel Pitoiset [Wed, 13 Jun 2012 12:45:57 +0000 (14:45 +0200)]
rtmp: Display a verbose message when an unknown packet type is received
Signed-off-by: Martin Storsjö <martin@martin.st>
Anton Khirnov [Wed, 13 Jun 2012 08:52:35 +0000 (10:52 +0200)]
lavfi/audio: use av_samples_copy() instead of custom code.
Fixes a possible invalid write, found by Nicolas George.
Anton Khirnov [Wed, 13 Jun 2012 08:17:28 +0000 (10:17 +0200)]
configure: add all filters hardcoded into avconv to avconv_deps
Anton Khirnov [Wed, 13 Jun 2012 08:12:08 +0000 (10:12 +0200)]
avfiltergraph: remove a redundant call to avfilter_get_by_name().
Anton Khirnov [Wed, 13 Jun 2012 08:10:31 +0000 (10:10 +0200)]
lavfi: allow building without swscale.
Diego Biurrun [Wed, 13 Jun 2012 10:17:06 +0000 (12:17 +0200)]
build: Do not delete tests/vsynth2 directory, which is no longer created.
Anton Khirnov [Tue, 12 Jun 2012 19:25:10 +0000 (21:25 +0200)]
lavfi: replace AVFilterContext.input/output_count with nb_inputs/outputs
This is more consistent with naming in the rest of Libav.
Anton Khirnov [Tue, 12 Jun 2012 18:12:42 +0000 (20:12 +0200)]
lavfi: make AVFilterPad opaque after two major bumps.
It will allow adding new fields to it without ABI breaks.