Commit graph

230 commits

Author SHA1 Message Date
Göran Jönsson
0b30fdbfbe rtspconnection: gst_rtsp_watch_wait_backlog
New method that wait until there is room in backlog queue.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725898
2014-03-10 17:28:40 +01:00
David Svensson Fors
6cd0d10d30 rtspconnection: GstRTSPWatch func for tunnel GET response
Add a callback in GstRTSPWatch where the response to HTTP GET for
tunneled connections can be modified.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725878
2014-03-10 10:43:03 +01:00
Ognyan Tonchev
4220442441 rtspconnection: Call closed() when GET is closed in tunneled mode
This patch adds read source on the write socket in tunneled
mode and we get a callback when client disconnects the GET
channel.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725313
2014-03-03 10:34:56 +01:00
Sebastian Rasmussen
35bb1b3328 docs: Add annotations for return values
Rephrase and clarify some return value descriptions

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725521
2014-03-02 23:41:18 +00:00
Tim-Philipp Müller
14b82bbc9a rtsp: fix build with older GLib versions
The gio/gnetworking.h header is only available since glib 2.36

https://bugzilla.gnome.org/show_bug.cgi?id=725206
2014-02-26 11:44:18 +00:00
Ognyan Tonchev
5445682c6a rtspconnection: Add missing include
https://bugzilla.gnome.org/show_bug.cgi?id=725206
2014-02-26 11:25:13 +00:00
Ognyan Tonchev
ebe3530f51 rtspconnection: Remove read child source when POST is disconnected
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=724720
2014-02-21 16:21:45 +01:00
Aleix Conchillo Flaqué
0a115bd31f rtspconnection: allow specifying a certificate database
Two new functions have been added,
gst_rtsp_connection_set_tls_database() and
gst_rtsp_connection_get_tls_database(). The certificate database will be
used when a certificate can't be verified with the default database.

https://bugzilla.gnome.org/show_bug.cgi?id=724393
2014-02-19 21:48:13 +01:00
Aleix Conchillo Flaqué
9121b16aa0 rtspconnection: get rid of superfluous whitespaces 2014-02-19 21:22:30 +01:00
Tim-Philipp Müller
4af1e064fe docs: cosmetic since marker fixes 2013-11-16 16:10:06 +00:00
Aleix Conchillo Flaque
53c7ad0c87 rtspconnection: allow setting tls certificate validation
Added new functions gst_rtsp_connection_set_tls_validation_flags() to
allow setting the TLS certificate validation flags when establishing a
TLS connection.
A getter is also available, gst_rtsp_connection_get_tls_validation_flags().

https://bugzilla.gnome.org/show_bug.cgi?id=711231
2013-11-01 16:42:34 +01:00
Hans Månsson
6bb58eec8a rtspconnection: Connect to proxy if specified
Reference: https://bugzilla.gnome.org/show_bug.cgi?id=708880
2013-10-04 07:27:12 +02:00
Ognyan Tonchev
02ac18b699 rtspconnection: Unset input/output_stream after freeing the GIOStream
watch->input_stream and watch->output_stream are owned by the GIOStream
and should be unset after freeing the stream.

https://bugzilla.gnome.org/show_bug.cgi?id=708689
2013-09-24 18:35:14 +02:00
Ognyan Tonchev
8ba90931ae rtspconnection: Only create writesrc when it is actually needed
Creating a GSource and not attaching it to a context will cause
a leak of it's child sources. That is why we create writesrc right
before attaching it to a context.

https://bugzilla.gnome.org/show_bug.cgi?id=708667
2013-09-24 12:10:00 +02:00
Sebastian Dröge
c6f8220920 rtspconnection: Create a new write GSource after removing it
After removal, a GSource is destroyed and can never be attached
again to a main context. We need to create a new one instead.

https://bugzilla.gnome.org/show_bug.cgi?id=704198
2013-07-14 18:11:59 +02:00
Wim Taymans
32a1deb404 rtsp: make read uncancelable when reading a message
When we start to read a message, we need to continue reading until the end of
the message or else we lose track and cause parse errors. Use a variable
may_cancel to avoid cancelation after we read the first byte until we have
the complete message.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=703088
2013-06-26 15:06:00 +02:00
Wim Taymans
bcc5ac5298 rtsp: dispatch when initial buffer has data
When we have data in the inital buffer, dispath the read function to read it
even if the socket has no data to read.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=702652
2013-06-21 11:50:33 +02:00
Wim Taymans
ad6c16fdfc rtsp: manage writer child source better
Only add the write child source when we have something to write or else
we will dispatch forever without doing anything.
2013-06-20 17:28:46 +02:00
Sebastian Dröge
567be29db2 rtspconnection: Make sure to set a sensible default port for the GSocketConnection
Otherwise it will connect to port 0 if no port is given in the URI.

