Commit Graph

175 Commits

Author SHA1 Message Date
Luca Abeni
103dfbe2c4 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://svn.ffmpeg.org/ffmpeg/trunk
2009-11-13 10:19:42 +00:00
Luca Abeni
987131828c 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://svn.ffmpeg.org/ffmpeg/trunk
2009-11-12 15:34:17 +00:00
Luca Abeni
1ced9da357 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://svn.ffmpeg.org/ffmpeg/trunk
2009-11-12 10:31:37 +00:00
Luca Barbato
7549632bda rtsp_close_streams frees the auth_b64 line already
Originally committed as revision 20370 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-25 00:41:10 +00:00
Luca Barbato
d243ba30b8 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://svn.ffmpeg.org/ffmpeg/trunk
2009-10-25 00:06:31 +00:00
Luca Barbato
921da21745 Just remove params understood by the demuxer
This should unbreak certain urls.

Originally committed as revision 20364 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-24 16:53:06 +00:00
Luca Barbato
7541f32edd 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
overly strict or overly simple uri parsers

Patch from Armand Bendanan (name.surnameATfreeDOTfr)

Originally committed as revision 20363 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-24 15:18:21 +00:00
Luca Barbato
224b44957b 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://svn.ffmpeg.org/ffmpeg/trunk
2009-10-24 15:10:58 +00:00
Diego Biurrun
76e6e9c330 Remove ancient redir demuxer.
HTTP supports redirection just fine without it.

Originally committed as revision 20361 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-24 12:44:27 +00:00
Ronald S. Bultje
ba93ea6d3e Unscrewup indentation (pointed out by Diego).
Originally committed as revision 19910 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-18 13:18:47 +00:00
Ronald S. Bultje
f933789789 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://svn.ffmpeg.org/ffmpeg/trunk
2009-09-17 21:47:11 +00:00
Ronald S. Bultje
fccb1770e6 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://svn.ffmpeg.org/ffmpeg/trunk
2009-07-27 14:03:53 +00:00
Luca Barbato
ec606b36b4 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://svn.ffmpeg.org/ffmpeg/trunk
2009-06-10 15:08:02 +00:00
Kostya Shishkov
0e848977ce Move function for reading whole specified amount of data from RTSP
demuxer into more common place.

Originally committed as revision 19087 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-04 06:25:53 +00:00
Baptiste Coudurier
67c9cd696a fix compilation with DEBUG defined
Originally committed as revision 19016 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-31 04:32:45 +00:00
Luca Abeni
46ff7a5f4a Fix crash when receiving from SDP
Originally committed as revision 18635 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-20 20:06:55 +00:00
Ronald S. Bultje
30e79845b4 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://svn.ffmpeg.org/ffmpeg/trunk
2009-04-15 13:04:34 +00:00
Ronald S. Bultje
e6327fba98 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://svn.ffmpeg.org/ffmpeg/trunk
2009-04-14 15:01:46 +00:00
Ronald S. Bultje
373afbaf76 Increase the SDP buffer size (again!) and also increase the temporary
buffer size of the fmtp parameter buffer. For Vorbis RT(S)P, 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,
submitted as GSoC qualification task in the thread "RTP/Vorbis payload
implementation (GSoC qual task)" by Colin McQuillan m.niloc googlemail
com.

Originally committed as revision 18508 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-14 13:22:40 +00:00
Ronald S. Bultje
da1e126e0d 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
follow-ups in the "[PATCH] rtsp.c small cleanups" mailinglist thread.

Originally committed as revision 18177 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-24 03:24:59 +00:00
Ronald S. Bultje
cc9aced32f 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://svn.ffmpeg.org/ffmpeg/trunk
2009-03-21 21:02:08 +00:00
Ronald S. Bultje
78f731de92 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
mailinglist.

Originally committed as revision 18127 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-21 21:00:51 +00:00
Ronald S. Bultje
7d09a993d1 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://svn.ffmpeg.org/ffmpeg/trunk
2009-03-21 20:59:59 +00:00
Ronald S. Bultje
6a8c8b36b9 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
mailinglist.

Originally committed as revision 18125 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-21 20:58:41 +00:00
Ronald S. Bultje
64917dd3df 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://svn.ffmpeg.org/ffmpeg/trunk
2009-03-21 20:56:57 +00:00
Ronald S. Bultje
36aa7bc27f 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://svn.ffmpeg.org/ffmpeg/trunk
2009-03-21 20:55:52 +00:00
Ronald S. Bultje
1ef36a7035 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]
rtsp.c small cleanups" thread.

Originally committed as revision 18122 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-21 20:54:47 +00:00
Ronald S. Bultje
7e726132c2 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://svn.ffmpeg.org/ffmpeg/trunk
2009-03-21 20:46:36 +00:00
Ronald S. Bultje
c4a3d03299 Reindent after r18023.
Originally committed as revision 18024 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-17 12:35:55 +00:00
Ronald S. Bultje
1a30d5415f 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://svn.ffmpeg.org/ffmpeg/trunk
2009-03-17 12:34:57 +00:00
Ronald S. Bultje
743b389074 rtpmap is case-insensitive, see comment from Luca in "[PATCH] rtsp.c:
keep-alive" thread.

