| Branch: | Revision:

ffmpeg / libavformat / rtsp.c @ acaceca2

History | View | Annotate | Download (67.4 KB)

# Date Author Comment
f87b1b37 04/07/2011 04:07 PM Anton Khirnov

avio: AVIO_ prefixes for URL_ open flags.

1869ea03 04/04/2011 03:45 PM Anton Khirnov

avio: make url_get_file_handle() internal.

e52a9145 04/04/2011 03:45 PM Anton Khirnov

avio: make url_close() internal.

925e908b 04/04/2011 03:45 PM Anton Khirnov

avio: make url_write() internal.

dce37564 04/04/2011 03:45 PM Anton Khirnov

avio: make url_read_complete() internal.

bc371aca 04/04/2011 03:45 PM Anton Khirnov

avio: make url_read() internal.

0589da0a 04/04/2011 03:45 PM Anton Khirnov

avio: make url_open() internal.

62eaaeac 04/04/2011 03:45 PM Anton Khirnov

avio: make url_connect internal.

5652bb94 04/04/2011 03:45 PM Anton Khirnov

avio: make url_alloc internal.

6dc7d80d 04/03/2011 08:47 PM Anton Khirnov

avio: avio_ prefix for url_close_dyn_buf

895678f8 03/21/2011 07:58 PM Martin Storsjö

rtsp: Specify unicast for TCP interleaved streams, too

According to the RFC, the default is multicast if nothing is
specified, which doesn't make sense for TCP.

According to a bug report, some Axis camera models give a
"400 Bad Request" error if this is omitted....

2912e87a 03/19/2011 01:33 PM Mans Rullgard

Replace FFmpeg with Libav in licence headers

Signed-off-by: Mans Rullgard <>

c76374c6 03/15/2011 12:09 PM Nicolas George

Use AVERROR_EXIT with url_interrupt_cb.

Functions interrupted by url_interrupt_cb should not be restarted.
Therefore using AVERROR was wrong, as it did not allow to distinguish
when the underlying system call was interrupted and actually needed to be...

22a3212e 02/23/2011 03:18 PM Anton Khirnov

avio: rename url_fopen/fclose -> avio_open/close.

Signed-off-by: Ronald S. Bultje <>

28c4741a 02/23/2011 12:21 PM Martin Storsjö

libavformat: Remove FF_NETERRNO()

Map EAGAIN and EINTR from ff_neterrno to the normal AVERROR
error codes. Provide fallback definitions of other errno.h network
errors, mapping them to the corresponding winsock errors.

This eases catching these error codes in common code, without having...

b7effd4e 02/21/2011 04:23 PM Anton Khirnov

avio: avio_ prefixes for get_* functions

In the name of consistency:
get_byte -> avio_r8
get_<type> -> avio_r<type>
get_buffer -> avio_read

get_partial_buffer will be made private later

get_strz is left out becase I want to change it later to return...

e731b8d8 02/20/2011 01:37 PM Anton Khirnov

avio: move init_put_byte() to a new private header and rename it

init_put_byte should never be used outside of lavf, since
sizeof(AVIOContext) isn't part of public ABI.

Signed-off-by: Ronald S. Bultje <>

ae628ec1 02/20/2011 01:37 PM Anton Khirnov

avio: rename ByteIOContext to AVIOContext.

Signed-off-by: Ronald S. Bultje <>

9fcae973 02/16/2011 11:39 PM Anton Khirnov

Replace remaining uses of parse_date with av_parse_time.

Signed-off-by: Mans Rullgard <>

2c35a6bd 02/16/2011 11:37 PM Martin Storsjö

rtsp: udp_read_packet returning 0 doesn't mean success

If udp_read_packet returns 0, rtsp_st isn't set and we shouldn't
treat it as a successfully received packet (which is counted and
possibly triggers a RTCP receiver report).

This fixes issue 2612.

b2dd842d 02/11/2011 09:58 PM Martin Storsjö

rtsp/rdt: Assign the RTSPStream index to AVStream->id

This is used for mapping AVStreams back to their corresponding
RTSPStream. Since d9c0510, the RTSPStream pointer isn't stored in
AVStream->priv_data any longer, breaking this mapping from AVStreams
to RTSPStreams....

b22dbb29 02/04/2011 04:39 PM Martin Storsjö

