Commit Graph

8648 Commits

Author SHA1 Message Date
Anton Khirnov 25b51b2c44 id3v2: add a mimetype for bmp pictures. 2012-07-07 20:34:41 +02:00
Anton Khirnov b7d3a9a015 flacdec: be less strict when parsing attached pictures.
Only return an error if memory allocation fails or error recognition is
set to explode. Otherwise just print an error message and continue
reading the file.
2012-07-07 20:34:20 +02:00
Anton Khirnov dba5b06ead flacdec: don't create an attached picture stream until we have all information.
This way we don't end with an invalid stream if parsing the picture
fails.
2012-07-07 20:33:44 +02:00
Ronald S. Bultje fdaad6354f mxfdec: replace x>>av_log2(sizeof(..)) by x/sizeof(..).
Also replace x>>av_log2(sizeof(..)) + 1 by x/sizeof(..). The +1 is
probably meant to emulate av_log2_ceil(sizeof(..)) in cases where ".."
is not a power of two.
2012-07-07 10:09:59 -07:00
Martin Storsjö e43f56b205 flvdec: Treat all nellymoser versions as the same codec
This avoids creating new AVStreams for them when switching between
different variants of them, since we can handle changes between
different sample rates of nellymoser within the same stream.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-05 22:07:45 +03:00
Luca Barbato 5b54a90c8b flvdec: optionally trust the metadata
In certain conditions video or audio frames might appear way later in the
stream.
2012-07-05 10:37:34 +02:00
Ronald S. Bultje 1ce1e6360d mov: use forward declaration of a function instead of a table.
MSVC gives a compile error on the tentative definition of
mov_default_parse_table[].
2012-07-04 07:45:30 -07:00
Diego Biurrun 2047e40e6e Clarify Doxygen comment for FF_API_* #defines. 2012-07-04 15:10:10 +02:00
Diego Biurrun 09f211987c misc typo and wording fixes 2012-07-03 17:35:11 +02:00
Luca Barbato 09a445ce34 flvdec: initial stream switch support
Codec change midstream gets mapped to a separate stream.
2012-07-03 15:35:51 +02:00
Anton Khirnov 5e745cefc0 asfdec: read attached pictures. 2012-07-02 16:16:45 +02:00
Anton Khirnov 728d2afa17 apetag: reindent 2012-07-02 16:16:38 +02:00
Anton Khirnov 02a951b919 apetag: export attached covers as video streams. 2012-07-02 16:16:11 +02:00
Anton Khirnov b72767df8e apetag: fix the amount of data read from binary tags.
Substract the filename size from the data size.
2012-07-02 16:15:45 +02:00
Anton Khirnov f2e175c756 apetag: make sure avio_get_str() doesn't read more than it should. 2012-07-02 16:15:34 +02:00
Anton Khirnov a02b8c695c mov: read itunes cover art. 2012-07-02 16:14:25 +02:00
Kostya Shishkov edf35d8342 MS ATC Screen (aka MSS3) decoder 2012-07-02 07:14:44 +02:00
Ronald S. Bultje 5a608a239b os_support: Add fallback definitions for stat flags
Mingw headers provide similar defines already (unconditional #defines,
without any #undef or #ifdef around it), while MSVC doesn't have
them.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-30 15:18:50 +03:00
Martin Storsjö cab2eb87f9 os_support: Rename the poll fallback function to ff_poll
The fallback function is a non-static function, we shouldn't be
defining non-static functions outside of the proper ff/av prefix
namespaces.

This is especially important for a function like poll, which
other parties (other libraries, or executables linking these
libraries) also might provide similar but incompatible fallbacks for.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-30 15:18:17 +03:00
Martin Storsjö cdee08e365 network: Check for struct pollfd
We need to include winsock2.h here, to make sure we have the
real pollfd struct definition, if one exists, before defining the
fallback poll function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-30 15:18:06 +03:00
Martin Storsjö 71078ad333 os_support: Don't compare a negative number against socket descriptors
The fds are unsigned integers in the windows definition of struct
sockfds. Due to this, the comparison if (fds[i].fd > n) was always
false.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-30 15:17:52 +03:00
Ronald S. Bultje 5aff37d28d os_support: Include all the necessary headers for the win32 open function
io.h is required for open and _wopen, and fcntl.h is required for
the O_CREAT flag. On mingw, fcntl.h is included by os_support.h (and
the mingw fcntl.h includes io.h), but include it explicitly here
since this implementation requires it.

Also move the #undef open up. open must not be defined to ff_win32_open
while including the headers that declare the open function. On mingw,
this happened in os_support.h before open was redirected.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-30 15:16:43 +03:00
Ronald S. Bultje 3b1ab197be file: Only include unistd.h if it exists
It is included for the open/read/write/close functions. On
MSVC, where this header does not exist, the same functions
are provided by io.h, which is already included.

On windows, these functions are provided by io.h. Make sure
io.h is included if it exists, regardless of the setmode
function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-29 15:53:41 +03:00
Ronald S. Bultje dfb57fc596 rtpdec: Don't explicitly include unistd.h any longer
unistd.h used to be required for gethostname. On windows, gethostname
is provided by winsock2.h. Now network.h includes both unistd.h and
winsock2.h if they exist.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-29 15:38:10 +03:00
Damien Fetis b92c7ee662 flv: add support for G.711
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-06-28 16:53:09 +02:00
Luca Barbato 1cb34ea4fe flvenc: K&R formatting cosmetics 2012-06-28 13:05:43 +02:00
Alex Converse a112822597 movenc: Add channel layouts for PCM. 2012-06-27 13:47:58 -07:00
Martin Storsjö 75d339e044 udp: Support IGMPv3 source specific multicast and source blocking
Based on an original patch by Stephen D'Angelo <SDAngelo@evertz.com>.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-27 14:39:00 +03:00
Jordi Ortiz ef882e464a tcp: Pass NULL as hostname to getaddrinfo if the string is empty
This gives you the proper v4 or v6 version of the "any address",
allowing receiving connections on any address on the machine.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-27 14:04:02 +03:00
Jordi Ortiz 58f3e09ee4 tcp: Set AI_PASSIVE when the socket will be used for listening
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-27 14:04:02 +03:00
Anton Khirnov ce0a975689 mpc8: read APE tags. 2012-06-26 19:05:24 +02:00
Ronald S. Bultje 4b1b1449d9 network: Don't redefine error codes if they already exist in errno.h
Since the errno.h values don't match the error codes that winsock
returns, map the winsock error codes to the errno ones, to make
sure explicit checks against AVERROR(x) match.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-26 17:22:21 +03:00
Ronald S. Bultje e64bceeac0 configure: Check for sys/time.h
Apparently this include is needed on some systems for building the
poll fallback (for the timeval struct for select?), but it isn't
available on all systems. Thus only include it if it exists.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-26 17:22:21 +03:00
Martin Storsjö 39dba5aa1b network: Include unistd.h from network.h
This heaader is required for close() for sockets in network
code. For winsock, the equivalent function is defined in the
winsock2.h header.

This avoids having the HAVE_UNISTD_H in all files dealing with
raw sockets.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-26 17:22:21 +03:00
Carl Eugen Hoyos fbcaceb1ff mov: do not try to read total disc/track number if data atom is too short.
Fixes bug 308.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-06-26 13:12:50 +02:00
Martin Storsjö dc53858063 wtv: Check the return value from gmtime
On MSVC, gmtime returns NULL for values outside of their supported
range (and these show up in our fate test). This doesn't seem
to affect the actual fate test result.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-25 16:20:08 +03:00
Anton Khirnov 980e65f119 ape: create audio stream before reading tags.
Tags may contain attached picture, which will be exported as video
streams.

This ensures that the audio stream is always the first.
2012-06-24 07:55:33 +02:00
Anton Khirnov a7b8ff94b1 mov: make a length variable larger.
Right now, it's uint16_t, but for itunes metadata a 32bit number is
stored in it.
2012-06-24 07:54:29 +02:00
Mashiat Sarker Shakkhar f57d2f587b image2: Add "start_number" private option to the demuxer
Currently if a pattern is given we look for up to the fifth file name in
the sequence. This option sets that limit to an arbitrary number.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-06-24 07:37:38 +02:00
Mashiat Sarker Shakkhar b5bce20cc3 image2: Add "start_number" private option to the muxer
This adds the capability to start counting file number from an arbitrary
integer.

This includes a few lines of trivial code from FFmpeg codebase.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-06-24 07:35:54 +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
Mans Rullgard c19e0ebe53 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>
2012-06-21 22:53:05 +01:00
Ronald S. Bultje 67ffcb9613 lavf: Make codec_tag arrays constant
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-21 16:11:29 +03:00
Mans Rullgard dc7e336cae lavf, lavu: version bumps and APIchanges for av_gettime() move
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-21 11:45:28 +01:00
Kostya Shishkov 005c80b645 MS Screen 1 decoder 2012-06-20 19:08:10 +02:00
Mans Rullgard ae0a301668 Move av_gettime() to libavutil
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-20 17:09:03 +01:00
Ronald S. Bultje f1f37c7011 mov: fix operator precedence bug 2012-06-20 15:37:01 +01:00
Mans Rullgard 6501dcfb5e Remove unnecessary inclusions of [sys/]time.h
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-20 11:46:46 +01:00
Mans Rullgard 4e5a514813 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>
2012-06-20 11:46:30 +01:00
Martin Storsjö 042b272a4a 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>
2012-06-19 20:25:09 +03:00
Martin Storsjö bb6c1abb0e 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>
2012-06-19 20:25:07 +03:00
Martin Storsjö a840cdda6c 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>
2012-06-19 20:24:55 +03:00
Martin Storsjö 860b40f1f2 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>
2012-06-19 20:24:33 +03:00
Martin Storsjö 6aa4e88106 mmst: Use AVUNERROR() to convert error codes to the right range for strerror
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-19 20:23:19 +03:00
Martin Storsjö 561687696f network: Pass pointers of the right type to get/setsockopt/ioctlsocket on windows
This avoids warnings.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-19 20:22:47 +03:00
Samuel Pitoiset 9d811fd80f 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>
2012-06-19 20:21:21 +03:00
Ronald S. Bultje 8703f0140f flvdec: remove incomplete, disabled seeking code 2012-06-19 01:02:10 +01:00
Ronald S. Bultje 51a2b5546b http: replace atoll() with strtoll() 2012-06-19 01:00:13 +01:00
Ronald S. Bultje ae2bb52cd2 mpegts: remove unused/incomplete/broken seeking code 2012-06-19 00:56:43 +01:00
Martin Storsjö 579fd87b46 rtpenc: Support packetizing iLBC
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-18 22:01:04 +03:00
Martin Storsjö 89c3960544 rtpdec: Add a depacketizer for iLBC
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-18 22:01:04 +03:00
Martin Storsjö a2b251a05e Implement the iLBC storage file format
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-18 22:01:02 +03:00
Martin Storsjö 9e74db6850 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>
2012-06-18 22:00:35 +03:00
Samuel Pitoiset 46743a859c 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>
2012-06-18 22:00:31 +03:00
Martin Storsjö bbc8038614 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>
2012-06-18 21:35:28 +03:00
Martin Storsjö d77f4afa98 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>
2012-06-18 12:27:56 +03:00
Samuel Pitoiset 8e50c57dcb 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>
2012-06-17 22:56:56 +03:00
Martin Storsjö 35127bf156 http: Properly handle chunked transfer-encoding for replies to post data
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-17 22:56:56 +03:00
Martin Storsjö eb564b23a3 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>
2012-06-17 22:56:51 +03:00
Martin Storsjö eb3918c1fd amr: Mark an array const
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-17 22:50:06 +03:00
Martin Storsjö 634e874de5 amr: More space cleanup
This was missed in the previous cleanup patch.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-17 22:50:04 +03:00
Martin Storsjö e9ef88fbd2 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>
2012-06-17 22:49:25 +03:00
Martin Storsjö 5f26d4d448 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>
2012-06-17 19:04:46 +03:00
Martin Storsjö 44fdf37c94 mov_chan: Fix operator precedence by adding parentheses
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-17 17:51:50 +03:00
Jordi Ortiz a7cc78cb11 tcp: Check the listen call
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-17 13:22:36 +03:00
Anton Khirnov ae702edf43 flacdec: read attached pictures. 2012-06-16 17:10:23 +02:00
Anton Khirnov a5db8e4a1a 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
2012-06-16 17:09:33 +02:00
Janne Grunau 1cdcf043ca segment: remove unnecessary <strings.h> include 2012-06-15 19:10:58 +02:00
Samuel Pitoiset 7dc747f50b 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>
2012-06-14 22:22:58 +03:00
Martin Storsjö d1beee0701 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>
2012-06-14 22:11:43 +03:00
Samuel Pitoiset 8517e9c476 rtmp: Add a new option 'rtmp_buffer', for setting the client buffer time
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-13 17:04:39 +03:00
Samuel Pitoiset 9477c035a7 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>
2012-06-13 16:53:32 +03:00
Samuel Pitoiset c2d38beab2 rtmp: Handle server bandwidth packets
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-13 16:52:52 +03:00
Samuel Pitoiset 9ff930aace rtmp: Display a verbose message when an unknown packet type is received
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-13 16:52:31 +03:00
Martin Storsjö 0533868642 rtmp: Tokenize the AMF connection parameters manually instead of using strtok_r
This fixes builds on platforms without strtok_r (windows).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-13 11:36:47 +03:00
Samuel Pitoiset 0a9a225733 rtmp: Fix a possible access to invalid memory location when the playpath is too short.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-12 14:33:57 +03:00
Samuel Pitoiset f862537de8 rtmp: Do not send extension for flv files
This fixes bugzilla bug #304.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-11 13:48:39 +03:00
Samuel Pitoiset 8ee3e1874e rtmp: support connection parameters
Allow using connection parameters in order to append arbitrary
AMF data like "B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0" to the
Connect message. You can pass these parameters through the -rtmp_conn
option.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-11 13:46:50 +03:00
Mans Rullgard 8aa93e9004 mov: set AVCodecContext.width/height for h264
This is required for correct cropping of files from Canon
cameras.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-09 15:08:51 +01:00
Alex Converse a8656cd425 mpegts: Remove disabled extension matching probe. 2012-06-07 12:27:04 -07:00
Alex Converse f0ff9eb493 avformat: Probe codecs at score 0 on buffer exhaustion conditions. 2012-06-05 09:51:51 -07:00
Alex Converse 62bebf6edb avformat: Factorize codec probing. 2012-06-05 09:51:51 -07:00
Kostya Shishkov c6061443f7 Indeo Audio decoder 2012-06-05 18:30:54 +02:00
Alex Converse 41e9682af2 movenc: Write chan atom for all audio tracks in mov mode movies. 2012-06-04 10:08:31 -07:00
Jindřich Makovička 84e430dd7b mpegtsenc: use avio_open_dyn_buf(), zero pointers after freeing
Per suggestion by Michael Niedermayer.

Signed-off-by: Jindřich Makovička <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-04 15:41:09 +03:00
Anton Khirnov a982e5a031 avidec: make scale and rate unsigned.
The specs say they are unsigned 32bit integers.
2012-06-04 14:18:49 +02:00
Anton Khirnov 19dfbf1915 librtmp: return AVERROR_UNKNOWN instead of -1. 2012-06-03 15:46:27 +02:00
Anton Khirnov a91943bcef librtmp: don't abuse a variable for two unrelated things. 2012-06-03 15:46:16 +02:00
Anton Khirnov 007aedeebf librtmp: add rtmp_app and rtmp_playpath private options.
This makes it easier to switch between native rtmp and librtmp.
2012-06-03 15:45:55 +02:00
Luca Barbato 21e2dc9fb7 flv: support stream text data as onTextData
Adobe specifies onTextData as the standard message to use to deliver
text information.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-06-03 03:36:01 +02:00
Jindrich Makovicka 2439bd8681 mpegtsenc: Support LATM packetization for AAC
This adds the avoption mpegts_flags and converts the existing
resend_headers option into a flag, keeping the old option as
fallback for now.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-03 01:20:41 +03:00
Jindrich Makovicka 485d3ea064 adtsenc: Don't expose the muxer internals to the rest of lavf
This isn't required any longer, when the mpegts muxer uses it
as a proper chained muxer.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-03 01:18:11 +03:00
Jindrich Makovicka b1c56eabe8 mpegtsenc: use AVFormatContext for AAC packetization
This removes the dependency on adts.c internals, and simplifies
adding other packetization formats.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-03 01:17:48 +03:00
Jindrich Makovicka d1a3a3d4b2 mpegtsenc: use AVERROR() for return codes
Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-03 01:13:35 +03:00
Martin Storsjö dbaf79c9d7 http: Add the url_shutdown function for https, too
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-01 18:38:31 +03:00
Martin Storsjö 5952564185 http: Simplify code by removing a local variable
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-01 18:38:29 +03:00
Martin Storsjö 3cbcfa2dec http: Clear the old URLContext pointer when closed
This fixes issues with opening http urls that have authentication
or redirects, introduced in commit e999b641.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-01 18:38:28 +03:00
Martin Storsjö b7c3772be8 tcp: Try enabling SO_REUSEADDR when listening
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-01 01:56:22 +03:00
Martin Storsjö 641f4a885f tcp: Check the return values from bind and accept
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-06-01 01:56:21 +03:00
Oka Motofumi 5c742005fb avisynth: Make sure the filename passed to avisynth is in the right code page
avisynth is a non-unicode application and cannot accept UTF-8
characters. Therefore, the input filename should be converted to
the correct code page that it expects.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-31 22:39:08 +03:00
Samuel Pitoiset 9613240f72 http: Pass the proper return code of net IO operations
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-30 23:46:51 +03:00
Samuel Pitoiset 1876e7c0c2 http: Add 'post_data', a new option which sets custom HTTP post data
This allows doing http posts with a content-length header sent
in advance, avoiding chunked encoding.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-30 23:41:05 +03:00
Ronald S. Bultje 64bde80563 mp3/ac3 probe: search for PES headers to prevent probing MPEG-PS as MP3. 2012-05-30 09:08:29 -07:00
Samuel Pitoiset e999b641df http: Add support for reusing the http socket for subsequent requests
Introduce ff_http_do_new_request(), a new function which sends a new
HTTP request, reusing the existing connection to the server.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-28 16:42:40 +03:00
Samuel Pitoiset 3bdb438e65 http: Add support for using persistent connections
Add a new AVOption 'multiple_requests', which indicates if we want
to use persistent connections (ie. Connection: keep-alive).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-28 16:42:14 +03:00
Martin Storsjö 6099543ad4 rtsp: Check for dynamic payload handlers if no static payload mapping was found
Some systems abuse the static payload types 35 or 36 (which
according to IANA are unassigned) for H264.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-26 21:58:18 +03:00
Martin Storsjö 68c813081b rtpenc_chain: Return an error code instead of just a plain pointer
Also check the return value in sapenc.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-26 13:35:44 +03:00
Martin Storsjö 93cef6f923 rtpenc_chain: Free the URLContext on failure
If an URLContext is passed in, its ownership is given to this
function, and is either owned by the returned AVFormatContext
on a successful return, or freed on failure.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-26 13:35:44 +03:00
Martin Storsjö 2dcb21a95d rtpenc: Expose the ssrc as an avoption
This allows the caller to set it, and allows the caller to query
what it was set to.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-26 13:35:39 +03:00
Martin Storsjö 39e29aa019 cosmetics: Fix indentation
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-26 00:34:20 +03:00
Luca Barbato c6eeb9b7b6 rtmp: fix url parsing
The application component can have a subcomponent to specify the
application instance even if it doesn't have a ":" in the playpath.
2012-05-25 14:20:34 -07:00
Alex Converse ed7bdd8647 movenc: Don't write the 'wave' atom or its child 'enda' for lpcm audio.
It's left over from stsd v0. QuickTime 7 no longer writes 'wave' or 'enda'
when 'lpcm' is the audio tag.
2012-05-25 11:24:43 -07:00
Samuel Pitoiset 177bcc9593 rtmp: Pass the proper return code in rtmp_handshake
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-24 22:16:46 +03:00
Samuel Pitoiset bba287fdac rtmp: Check return codes of net IO operations
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-24 22:16:46 +03:00
Samuel Pitoiset a4d3f3580b rtmp: Return a proper error code instead of -1
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-24 00:25:36 +03:00
Samuel Pitoiset 08e93f5b46 rtmp: Check malloc calls
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-24 00:25:35 +03:00
Samuel Pitoiset f645f1d6ea rtmp: Check ff_rtmp_packet_create calls
Check malloc calls used by ff_rtmp_packet_create, unify error
handling and pass on error codes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-24 00:25:35 +03:00
Martin Storsjö 1e8561e369 flvdec: Make sure sample_rate is set to the updated value
The sample_rate variable is used for checks for audio format
changes at the end of the function.

This fixes cases where the sample rate was set from the codec
id by flv_set_audio_codec (as for nellymoser 8 kHz/16 kHz),
so the value set to last_sample_rate wasn't equal to sample_rate
at this point. This caused the demuxer otherwise reports a spurious
change to 5512 Hz and back to the correct one.

Updating channels in the same way is only done for consistency.
Currently, flv_set_audio_codec doesn't update that value.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-23 22:23:43 +03:00
Dave Yeo 3f9d6e4239 os_support: Define SHUT_RD, SHUT_WR and SHUT_RDWR on OS/2
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-23 10:38:14 +03:00
Samuel Pitoiset e5773d8bc3 http: Add support for reading http POST reply headers
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-22 23:16:46 +03:00
Samuel Pitoiset ba354a8cc0 http: Add http_shutdown() for ending writing of posts
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-22 23:16:44 +03:00
Samuel Pitoiset 4a9ca93556 tcp: Allow signalling end of reading/writing
tcp_shutdown() isn't needed at the moment, but is added for
consistency to explain how the function is supposed to be used.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-22 23:16:42 +03:00
Samuel Pitoiset 32d545e0a4 avio: Add a function for signalling end of reading/writing
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-22 23:16:41 +03:00
Diego Biurrun db9e00f469 Remove libnut wrapper
libnut is unmaintained and known to be buggy; native NUT code exists.
2012-05-21 08:51:50 +02:00
James Zern e9cef89702 avformat: Add a flag to mark muxers that allow (non strict) monotone timestamps.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-05-20 19:50:32 -04:00
Samuel Pitoiset 5d603f1b65 http: Factorize the code by adding http_read_header()
This function is used for reading http reply headers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-20 20:20:50 +03:00
Mans Rullgard 68aef0b481 lavf: change some (de)muxer names to lowercase
This is consistent with other format names.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-19 19:44:16 +01:00
Mans Rullgard 81ad97eeda lavf: make output format matching case insensitive
This is consistent with how input formats are matched.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-19 19:44:15 +01:00
Anton Khirnov 755cd4197d mov: enable parsing for VC-1.
This makes lavf discard broken timestamps for non-B frames in
samples/isom/vc1-wmapro.ism.
2012-05-18 19:38:21 +02:00
Martin Storsjö 4b7304e80d rtmp: Don't assume path points to a string of nonzero length
If using the new -rtmp_app and -rtmp_playpath parameters,
one can in many cases set the main url to just rtmp://server/.
If the trailing slash is omitted, path is a string of zero length,
and using path+1 will end up reading uninitialized data.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-17 21:16:52 +03:00
Mans Rullgard db465be45d lavf: add mdec to is_intra_only() list
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-15 15:49:56 +01:00
Mans Rullgard 7c6d240665 mtv: do not byteswap raw video in demuxer
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-14 20:26:39 +01:00
Diego Biurrun 70be4dddc8 gxfenc: remove disabled half-implemented MJPEG tag 2012-05-14 15:38:42 +02:00
Samuel Pitoiset d55961fa82 rtmp: Implement check bandwidth notification.
According to the behaviour of librtmp, it is recommended to send this
message to the server after receiving the 'onBWDone' callback in order
to do bandwidth checking and improve compatibility with some servers.
2012-05-10 13:55:32 +03:00
Samuel Pitoiset 05945db9ce rtmp: Support 'rtmp_swfurl', an option which specifies the URL of the SWF player. 2012-05-10 13:55:31 +03:00
Samuel Pitoiset e64673e4f4 rtmp: Support 'rtmp_flashver', an option which overrides the version of the Flash plugin. 2012-05-10 13:55:30 +03:00
Samuel Pitoiset 55c9320e06 rtmp: Support 'rtmp_tcurl', an option which overrides the URL of the target stream.
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-05-10 13:55:26 +03:00
Sean McGovern ded69c5e21 sctp: be consistent with socket option level
Replace SOL_SCTP by the more portable IPPROTO_SCTP.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-05-10 00:01:45 +02:00
Diego Biurrun 59cbc4eee2 mov: make one comment slightly more specific 2012-05-09 23:12:37 +02:00
Luca Barbato 5699884c2e sctp: Initial tcp-alike sctp support with streams
Signed-off-by: Jordi Ortiz <nenjordi@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-05-08 16:06:49 -07:00