Originally committed as revision 17862 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-07 15:20:55 +00:00
Ronald S. Bultje
57f94f54c4 Oops, very silly typo.
Originally committed as revision 17853 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-06 03:12:33 +00:00
Ronald S. Bultje
29b9f58b37 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]
rtsp.c: split rtsp_send_cmd() in a send- and a receive-function" thread.

Originally committed as revision 17797 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-04 00:57:37 +00:00
Ronald S. Bultje
bc8763cda9 Rename "fd1" variable ro "fd". There were previously two variables (fd1 and
fd2) and one was just removed, so naming the other "fd1" is counter-intuitive.
See "[RFC] rtsp.c EOF support" thread.

Originally committed as revision 17780 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-03 17:06:18 +00:00
Ronald S. Bultje
f0a8039464 Add url_get_file_handle(), which is used to get the file descriptor
associated with the I/O handle (e.g. the fd returned by open()). See
"[RFC] rtsp.c EOF support" thread.

There were previously some URI-specific implementations of the same idea,
e.g. rtp_get_file_handles() and udp_get_file_handle(). All of these are
deprecated by this patch and will be removed at the next major API bump.

Originally committed as revision 17779 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-03 17:04:51 +00:00
Ronald S. Bultje
2fea965070 Reindent after r17777.
Originally committed as revision 17778 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-03 16:53:04 +00:00
Ronald S. Bultje
f830c9a487 Make RTSP-MS-over-UDP negotiation work. See "[PATCH] RTSP-MS 8/15: fix
RTSP-MS UDP" thread on mailinglist.

Basically, UDP setup needs to be done in a particular order (first rtx
on two UDP ports (one for RTP, one for RTCP), then the other streams over
one, single port for all of them together). Not doing this correctly results
in a "461" error (invalid transport) during setup.

Originally committed as revision 17777 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-03 16:52:35 +00:00
Ronald S. Bultje
090438cc81 Recognize the "application" data type, which is required for WMS/UDP
sessions.

This type is used in RTP/ASF (served by WMS servers), and is required to
make UDP sessions work, but breaks TCP sessions. Therefore, we disable setup
for application streams in TCP/WMS streams.

See discussion in "[PATCH] RTSP-MS 8/15: fix RTSP-MS UDP" thread.

Originally committed as revision 17776 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-03 16:48:56 +00:00
Ronald S. Bultje
a9e534d561 Rename RTSPHeader to RTSPMessageHeader to reflect more clearly what the
structure is meant to represent. See "[PATCH] rtsp.[ch]: RTSPHeader ->
RTSPServerResponse" and "[PATCH] document rtsp.h" threads on ML.

Originally committed as revision 17504 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-21 22:26:44 +00:00
Ronald S. Bultje
d541a7d2d1 Change sizeof(struct_type) to sizeof(variable).
Originally committed as revision 17474 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-21 14:40:19 +00:00
Luca Abeni
bf6d981806 Remame rtp_get_codec_info() to ff_rtp_get_codec_info(), as it is not
a static function

Originally committed as revision 17390 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-17 08:12:51 +00:00
Ronald S. Bultje
2a1d51c573 Rename RTSP_*_LAST to RTSP_*_NB in line with PIX_FMT_* in lavc. See "[PATCH]
document rtsp.h" mailinglist thread.

Originally committed as revision 17381 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-16 16:27:35 +00:00
Luca Abeni
302879cb36 Split rtp.h in rtp.h, rtpdec.h, and rtpenc.h
Originally committed as revision 17016 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-06 10:35:52 +00:00
Ronald S. Bultje
0a861b6f8b Rename "tx_ctx" and "cur_tx" variables to "transport_priv" and
"cur_transport_priv", as discussed in the "[PATCH] rtsp.h: rename tx
variables" thread.

Originally committed as revision 17012 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-05 22:34:55 +00:00
Aurelien Jacobs
da61e4136a use new metadata API in rtsp demuxer
Originally committed as revision 16961 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-02 23:09:39 +00:00
Ronald S. Bultje
d1c6e47c16 Fix the Transport: line in the SETUP request so that it works with WMS
servers when trying to set up a session over TCP:
- add the interleave property
- add unicast, only for WMS (since it is normally only UDP, but WMS expects it
   for UDP and TCP)
- add mode=play
See discussion in "[PATCH] RTSP-MS 9/15: add interleave property to the TCP
transport line of the SETUP request" thread on mailinglist.

Originally committed as revision 16913 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-02-01 13:37:45 +00:00
Luca Abeni
20631a9c15 Merge rtp_internal.h in rtp.h, and remove rtp_internal.h
Originally committed as revision 16817 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-27 12:23:16 +00:00
Ronald S. Bultje
cb760a4790 Skip m= blocks in the SDP if the media type is unknown. This prevents
subsequent a= lines from the m= block to be applied to the previous
m= line, thus breaking otherwise functional RTP streams. See discussion in
[PATCH] RTSP-MS 7/15: parse and allow unknown m= line codes" thread on
mailinglist.

Originally committed as revision 16737 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-24 04:56:18 +00:00
Diego Biurrun
406792e7b0 cosmetics: Remove pointless period after copyright statement non-sentences.
Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-19 15:46:40 +00:00
Aurelien Jacobs
b250f9c66d Change semantic of CONFIG_*, HAVE_* and ARCH_*.
They are now always defined to either 0 or 1.

Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-01-13 23:44:16 +00:00