| Branch: | Revision:

ffmpeg / libavformat / rtsp.c @ 72415b2a

History | View | Annotate | Download (67.8 KB)

# Date Author Comment
72415b2a 03/30/2010 11:30 PM Stefano Sabatini

Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.

Originally committed as revision 22735 to svn://

32e543f8 03/30/2010 03:50 PM Benoit Fouet

Replace @returns by @return.

Originally committed as revision 22729 to svn://

c2bfd816 03/29/2010 07:17 PM Reimar Döffinger

Some spelling fixes.

Originally committed as revision 22720 to svn://

9cba6f5f 03/29/2010 05:36 PM Sam Gerstein

Add a timeout to the select() call. Patch by Sam Gerstein <sgerstein bluefinlab

Originally committed as revision 22718 to svn://

4bc5cc23 03/25/2010 10:21 PM Martin Storsjö

Reassemble the RTSP URL before replacing hostname with the numerical IP

Originally committed as revision 22681 to svn://

7b4a3645 03/25/2010 10:04 PM Martin Storsjö

Simplify ff_rtsp_send_cmd_with_content_async, remove an unnecessary buffer

Originally committed as revision 22680 to svn://

30af0779 03/25/2010 09:49 PM Martin Storsjö

Don't force basic auth in RTSP, but retry with the server-specified method on failure

Originally committed as revision 22678 to svn://

2626308a 03/25/2010 09:48 PM Martin Storsjö

Actually parse the auth headers in RTSP

Originally committed as revision 22677 to svn://

aa8bf2fb 03/25/2010 09:47 PM Martin Storsjö

Make RTSP use the generic http authentication code

Still hardcoded to use Basic auth, without parsing the reply headers

Originally committed as revision 22676 to svn://

b17d11c6 03/25/2010 09:46 PM Martin Storsjö

Add separate method/url parameters to the rtsp_send_cmd functions

Originally committed as revision 22675 to svn://

e9fea405 03/25/2010 07:47 PM Martin Storsjö


Originally committed as revision 22672 to svn://

b1cc5540 03/24/2010 11:06 PM Martin Storsjö

Make ff_rtsp_send_cmd simply call ff_rtsp_send_cmd_with_content

Originally committed as revision 22663 to svn://

7ed8211b 03/24/2010 10:38 PM Luca Barbato

Issue a warning if the received CSeq isn't the expected one

Originally committed as revision 22661 to svn://

3032276b 03/24/2010 06:52 PM Martin Storsjö

Handle errors returned from ff_rtsp_read_reply in udp_read_packet properly

Originally committed as revision 22657 to svn://

7a033e08 03/23/2010 08:00 AM Martin Storsjö

Handle multiple RTSP transport options properly by adding all of them into the mask

Originally committed as revision 22644 to svn://

602eb779 03/23/2010 07:59 AM Martin Storsjö

Parse options in the RTSP URL only from the last question mark onwards

This helps if the URL (erroneously?) contains question marks within the path.

Originally committed as revision 22643 to svn://

2a21adf9 03/23/2010 07:55 AM Martin Storsjö

Reconstruct the RTSP URL, in order to remove the auth part from the URL sent to the server

Don't modify the user-specified s->filename at all, keep all modifications
locally and in rt->control_uri.

Originally committed as revision 22642 to svn://

685e76b5 03/22/2010 03:07 PM Martin Storsjö


Originally committed as revision 22635 to svn://

b7dc88fc 03/22/2010 03:07 PM Martin Storsjö

Add support for TCP as lower transport in the RTSP muxer

Originally committed as revision 22634 to svn://

6e69f6c4 03/22/2010 02:42 PM Martin Storsjö

Use the caller's RTSPMessageHeader in rtsp_setup_input_streams

Currently, the caller doesn't get the status_code and location for rediects,
since rtsp_setup_input_streams uses a copy of RTSPMessageHeader of its own.

Originally committed as revision 22630 to svn://

ec55edba 03/15/2010 04:31 PM Martin Storsjö

Make rtsp_skip_packet non-static, add ff prefix

Originally committed as revision 22547 to svn://

c040badb 03/15/2010 04:15 PM Martin Storsjö


Originally committed as revision 22546 to svn://

c07c6f81 03/15/2010 02:20 PM Martin Storsjö

RTSP: Synchronize the start time of the chained RTP muxers

This makes sure that the streams get correctly synchronized when viewed,
previously the streams were out of sync by as much time as it took
between the initialization of the individual muxers.

Originally committed as revision 22545 to svn://

e4a9e3cc 03/14/2010 11:59 PM Aurelien Jacobs