Use avformat_free_context for cleaning up muxers

Signed-off-by: Ronald S. Bultje <>

1338dc08 02/04/2011 04:28 PM Martin Storsjö

libavformat: Use avcodec_copy_context for chained muxers

This avoids having the chained AVStream->codec point to the same
AVCodecContext owned by the outer AVStream. The downside is that
changes to the AVCodecContext made after calling av_write_header
cannot be detected automatically within the chained muxer....

ce41c51b 02/03/2011 12:03 AM Martin Storsjö

Free AVStream->info in chained muxers

This fixes memory leaks in the RTSP muxer and RTP hinting in the
mov muxer present since SVN rev 25418.

Signed-off-by: Luca Barbato <>

d9c0510e 02/02/2011 11:49 PM Martin Storsjö

rtsp: Don't store RTSPStream in AVStream->priv_data

For mpegts in RTP, there isn't a direct mapping between RTSPStreams
and AVStreams, and the RTSPStream isn't ever stored in
AVStream->priv_data, which was earlier leaked. The fix for this
leak, in ea7f080749d68a431226ce196014da38761a0d82, lead to...

ea7f0807 02/01/2011 07:40 PM Luca Barbato

Free the RTSPStreams in ff_rtsp_close_streams

This plugs a small memory leak

Signed-off-by: Janne Grunau <>

dfd2a005 01/29/2011 10:55 PM Luca Barbato

Replace dprintf with av_dlog

dprintf clashes with POSIX.1-2008

f81c7ac7 01/28/2011 02:45 PM Luca Barbato

rtsp: make ff_sdp_parse return value forwarded

the sdp demuxer did not forward it at all while the rtsp demuxer assumed
a single kind of error

a8475bbd 01/28/2011 02:45 PM Luca Barbato

os: replace select with poll

Select has limitations on the fd values it could accept and silently
breaks when it is reached.

c6610a21 01/26/2011 10:10 PM Diego Elio Pettenò

Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.

This also lists the objects from those two libraries as internal (by adding
the ff_ prefix) so that they can then be hidden via linker scripts.

57c4d01e 01/25/2011 09:10 PM Diego Elio Pettenò

Make ff_rtsp_send_cmd_with_content_async static to rtsp.c.

Signed-off-by: Janne Grunau <>

2762a7a2 01/24/2011 09:49 PM Martin Storsjö

rtspdec: Retry with TCP if UDP failed

Signed-off-by: Janne Grunau <>

aeb2de1c 01/24/2011 09:46 PM Martin Storsjo

rtsp: Use ff_rtsp_undo_setup in the cleanup code in ff_rtsp_make_request

Signed-off-by: Janne Grunau <>

93e7490e 01/24/2011 09:46 PM Martin Storsjo

rtsp: Split out a function undoing the setup made by ff_rtsp_make_setup_request

Signed-off-by: Janne Grunau <>

fef5649a 01/24/2011 09:46 PM Martin Storsjo

rtsp: Make make_setup_request a nonstatic function

Signed-off-by: Janne Grunau <>

a3b058b7 01/09/2011 10:47 AM Martin Storsjö

rtsp: Properly fail if unable to open an input RTP port

Originally committed as revision 26285 to svn://

a92c30d7 01/06/2011 03:22 PM Martin Storsjö

rtsp: Allow requesting of filtering of source packets

If filtered, only packets from the right source address and port
are received.

To test, play back e.g. some mpeg4 video RTSP stream (where the
video stream is the first stream in the presentation) over UDP....

29db7c3a 01/05/2011 09:23 PM Martin Storsjö

rtsp: Parse RTP-Info headers

Originally committed as revision 26236 to svn://

d2995eb9 01/02/2011 10:11 AM Martin Storsjö

rtsp: Store the Content-Base header value straight to the target

This avoids having a large temporary buffer in the struct used for
storing the rtsp reply headers.

Originally committed as revision 26192 to svn://

77223c53 01/02/2011 10:10 AM Martin Storsjö

rtsp: Pass the method name to ff_rtsp_parse_line

Originally committed as revision 26191 to svn://

acc9ed14 01/02/2011 10:07 AM Martin Storsjö

rtsp: Pass RTSPState to ff_rtsp_parse_line, instead of HTTPAuthState