https://bugzilla.gnome.org/show_bug.cgi?id=701798
2013-06-10 15:31:38 +02:00
Brendan Long
63961242df rtspconnection: remove functions added in GLib 2.34
g_pollable_stream_read and g_pollable_stream_write were added in GLib 2.34,
but Ubuntu 12.04 and Debian Wheezy still use GLib 2.32.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=701316
2013-05-31 14:12:10 +02:00
Wim Taymans
0b933ff87b rtsp: add method to get the TLS connection 2013-05-30 17:31:13 +02:00
Wim Taymans
c0f13c2513 rtsp: let the sockets be reffed by the connection
Don't add an extra ref to the sockets but use that of the connection.
Keep the connection around as an IOStream.
2013-05-30 13:14:46 +02:00
Wim Taymans
2fc85d3980 rtsp: Cleanup the error path
Make sure the watch is removed when we close the read socket because of
an error.
2013-05-30 10:50:42 +02:00
Wim Taymans
ad5632586a rtsp: cleanup the watch reset function 2013-05-30 10:45:42 +02:00
Wim Taymans
07babdd68a rtsp: check if the streams are still active
Don't try to read/write from an inactive stream. When we, for example,
transfer the second connection in tunneling mode, we are not interested anymore
on read/write activity on the old connection.
2013-05-30 10:30:09 +02:00
Wim Taymans
d09028b4c3 rtsp: use child sources instead of using the sockets
Use the source of the pollable input/output streams instead of
accessing the sockets directly.
2013-05-30 07:36:52 +02:00
Wim Taymans
4ada677095 rtsp: fix input/output streams for tunneling 2013-05-30 07:35:18 +02:00
Wim Taymans
4f660c388c rtsp: don't use sockets for blocking
Use the blocking and non-blocking API of the input/output streams instead
of polling the sockets directly. This also allows us to simplify some
code.
2013-05-30 07:35:18 +02:00
Wim Taymans
909e119a23 rtsp: add TLS support
Add flag to select TLS in the transport.
Enable TLS on the socketclient when we use a TLS uri.
2013-05-30 07:35:14 +02:00
Wim Taymans
057bbae6c5 rtspconnection: use the input/output stream of clientconnection
Don't use the raw sockets for RTSP communication but use the IOStream.
This is needed if we are going to use TLS later.
2013-05-30 07:20:51 +02:00
Wim Taymans
2d41ee370c rtsp: set sockets non-blocking 2013-05-30 07:20:51 +02:00
Wim Taymans
a42a7be5df rtsp: use GSocketClient for making connections
Use the GSocketClient API for making connections with the server. This removes a
bit of code and gives us the ability to do TLS later.
2013-05-30 07:20:51 +02:00
Wim Taymans
15f3c995aa Revert "rtspconnection: Use a GSocketAddressNumerator to resolve the addresses"
This reverts commit 15a0bb0a10.

We should be using GSocketClient
2013-05-30 07:20:51 +02:00
Sebastian Dröge
15a0bb0a10 rtspconnection: Use a GSocketAddressNumerator to resolve the addresses
Instead of just trying the first possible resolution we're trying all
resolutions until one works.
2013-05-27 14:53:48 +02:00
Wim Taymans
a4e44df6b9 rtsp: make local_ip and remote_ip variables
Separate local_ip and remote_ip into separate variables for clarity.
2013-04-04 12:32:24 +02:00
Wim Taymans
4826ec4e4d rtsp: calculate the local ip address in accept
Calculate the local IP address in the accept call. We need to place this IP
address in the GET reply in the X-Server-IP-Address header so that the client
knows where to send the POST to in case of tunneled RTSP. Before this patch
it used the client IP address, which would make the client send the POST request
to itself and fail.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=697092
2013-04-04 12:16:47 +02:00
Olivier Crête
aef8de337c rtspconnection: Add API to disable session ID caching in the connection
This is necessary to allow having more than one session in the same connection.