move ff_url_split() and ff_url_join() declarations to internal.h
those functions are not part of the public API

Originally committed as revision 22534 to svn://

5c7fd910 03/11/2010 08:33 AM Martin Storsjö

Cosmetics, break a long line, fix brace placement

Originally committed as revision 22465 to svn://

26cb700c 03/11/2010 08:24 AM Martin Storsjö

RTSP muxer: Create the SDP with the numerical IP of the peer
instead of using the original host name

Originally committed as revision 22464 to svn://

cbfa66d0 03/10/2010 07:44 AM Dave Yeo

Include os_support.h which has a fallback declaration of socklen_t

This fixes compilation on some OSes

Patch by Dave Yeo, daveryeo at telus dot net

Originally committed as revision 22426 to svn://

db76ca7f 03/09/2010 04:04 PM Martin Storsjö

Use rt->control_uri consequently instead of s->filename in all RTSP commands

Originally committed as revision 22403 to svn://

03f8fc08 03/09/2010 02:59 PM Martin Storsjö

RTSP: Resolve and use the actual IP address of the peer we're connected to,
instead of using the original host name, since the RTP (and UDP) protocols
may choose another IP address if the host name resolves into several different

Originally committed as revision 22398 to svn://

f984dcf6 03/08/2010 09:05 AM Martin Storsjö


Originally committed as revision 22322 to svn://

c5c6e67c 03/08/2010 09:03 AM Martin Storsjö

Rename url_split to ff_url_split

Since this function isn't in the public API, it should have an ff_ prefix.

Originally committed as revision 22321 to svn://

ac11d562 03/07/2010 07:48 PM David Conrad

Localize the #define _SVID_SOURCE needed for inet_aton() to os_support.c

Originally committed as revision 22284 to svn://

57b5555c 03/05/2010 10:35 PM Martin Storsjö

Use ff_url_join for assembling URLs, instead of snprintf

This ensures proper escaping of numerical IPv6 addresses.

The RTSP (de)muxer needs its own network initialization, since it isn't
a protocol and url_open hasn't been called yet.

Originally committed as revision 22226 to svn://

f65919af 02/28/2010 11:03 AM Martin Storsjö

Rename RTP depacketizer files from rtp_* to rtpdec_*

Originally committed as revision 22109 to svn://

93993933 02/23/2010 11:05 AM Martin Storsjö

Cosmetics: reindent

Originally committed as revision 21995 to svn://

3307e6ea 02/23/2010 12:35 AM Ronald S. Bultje

Prefix non-static RTSP functions with ff_.

Originally committed as revision 21974 to svn://

6f5a3d0a 02/22/2010 09:28 PM Martin Storsjö

Add an RTSP muxer

Originally committed as revision 21971 to svn://

f86f6656 02/22/2010 09:20 PM Martin Storsjö

Free metadata in chained RTP muxers in the RTSP muxer

This fixes a minor memory leak

Originally committed as revision 21970 to svn://

af037f80 02/22/2010 07:47 PM Martin Storsjö

Cosmetics: reindent

Originally committed as revision 21969 to svn://

15ba2315 02/22/2010 07:44 PM Martin Storsjö

Add declarations and doxygen documentation of generic rtsp support functions
to rtsp.h, and make the functions non-static

Originally committed as revision 21968 to svn://

2efc97c2 02/22/2010 04:11 PM Martin Storsjö

Cosmetics: reindent after applying patches

Originally committed as revision 21967 to svn://

35cfd646 02/22/2010 03:57 PM Martin Storsjö

Don't follow RTSP redirects when used as a muxer

Originally committed as revision 21966 to svn://

3e24c770 02/22/2010 03:56 PM Martin Storsjö

Add a function rtsp_setup_output_streams for announcing the SDP
and setting up the internal RTSPStream data structures when using
the RTSP code in muxer mode.

Originally committed as revision 21965 to svn://

fd450a51 02/22/2010 03:46 PM Martin Storsjö

Create AVFormatContext objects as private transport for output RTSP sessions

Originally committed as revision 21964 to svn://

4280f9bb 02/19/2010 11:23 PM Martin Storsjö

Split rtsp_read_header() into two functions, so that the main part (now also
known as rtsp_connect()) can be used in the RTSP muxer.

Patch by Martin Storsjö <$firstname $firstname st>.

Originally committed as revision 21915 to svn://

e23d195d 02/19/2010 11:21 PM Martin Storsjö

Split out input-specific parts of rtsp_read_header() into its own, new,
function (rtsp_setup_input_streams()), as preparation for the upcoming
RTSP muxer.

Patch by Martin Storsjö <$firstname $firstname st>.

Originally committed as revision 21914 to svn://