This allows ff_rtsp_parse_line to do more changes directly in RTSPState
when parsing the reply, instead of having to store large amounts of
temporary data in RTSPMessageHeader.

Originally committed as revision 26190 to svn://

3df54c6b 01/02/2011 10:06 AM Martin Storsjö

rtsp: Add a method parameter to ff_rtsp_read_reply

Originally committed as revision 26189 to svn://

3a1cdcc7 01/01/2011 10:27 PM Martin Storsjö

rtpdec: Emit timestamps for packets before the first RTCP packet, too

Emitted timestamps in each stream start from 0, for the first received
RTP packet. Once an RTCP packet is received, that one is used for
sync, emitting timestamps that fit seamlessly into the earlier ones....

9e99f84f 12/27/2010 09:56 AM Martin Storsjö

rtsp: Check if the rtp stream actually has an RTPDemuxContext

For example MS-RTSP doesn't have RTPDemuxContexts for all streams.

This fixes issue 2448.

Originally committed as revision 26107 to svn://

8c579c1c 12/23/2010 03:05 PM Martin Storsjö

rtsp: Require the transport reply from the server to match the request

This fixes a crash if we requested TCP interleaved transport, but the
server replies with transport data for UDP. According to the RFC, the
server isn't allowed to respond with another transport type than the...

bbd8f547 12/15/2010 09:06 PM Martin Storsjö

rtsp: Don't set the RTP time base from the sample rate if no sample rate is set

This also reverts SVN rev 26016, which incorrectly overwrote the time base
with 90 kHz for all streams, regardless of what was set by the SDP parsing.

The stream that triggered the fix in 26016 still works after this commit....

86b6e387 12/07/2010 01:29 PM Martin Storsjö

rtsp/rtpdec: Set the AVStream time_base directly in rtsp when it is known