API: gst_rtsp_connection_set_remember_session_id()
API: gst_rtsp_connection_get_remember_session_id()
2013-03-11 10:41:00 +01:00
Wim Taymans
65c5ecd270 rtspconnection: add limit to queued messages
Add a limit to the amount of queued bytes or messages we allow on the watch.

API: GstRTSPConnection::gst_rtsp_watch_set_send_backlog()
API: GstRTSPConnection::gst_rtsp_watch_get_send_backlog()
2012-12-14 11:36:58 +01:00
Wim Taymans
6313e5f1af rtspconnection: improve docs 2012-11-12 14:18:00 +01:00
Tim-Philipp Müller
5f59b4f7ee Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Miguel Angel Cabrera Moya
4b083d608e rtspconnection: remove extra return and fix GError leak
https://bugzilla.gnome.org/show_bug.cgi?id=687473
2012-11-02 19:30:23 +00:00
Ognyan Tonchev
ff04a1b4c6 rtspconnection: fix g-i annotations for out parameters
https://bugzilla.gnome.org/show_bug.cgi?id=687421
2012-11-02 12:43:52 +00:00
Ognyan Tonchev
6e5ea441e7 rtsp: Don't use invalid sockets
return false from dispatch () if the read and write sockets have been
unset in tunnel_complete ()

Setting up HTTP tunnels causes segfaults since the watch for the second
connection is not destroyed anymore in tunnel_complete () and the connection
will still be used even though it is not valid anymore.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=686276
2012-10-25 17:59:47 +02:00
Thibault Saunier
91cdd763eb rtsp: port to the new GLib thread API 2012-09-09 20:41:06 -03:00
Tim-Philipp Müller
2079a8c12b Remove glib-compat-private.h stuff we don't need any more
It's all been ported to the latest GLib API now.
2012-09-09 18:36:49 +01:00
Edward Hervey
2817bdadc9 libs: Remove "Since" markers and minor doc fixups 2012-07-13 12:11:06 +02:00
Ognyan Tonchev
de9aeb0c72 rtsp: Update the initial_buffer when merging RTSP Connections
See https://bugzilla.gnome.org/show_bug.cgi?id=679337
2012-07-10 11:34:47 +02:00
Wim Taymans
90b3f525e9 rtspconnection: handle cancellation correctly 2012-06-06 16:41:03 +02:00
David Svensson Fors
0b0dde7ce1 rtsp: don't leak address and socket
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=677466
2012-06-06 14:53:43 +02:00
Wim Taymans
b0cc0a31e2 rtsp: unref sockets in _close
When closing the connection, unref the currently used sockets. This should close
them when not in use. We need to do this because else we cannot reconnect
anymore after a close, the connect function requires that the sockets are NULL.
2012-05-18 09:47:26 +02:00
Wim Taymans
2cd15bbef8 rtsp: clear the GError for pending connect
Clear the GError after g_socket_connect tells us that the connection is pending.
If we don't do this, glib complains when we try to reuse the non-NULL GError
variable a little below.
2012-05-18 09:47:26 +02:00
Wim Taymans
26f63027a6 rtsp: fix connection 2012-02-20 17:44:59 +01:00
Wim Taymans
268d52fd33 Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/rtsp/gstrtspconnection.c
	win32/common/libgstaudio.def
2012-02-17 23:46:17 +01:00
Ognyan Tonchev
f6e07b65a4 rtspconnection: only send new data immediately if there are no queued messages
Even if watch->messages->length is 0 there may still be some
data from a message that was only written partially at the
previous attempt stored in watch->write_data, so check for
that as well. We don't want to write data into the middle
of another message, which could happen when there wasn't
enough bandwidth.

https://bugzilla.gnome.org/show_bug.cgi?id=669039
2012-02-17 14:40:35 +00:00
Sebastian Dröge
aed2666b53 rtsp: Port to GIO 2012-01-17 16:38:45 +01:00
Sebastian Dröge
dc8984d76c Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/app/gstappsrc.c
	gst-libs/gst/audio/multichannel.h
	gst-libs/gst/video/videooverlay.c
	gst/playback/gstplaysink.c
	gst/playback/gststreamsynchronizer.c
	tests/check/Makefile.am
	win32/common/libgstvideo.def