30ff7c5c 02/19/2010 11:13 PM Martin Storsjö

Only send out NAT-punching RTP/RTCP packets when we're in demuxer mode, i.e.
don't send them when acting as a RTSP muxer.

Patch by Martin Storsjö <$firstname $firstname st>.

Originally committed as revision 21913 to svn://

69adcc4f 02/19/2010 11:11 PM Martin Storsjö

Use mode=receive instead of mode=play if in RTSP muxer (instead of demuxer)

Patch by Martin Storsjö <$firstname $firstname st>.

Originally committed as revision 21912 to svn://

52aa4338 02/19/2010 11:10 PM Martin Storsjö

Make rtsp_close_streams() take a AVFormatContext instead of a RTSPState
argument, so we can use AVFormatContext->* here in the future.

Patch by Martin Storsjö <$firstname $firstname st>.

Originally committed as revision 21911 to svn://

c02fd3d2 02/19/2010 04:26 PM Martin Storsjö

Rename RTSP_STATE_PLAYING to _STREAMING, since that better covers the
future use of the rtsp* codebase for RTSP muxing.

Patch by Martin Storsjö <$firstname $firstname st>.

Originally committed as revision 21896 to svn://

dfd017bf 02/17/2010 07:24 PM Martin Storsjö

Add functions to send RTSP commands with content attached to them. This will
be used eventually in the RTSP muxer (see thread "[PATCH] RTSP muxer, round
3" on mailinglist).

Patch by Martin Storsjö <$firstname $firstname st>.

Originally committed as revision 21862 to svn://

9c8fa20d 02/16/2010 10:50 PM Martin Storsjö

When using RTP-over-UDP, send dummy packets during stream setup, similar to
what e.g. RealPlayer does. This allows proper port forwarding setup in NAT-
based environments.

Patch by Martin Storsjö <$firstname at $firstname dot st>.

Originally committed as revision 21856 to svn://

7515ed0c 02/10/2010 06:31 PM Ronald S. Bultje

Reindent after r21741.

Originally committed as revision 21742 to svn://

170870b7 02/10/2010 06:30 PM Ronald S. Bultje

Don't forget to set known audio parameters (samplerate, etc.) if the codec is
not supported in FFmpeg. This will cause crashes later because the samplerate
is used to initialize the timebase.

Originally committed as revision 21741 to svn://

27000636 01/26/2010 03:51 PM Jeremy Morton

Don't use tcp_fd if we're not using TCP-based connections (e.g. when
reading direct SDP files to set up UDP-based RTP-streams). Fixes
issue 1713. Patch by Jeremy Morton <ffmpeg game-point net>.

Originally committed as revision 21461 to svn://

00eb13e0 01/22/2010 04:04 PM Alan Steremberg

Use the control URI from the SDP (if present) rather than the input filename,
if present. This fixes playback of a number of MS-RTSP streams, mostly these
for which playback contains a session key in the URI. Fixes issue 1697.
Patch by Alan Steremberg <$firstname dot $lastname () gmail com>....

2e13ecfe 01/21/2010 08:04 PM Ronald S. Bultje

Remove reply and content_ptr arguments from rtsp_send_cmd_async(), since
they are unused.

Originally committed as revision 21371 to svn://

f8c08733 01/21/2010 08:01 PM Ronald S. Bultje

Change on rtsp_send_cmd() to the _async() version since we don't use the
response anyway.

Originally committed as revision 21370 to svn://

7eaa646f 01/21/2010 07:50 PM Ronald S. Bultje

Reindent after r21368.

Originally committed as revision 21369 to svn://

8b9457de 01/21/2010 07:48 PM Ronald S. Bultje

Pretty embarassing bug; we shouldn't use av_strlcatf() on an uninitialized
buffer, that is doomed to not work at some point.

Originally committed as revision 21368 to svn://

9d50d396 01/13/2010 03:55 PM Ronald S. Bultje

Fix issue1658 (trailing space in rtpmap descriptor).

Originally committed as revision 21187 to svn://

8f3c87f3 01/07/2010 10:44 PM Ronald S. Bultje

Add correct log context to av_log() calls in parse_rtpmap().

Originally committed as revision 21072 to svn://

c8965800 01/07/2010 10:41 PM Ronald S. Bultje

Re-indent to more closely follow general coding standards used in other
parts of FFmpeg. Also change a starting condition; while (condition) {
... bla = bla->next; } loop into a proper for() loop.

Originally committed as revision 21071 to svn://

0e59034e 01/04/2010 07:55 PM Ronald S. Bultje

Remove forward declarations.

Originally committed as revision 21020 to svn://

debe86bf 01/01/2010 12:29 PM Stefano Sabatini

Fix typo.

Originally committed as revision 20990 to svn://

702d0a9e 01/01/2010 12:28 PM Stefano Sabatini

Remove residual use of the doxygen markup which is deprecated,
consistent with r19122.

Originally committed as revision 20989 to svn://

d7250724 12/30/2009 04:19 PM Luca Barbato

Rename internal function
sdp_read_packet -> rtsp_fetch_packet

This way describes slightly better what it does.

Originally committed as revision 20982 to svn://

103dfbe2 11/13/2009 10:19 AM Luca Abeni

Add some "#if"s to avoid compiling the RTSP code when the RTSP demuxer
is disabled, and remove a useless "#if CONFIG_SDP_DEMUXER"

Originally committed as revision 20530 to svn://

98713182 11/12/2009 03:34 PM Luca Abeni

Split the sdp_read_packet() function out of rtsp_read_packet().
This allows to avoid compiling RTSP code when not needed.

Originally committed as revision 20526 to svn://

1ced9da3 11/12/2009 10:31 AM Luca Abeni

Move some some functions around, so that splitting the SDP code out of
rtsp_read_packet() is simpler.

Originally committed as revision 20525 to svn://

7549632b 10/25/2009 12:41 AM Luca Barbato

rtsp_close_streams frees the auth_b64 line already

Originally committed as revision 20370 to svn://

d243ba30 10/25/2009 12:06 AM Luca Barbato

Support 3xx redirection in rtsp

All the error codes 3xx got managed the same way.
After setup/early play redirection will not be managed
REDIRECT method is yet to be supported (if somebody knows a server implementing
it please contact me)

Originally committed as revision 20369 to svn://

921da217 10/24/2009 04:53 PM Luca Barbato

Just remove params understood by the demuxer

This should unbreak certain urls.

Originally committed as revision 20364 to svn://

7541f32e 10/24/2009 03:18 PM Luca Barbato

Suppress ?params in the rtsp uri

Right now rtsp demuxer receives it's ffmpeg specific params encoded in the url
That made the server receiving requests with the url ending with "?udp",
"?multicast" and "?tcp". That may or may not cause problems to servers with...

224b4495 10/24/2009 03:10 PM Luca Barbato

Use sdp c= line if the rtsp Transport line doesn't have a destination

Transport:destination in rtsp is optional, c= line in sdp is compulsory

Patch from Armand Bendanan (name.surnameATfreeDOTfr)

Originally committed as revision 20362 to svn://

76e6e9c3 10/24/2009 12:44 PM Diego Biurrun

Remove ancient redir demuxer.
HTTP supports redirection just fine without it.

Originally committed as revision 20361 to svn://

ba93ea6d 09/18/2009 01:18 PM Ronald S. Bultje

Unscrewup indentation (pointed out by Diego).

Originally committed as revision 19910 to svn://

f9337897 09/17/2009 09:47 PM Ronald S. Bultje

RTSP basic authentication, patch originally by Philip Coombes
(philip coombes zoneminder com), see "[PATCH]RTSP Basic Authentication"
thread on mailinglist.

Originally committed as revision 19905 to svn://

fccb1770 07/27/2009 02:03 PM Ronald S. Bultje

Implement support for EOS as used by WMS and other RTSP servers that do not
implement RTCP/bye. See "[PATCH] rtsp.c: EOS support" thread from a few
months back.

Originally committed as revision 19517 to svn://

ec606b36 06/10/2009 03:08 PM Luca Barbato

Support seeking as defined by the rfc

a PLAY with Range alone while in PLAY status should be interpreted
as an enqueue
a PAUSE followed by a PLAY with Range is the proper way to ask to
seek to a point.

See rfc2326

Originally committed as revision 19143 to svn://

0e848977 06/04/2009 06:25 AM Kostya Shishkov

Move function for reading whole specified amount of data from RTSP
demuxer into more common place.

Originally committed as revision 19087 to svn://

67c9cd69 05/31/2009 04:32 AM Baptiste Coudurier

fix compilation with DEBUG defined

Originally committed as revision 19016 to svn://

46ff7a5f 04/20/2009 08:06 PM Luca Abeni

Fix crash when receiving from SDP

Originally committed as revision 18635 to svn://

30e79845 04/15/2009 01:04 PM Ronald S. Bultje

Send dummy requests over the TCP connection (WMS wants GET_PARAMETER,
Real wants OPTIONS) while the connection is idle, otherwise it will
be aborted after a short period (usually a minute). See the thread
"[PATCH] rtsp.c: keep-alive" on the mailinglist.

Originally committed as revision 18525 to svn://

e6327fba 04/14/2009 03:01 PM Ronald S. Bultje

Add a Vorbis payload parser. Implemented by Colin McQuillan as a GSoC
qualification task, see "RTP/Vorbis payload implementation (GSoC qual
task)" thread on mailinglist.

