Anton Khirnov [Sat, 23 Jun 2012 14:02:45 +0000 (16:02 +0200)]
avconv: remove redundant handling of async.
Because of a mistake during merging the code for simple and complex
filtergraphs, -async inserts an asyncts filter both on input and output.
Remove the output hunk.
Mans Rullgard [Fri, 22 Jun 2012 17:52:27 +0000 (18:52 +0100)]
h264: use asm cabac reader under a generic condition
This removes a dependency on implementation details from generic
code and allows easy addition of the equivalent optimisation for
other architectures than x86.
It currently does the following:
1) get a zeroed audio buffer
2) copy some properties (but not the data) of the input buffer to it
3) pass this buffer to the output filter
This looks useless and is indeed not used by any filters, therefore
delete it.
Make ff_null_filter_samples() (just pass the buffer to the next filter)
the new default.
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.
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.
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).
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, 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.
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.
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.
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.
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.
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.
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.
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.