2012-01-10 13:15:12 +01:00
Tim-Philipp Müller
9f042ae224 rtspconnection: make hostname lookup more thread-safe
Don't write IP number string to return into a static
array which is shared amongst all threads (note: of
course a copy is returned).

https://bugzilla.gnome.org/show_bug.cgi?id=666711
2012-01-07 20:16:41 +00:00
Tim-Philipp Müller
fb6d09055a Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	ext/alsa/gstalsadeviceprobe.c
	ext/alsa/gstalsamixer.c
	ext/pango/gsttextoverlay.c
	ext/pango/gsttextoverlay.h
	gst-libs/gst/audio/gstaudiobasesink.c
	gst-libs/gst/audio/gstaudioringbuffer.c
	gst-libs/gst/audio/gstaudiosrc.c
	gst-libs/gst/video/Makefile.am
	gst-libs/gst/video/video.c
	gst/encoding/gststreamcombiner.c
	gst/encoding/gststreamsplitter.c
	gst/playback/gstplaybasebin.c
	gst/playback/gststreamsynchronizer.c
	gst/playback/gstsubtitleoverlay.c
	gst/playback/gsturidecodebin.c
	sys/xvimage/xvimagesink.c
	tests/examples/Makefile.am
	win32/common/libgstvideo.def

Video overlay composition disabled for now, needs
porting to buffer meta.
2011-12-08 01:19:03 +00:00
Tim-Philipp Müller
0d98aa25b8 Work around deprecated thread API in glib master
Add private replacements for deprecated functions such as
g_mutex_new(), g_mutex_free(), g_cond_new() etc., mostly
to avoid the deprecation warnings. We'll change these
over to the new API once we depend on glib >= 2.32.

Replace g_thread_create() with g_thread_try_new().
2011-12-04 17:16:30 +00:00
Tim-Philipp Müller
177525f89f Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst-libs/gst/netbuffer/gstnetbuffer.c
	gst/ffmpegcolorspace/avcodec.h
	gst/ffmpegcolorspace/gstffmpegcodecmap.c
	gst/ffmpegcolorspace/imgconvert.c
	gst/ffmpegcolorspace/imgconvert_template.h
	gst/ffmpegcolorspace/mem.c
	gst/playback/README
	gst/playback/gstplaybasebin.c
	gst/playback/gstplaybasebin.h
	gst/playback/gstplaybin.c
	sys/v4l/v4lmjpegsrc_calls.c
	sys/v4l/videodev_mjpeg.h
	tests/check/elements/gnomevfssink.c
2011-12-02 11:10:17 +00:00
Piotr Fusik
14644457b0 various: typo fixes
Fix typos in code and docs. Fixes. #658984
2011-12-02 12:03:27 +01:00
Wim Taymans
bdf3845498 rtsp: cleanup headers
Add padding, fix indentation, remove deprecated stuff
2011-11-11 19:35:33 +01:00
Wim Taymans
ace51b689f rtsp: remove deprecated base64 library 2011-11-10 17:39:10 +01:00
Alessandro Decina
22cc529409 rtspconnection: add OSX specific hack to detect when a connection is refused
Unlike linux, OSX wakes up select with POLLOUT (instead of POLLERR) when
connect() is done async and the connection is refused. Therefore always check
for the socket error state using getsockopt (..., SO_ERROR, ...) after a
connection attempt.
2011-08-15 23:46:53 +02:00
Edward Hervey
66016eedc7 rtsp: Fix typo which broke the build 2011-05-17 10:20:36 +02:00
Miguel Angel Cabrera Moya
30b2abaddd rtspconnection: not enter in not controllable state unless it is necessary
When closing rtspsrc the state change blocks until the polling in the
connection timeouts. This is because the second time we loop to read a
full message controllable is set to FALSE in the poll group, even though no
message is half read.
This can be avoided by not setting controllable to FALSE the poll group
unless we had begin to read a message.

Fixes #610916
2011-05-17 09:29:47 +02:00
Wim Taymans
ac06dd5d0e rtspconnection: calculate better timeout value
We want to send the keealive message a little earlier than the timeout value
specifies. Scale this based on the value of the timeout instead of just assuming
5 seconds.
2010-10-29 14:22:39 +01:00
Thijs Vermeir
2e888cb784 rtsp: don't let the rtsp connection timeout
Because we should act before the rtsp server does a timeout, we
reduce the timeout-time with 5 seconds, this should be safe to always
keep te rtsp connection alive.