This fixes cases where the RTP time base and the sample rate of the stream
differ. Previously, the AVStream time_base was unconditionally set to
the sample rate (which initially was set to one value when parsing the...

bb776f3b 12/07/2010 01:28 PM Martin Storsjö

rtsp: Parse RealRTSP sample rate declarations from the SDP

The RTP time base can be different from the actual content sample rate.

Originally committed as revision 25907 to svn://

6a7e31a9 12/05/2010 07:41 PM Martin Storsjö

rtsp: Look for RTP payload handlers for static payload types, too

Originally committed as revision 25893 to svn://

003eb642 12/05/2010 07:41 PM Martin Storsjö

rtsp: Factorize code for initializing the rtp payload handler

Originally committed as revision 25892 to svn://

0b6a7ff4 11/28/2010 09:17 PM Martin Storsjö

rtsp: Do a forgotten reindenting

Originally committed as revision 25839 to svn://

dd22cfb1 11/15/2010 03:08 PM Martin Storsjö

rtsp: Parse and use the Content-Base reply header, if present

This fixes playing RTSP urls with query parameters.

Originally committed as revision 25755 to svn://

0526c6f7 10/29/2010 08:43 AM Martin Storsjö

rtsp: Split out the RTSP demuxer functions to a separate, new file

Originally committed as revision 25601 to svn://

c2688f3a 10/29/2010 08:41 AM Martin Storsjö

rtsp: Move rtsp_setup_output_streams into rtspenc.c

Originally committed as revision 25600 to svn://

47bfe49c 10/27/2010 12:42 AM Martin Storsjö

rtsp: Add stub declarations of the setup_in/output_streams functions

This may be needed to avoid calls to implicitly defined functions
(that will be removed by dead code elimination later anyway).

Originally committed as revision 25585 to svn://

a5cea132 10/23/2010 04:22 PM Aurelien Jacobs

drop rtsp_default_protocols which is not part of public API and not used anymore

Originally committed as revision 25557 to svn://

67f34aaa 10/23/2010 04:19 PM Aurelien Jacobs

use rtp_get_local_rtp_port() instead of the deprecated rtp_get_local_port()

Originally committed as revision 25554 to svn://

eced8fa0 10/21/2010 12:25 PM Martin Storsjö

rtsp: Move the rtsp_probe function to the demuxer code block

This function is only used by the RTSP demuxer.

Originally committed as revision 25537 to svn://

44b70ce5 10/21/2010 12:18 PM Martin Storsjö

rtsp: Untangle the dependencies between the RTSP/SDP demuxers and RTSP muxer

This allows compilation of one of them without requiring the others'
dependencies to be present.

Originally committed as revision 25535 to svn://

8bf0f969 10/21/2010 12:13 PM Martin Storsjö

rtsp: Reorder functions

Originally committed as revision 25534 to svn://

44594cc7 10/19/2010 07:38 AM Martin Storsjö

Add a demuxer for receiving raw rtp:// URLs without an SDP description

The demuxer inspects the payload type of a received RTP packet and
handles the cases where the content is fully described by the payload type.

Originally committed as revision 25527 to svn://

a493f80a 10/08/2010 08:54 AM Martin Storsjö

rtsp: Factorize out code for opening a chained RTP muxer

The new object file is added to the SDP demuxer in the makefile, since it
is needed in both the RTSP muxer and demuxer and in the SDP demuxer, due
to the current code coupling.

Originally committed as revision 25410 to svn://

3d742230 10/08/2010 08:51 AM Martin Storsjö

rtsp: Make rtsp_rtp_mux_open reusable

Originally committed as revision 25409 to svn://

9e6acc78 10/08/2010 08:50 AM Martin Storsjö

rtsp: Remove the start_time field from RTSPState, use AVFormatContext->start_time_realtime instead

Originally committed as revision 25408 to svn://

5fe8021a 10/05/2010 07:46 PM Martin Storsjö

rtsp/sdp: Move code into correct ifdefs

This makes the code dependencies correct. Previously, the SDP demuxer
wasn't buildable on its own.

This also reverts rev 25343.

Originally committed as revision 25354 to svn://

a44da176 10/05/2010 11:06 AM Diego Biurrun

Remove some pointless CONFIG_RTSP_DEMUXER #ifdefs.
They reside within a large CONFIG_RTSP_DEMUXER block and are thus pointless.

Originally committed as revision 25343 to svn://

2e802e38 10/05/2010 11:03 AM Diego Biurrun

Add some #endif comments to ease understanding.

Originally committed as revision 25342 to svn://

d7810f45 10/03/2010 11:56 AM Martin Storsjö

rtsp: In the muxer, show the generated with verbose log level

It is only useful for debugging, so it doesn't have to be shown every time.

Originally committed as revision 25323 to svn://

6ecd7417 10/03/2010 11:55 AM Martin Storsjö

rtsp: Show the received SDP

Originally committed as revision 25322 to svn://

321259c1 10/01/2010 05:52 PM Martin Storsjö

rtsp: Return a queued packet if it has been in the queue for longer than max_delay

Originally committed as revision 25295 to svn://

58ee0991 10/01/2010 05:50 PM Martin Storsjö

rtpdec: Reorder received RTP packets according to the seq number

Reordering is enabled only when receiving over UDP.

Originally committed as revision 25294 to svn://

c690fa97 10/01/2010 05:44 PM Martin Storsjö


Originally committed as revision 25291 to svn://

38f8c80b 10/01/2010 05:44 PM Martin Storsjö

rtsp: Reorganize if statements in rtsp_read_play

Originally committed as revision 25290 to svn://

ad4ad27f 10/01/2010 05:43 PM Martin Storsjö

rtsp/rtpdec: Allow rtp_parse_packet to take ownership of the packet buffer

Do the same change for ff_rdt_parse_packet, too, to keep the interfaces

Originally committed as revision 25289 to svn://

96a7c975 10/01/2010 05:41 PM Martin Storsjö

rtsp: Use a dynamically allocated receive buffer

Originally committed as revision 25288 to svn://

160918d5 09/15/2010 05:39 PM Martin Storsjö

rtsp: Handle standard assigned codec names for private payload types, too

Originally committed as revision 25126 to svn://

7bac991f 09/03/2010 07:26 PM Ronald S. Bultje

Reindent after r25032.

Originally committed as revision 25033 to svn://

619298a8 09/03/2010 07:25 PM John Wimer

Send NAT punching messages to the address specified in the Transport:
message, if available (RFC 2326, section 12.39), fixes issue 2212.

Patch by John Wimer <john at god vtic net>.

Originally committed as revision 25032 to svn://

744a882f 09/03/2010 07:10 AM Martin Storsjö

rtsp: 10l, try to update the correct rtp stream

This fixes a bug from rev 22917. Now RTSP streams where the individual RTCP
sender reports aren't sent at the same time actually are synced properly.

Originally committed as revision 25029 to svn://

b20359f5 08/29/2010 10:25 AM Josh Allmann

rtsp: Return AVERROR_EOF when all streams have received an RTCP BYE packet

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 24965 to svn://

a1ba71aa 08/29/2010 10:16 AM Josh Allmann

rtsp: Check the RTCP file handle for new packets, too

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 24962 to svn://

7934b15d 08/25/2010 03:32 PM Martin Storsjö

Handle IPv6 in the RTSP code

Originally committed as revision 24925 to svn://

3fbd12d1 08/25/2010 03:32 PM Martin Storsjö

Handle IPv6 in the SDP demuxer

Originally committed as revision 24924 to svn://

2401660d 08/25/2010 01:42 PM Martin Storsjö

rtsp: Return EOF if the TCP control channel is closed

Originally committed as revision 24920 to svn://

27014bf5 08/12/2010 01:39 PM Ronald S. Bultje

Send OPTIONS request at a regular basis to standard RTSP servers as well,
this prevents a time-out which closes the TCP connection and kills our

see "Re: [FFmpeg-devel] [PATCH] rtsp.c: keep-alive" thread on mailinglist.

Originally committed as revision 24785 to svn://

be73ba2f 08/09/2010 11:00 PM Aurelien Jacobs

get rid of MAX_STREAMS limit in RTSP

Originally committed as revision 24752 to svn://

2901cc9a 08/07/2010 02:11 PM Reinhard Tartler

Fix spelling in comment(s)

Originally committed as revision 24737 to svn://

91af5601 08/07/2010 11:16 AM Josh Allmann

Add RTP packetization of Theora and Vorbis

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 24735 to svn://

d93fdcbf 08/06/2010 10:26 AM Luca Barbato

Preserve status reason

It is used to provide meaningful error messages.

Originally committed as revision 24714 to svn://

965a3ddb 07/30/2010 12:04 PM Martin Storsjö

Remove mostly unnecessary rtpdec_*.h files, store the declarations in one file

Originally committed as revision 24596 to svn://

28450066 07/28/2010 09:26 AM Martin Storsjö

rtsp: Move the definition of SDP_MAX_SIZE up, use it in the RTSP muxer, too

Originally committed as revision 24571 to svn://

354b7573 07/21/2010 05:27 PM Axel Holzinger

Zero-initialize structs/arrays with {0} instead of {}, which isn't proper C99

Patch by Axel Holzinger, aholzinger at gmx dot de

Originally committed as revision 24391 to svn://

bf55cf19 07/12/2010 10:17 AM Luca Barbato

Report when a method gets an error status code

That makes easier understand what went wrong.
In debug mode the whole reply gets printed.

Originally committed as revision 24212 to svn://

f3bfe388 06/27/2010 02:16 PM Måns Rullgård

Make ff_url_split() public

ff_url_split() is retained as an alias, as it was used by ffserver,
to avoid breaking ABI compatibility with it.

Originally committed as revision 23822 to svn://

ca937a55 06/25/2010 08:02 AM Josh Allmann

RTSP, rtpdec: Move RTPPayloadData into rtpdec_mpeg4 and remove all references to rtp_payload_data in rtpdec and rtsp

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 23772 to svn://

7fc8ac7f 06/25/2010 08:00 AM Josh Allmann

RTSP: Move more SDP/FMTP stuff from rtsp.c to rtpdec_mpeg4.c

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 23770 to svn://

9b3788ef 06/25/2010 07:58 AM Josh Allmann

RTSP: Decouple MPEG-4 and AAC specific parts from rtsp.c

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 23769 to svn://

30619e6e 06/25/2010 07:56 AM Josh Allmann

RTSP: Remove skip_spaces in favor of strspn

Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 23768 to svn://

9290f15d 06/22/2010 02:15 PM Martin Storsjö

Make the http protocol open the connection immediately in http_open again

Also make the RTSP protocol use url_alloc and url_connect instead of relying
on the delay open behaviour.

Originally committed as revision 23710 to svn://

a8ead332 06/21/2010 07:41 PM Martin Storsjö

RTSP: Use the same authentication for the HTTP POST session as for the GET

Originally committed as revision 23686 to svn://