Originally committed as revision 18509 to svn://

373afbaf 04/14/2009 01:22 PM Ronald S. Bultje

Increase the SDP buffer size (again!) and also increase the temporary
buffer size of the fmtp parameter buffer. For Vorbis RTP, these
contain full Vorbis headers, which can be up to 12kb each, formatted
in base64, so 16kb total. Patch required for proper Vorbis/RTP playback,...

da1e126e 03/24/2009 03:24 AM Ronald S. Bultje

strchr(string, '\0') returns non-NULL, and is thus not suited for use in
redir_isspace(char) to check if '\0' is a space or not. Therefore, we now
use memchr(), since then we can give the length of the string (i.e. the
length excluding the terminating '\0'). Fixes issue 919, see also the...

cc9aced3 03/21/2009 09:02 PM Ronald S. Bultje

Remove slash-skipping code because the function called right after that
statement (get_word_sep()) already does that all by itself. See summary in
"[PATCH] rtsp.c small cleanups" thread on mailinglist.

Originally committed as revision 18128 to svn://

78f731de 03/21/2009 09:00 PM Ronald S. Bultje

Reindent something where a if () --> { <-- is on a newline rather than on the
same line as the if. See summary in "[PATCH] rtsp.c small cleanups" thread on

Originally committed as revision 18127 to svn://

7d09a993 03/21/2009 08:59 PM Ronald S. Bultje

Free metadata if already allocated; fixes a memleak if the header occurs twice
in a stream (e.g. malicious input, broken file, etc.). See summary in "[PATCH]
rtsp.c small cleanups" thread on mailinglist.

Originally committed as revision 18126 to svn://

6a8c8b36 03/21/2009 08:58 PM Ronald S. Bultje

Fix silly bug in hex_to_data() where it compares a string pointer for whether
it is '\0' rather than its content (char *p; if (p '\0') instead of if
(*p '\0')). See summary in "[PATCH] rtsp.c small cleanups" thread on

Originally committed as revision 18125 to svn://

64917dd3 03/21/2009 08:56 PM Ronald S. Bultje

Remove useless comment about something that is deprecated. See summary in
"[PATCH] rtsp.c small cleanups" thread on mailinglist.

Originally committed as revision 18124 to svn://

36aa7bc2 03/21/2009 08:55 PM Ronald S. Bultje

Use skip_spaces() in the "redir" demuxer instead of "while (isspace(&p)) p++".
See summary in "[PATCH] rtsp.c small cleanups" thread on mailinglist.

Originally committed as revision 18123 to svn://

1ef36a70 03/21/2009 08:54 PM Ronald S. Bultje

Merge functional code from get_word() and get_word_sep() into a single
function, since they both do approximately the same thing. At the same time,
remove redir_isspace() altogether since code elsewhere (including
get_word_sep()) uses strchr() for the same purpose. See summary in "[PATCH]...

7e726132 03/21/2009 08:46 PM Ronald S. Bultje

Allow (and parse) incoming server messages (notices) interleaved with TCP
data packets or in addition to UDP data packets, over the RTSP/TCP connection.
See discussion in [PATCH] rtsp.c: read TCP server notifications/messages"
thread on mailinglist.

Originally committed as revision 18121 to svn://

c4a3d032 03/17/2009 12:35 PM Ronald S. Bultje

Reindent after r18023.

Originally committed as revision 18024 to svn://

1a30d541 03/17/2009 12:34 PM Ronald S. Bultje

Add RTP/ASF header parsing, which is part of the SDP of these streams. See
patch discussion in "[PATCH] RTSP-MS 10/15: ASF header parsing" thread.

Originally committed as revision 18023 to svn://

743b3890 03/07/2009 03:20 PM Ronald S. Bultje

rtpmap is case-insensitive, see comment from Luca in "[PATCH] rtsp.c:
keep-alive" thread.

Originally committed as revision 17862 to svn://

57f94f54 03/06/2009 03:12 AM Ronald S. Bultje

Oops, very silly typo.

Originally committed as revision 17853 to svn://

29b9f58b 03/04/2009 12:57 AM Ronald S. Bultje

Split rtsp_send_cmd() into two functions, one for the actual sending of the
command and a second, new function to read the reply to this command. This
will make it possible to read server notices that are not in response to a
command in future versions, such as EOS or interrupt notices. See "[PATCH]...