https://bugzilla.gnome.org/show_bug.cgi?id=633455
2010-10-29 14:22:39 +01:00
Stefan Kost
639e1ab2b5 docs: fix wrong doc markup 2010-05-06 09:42:02 +03:00
Tim-Philipp Müller
7fee2c0fe7 rtsp: weekday and month names in RTSP date string should be in C locale
Create date string using C locale weekday and month names.

Fixes #617636.
2010-05-05 13:04:25 +01:00
Wim Taymans
318fbf3310 rtspconnection: Handle closed POST socket in tunneling
Catch more socket errors.
Rework how sockets are managed in the GSource, wake up the maincontext instead
of adding/removing the sockets from the source.
Add callback for when the tunnel connection is lost. Some clients (Quicktime
Player) close the POST connection in tunneled mode and reopen the socket when
needed.

See #612915
2010-04-06 10:59:39 +02:00
Wim Taymans
999cc34c83 rtspconnection: allow for more ipv6 addresses
Use hints in getaddrinfo() so that we can also resolve ipv6 addresses.
2010-03-16 16:24:21 +01:00
Wim Taymans
2221e404de rtsp: make timeout usec more accurate
Adjust the returned usec from the elapsed time so it represents the remaining
timeout.
2010-03-15 11:36:22 +01:00
Benjamin Otte
43b1683421 Add -Wmissing-declarations -Wmissing-prototypes to warning flags
Includes all the fixes necessary to make stuff compile again.
2010-03-11 13:50:31 +01:00
Dake Gu
f37b42b40d rtspconnection: fix handling of x-server-ip-address
Fix handling of x-server-ip-address.
2010-03-08 11:20:51 +01:00
Patrick Radizi
a8f51d61f7 rtspconnection: make sure not to dereference NULL username or password
Fixes #610268.
2010-02-18 18:00:38 +00:00
Wim Taymans
30fd219e63 rtsp: ignore \n and \r as the first line
Be more forgiving for bad servers and ignore \r and \n when we are looking for
the response/request line.

See #608417
2010-02-12 11:43:59 +01:00
Wim Taymans
be037e0dc8 rtsp: fail gracefully on bad Content-Length headers
Be careful when allocating the amount of bytes specified in the Content-Length
because it can be an insanely huge value. Try to allocate the memory but fail
gracefully with a nice error when the allocation failed.
2010-02-12 11:43:59 +01:00
Sreerenj B
f3b3dd33f3 rtsp: avoid crashing on SIGPIPE
Use send() instead of write() so that we can pass the MSG_NOSIGNAL flags to
avoid crashing with SIGPIPE when the remote end is not listening to us anymore.

Fixes #601772
2009-11-13 11:18:46 +01:00
Patrick Radizi
48a44f470b rtsp: handle socket errors
gstrtspconnection.c:gst_rtsp_connection_receive() can hang when an error occured
on a socekt. Fix this problem by checking for error on 'other' socket after poll
return.

Fixes #596159
2009-10-12 15:48:46 +02:00
Tim-Philipp Müller
92465ba8ac rtspconnection: we can use GLib 2.18 API unconditionally now 2009-10-07 10:32:17 +01:00
Wim Taymans
730eead9a9 rtsp: use CLOSE_SOCKET() instead of close()
Use CLOSE_SOCKET instead of directly calling close() because it does the right
thing for windows.

Fixes #597539
2009-10-06 22:37:00 +02:00
Wim Taymans
8d2f20d1cb rtsp: properly fix the HTTP manual mode
When we're not parsing HTTP, return EPARSE when we get an HTTP
message.
2009-09-11 12:20:10 +02:00
Wim Taymans
ca3b91b2d0 rtsp: don't return EPARSE
Don't blindly return EPARSE when http mode is disabled.
Restore old http mode after temporarily setting it to TRUE.
2009-09-10 14:04:53 +02:00
Peter Kjellerstedt
066f9be5c9 rtsp: Added new API for sending using GstRTSPWatch.
The new API to send messages using GstRTSPWatch will first try to send the
message immediately. Then, if that failed (or the message was not sent
fully), it will queue the remaining message for later delivery. This avoids
unnecessary context switches, and makes it possible to keep track of
whether the connection is blocked (the unblocking of the connection is
indicated by the reception of the message_sent signal).

This also deprecates the old API (gst_rtsp_watch_queue_data() and
gst_rtsp_watch_queue_message().)

API: gst_rtsp_watch_write_data()
API: gst_rtsp_watch_send_message()
2009-08-24 13:19:46 +02:00
Peter Kjellerstedt
0af04aa4a8 rtsp: Made gst_rtsp_watch_queue_data() thread safe. 2009-08-24 13:19:46 +02:00
Peter Kjellerstedt
fb3b761af5 rtsp: Added gst_rtsp_connection_set_http_mode().
With gst_rtsp_connection_set_http_mode() it is possible to tell the
connection whether to allow HTTP messages to be supported. By enabling HTTP
support the automatic HTTP tunnel support will also be disabled.

API: gst_rtsp_connection_set_http_mode()
2009-08-24 13:19:46 +02:00
Peter Kjellerstedt
d5b4b5d8af rtsp: Allow gst_rtsp_connection_do_tunnel() to just setup decoding context.
If the second connection passed to gst_rtsp_connection_do_tunnel() is NULL
then just setup the base64 decoding context for the first connection.
2009-08-24 13:19:46 +02:00
Peter Kjellerstedt
01d98fdb5d rtsp: Write as much as possible in gst_rtsp_source_dispatch().
Try to write as much as possible if there are multiple messages queued.
2009-08-24 13:19:45 +02:00
Peter Kjellerstedt
e5ec74c7a9 rtsp: Add error_full callback to GstRTSPWatchFuncs.
The error_full callback is similar to the error callback, but allows for
better error handling. For read errors a partial message is provided to
help an RTSP server generate a more correct error response, and for write
errors the write queue id of the failed message is returned.
2009-08-24 13:19:45 +02:00
Peter Kjellerstedt
ab8bea4555 rtsp: Made read_line() support LWS.
Rewrote read_line() to support LWS (Line White Space), the method used by
RTSP (and HTTP) to break long lines. Also added support for \r and \n as
line endings (in addition to the official \r\n).
2009-08-24 13:19:45 +02:00
Peter Kjellerstedt
607209f121 rtsp: Do not split headers which should not be split.
From RFC 2068 section 4.2: "Multiple message-header fields with the same
field-name may be present in a message if and only if the entire
field-value for that header field is defined as a comma-separated list
[i.e., #(values)]." This means that we should not split other headers which
may contain a comma, e.g., Range and Date.
2009-08-24 13:19:45 +02:00
Peter Kjellerstedt
08d3fe8561 rtsp: Parse WWW-Authenticate headers correctly.
Due to the odd syntax for WWW-Authenticate (and Proxy-Authenticate) which
allows commas both to separate between multiple challenges, and within the
challenges themself, we need to take some extra care to split these headers
correctly.
2009-08-24 13:19:45 +02:00
Peter Kjellerstedt
efc8901a39 rtsp: Improve parse_line().
Make parse_line() handle keys with multiple values on one line correctly.
2009-08-24 13:19:45 +02:00
Peter Kjellerstedt
db66ff4a62 rtsp: Rewrote setup_tunneling().
Rewrote setup_tunneling() to use normal GstRTSPMessages instead of hard
coded strings and duplicates of the message parsing code.
2009-08-24 13:19:45 +02:00
Peter Kjellerstedt
c18e2eec88 rtsp: Rewrote gen_tunnel_reply().
Rewrote gen_tunnel_reply() to generate a normal GstRTSPMessage rather
than a hard coded string.
2009-08-24 13:19:44 +02:00
Peter Kjellerstedt
e1b3393d6b rtsp: Ignore the Content-Length for POST requests.
The Content-Length for POST requests with an x-sessioncookie header should
be ignored as the length is bogus and only there to fool proxies.
2009-08-24 13:19:44 +02:00
Peter Kjellerstedt
11c8b811f3 rtsp: Normalize lines (remove extra whitespace) before parsing. 2009-08-24 13:19:44 +02:00
Peter Kjellerstedt
5716cd102a rtsp: Made parse_string() return a result.
This will catch parsing errors when a too long string is received.
2009-08-24 13:19:44 +02:00
Peter Kjellerstedt
fdd5a65632 rtsp: Improved parsing of messages.
Do not abort message parsing as soon as there is an error. Instead parse
as much as possible to allow a server to return as meaningful an error as
possible.
2009-08-24 13:19:44 +02:00