Commit graph

132 commits

Author SHA1 Message Date
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
Peter Kjellerstedt
ca154010fe rtsp: Added support for HTTP messages 2009-08-24 13:19:44 +02:00
Peter Kjellerstedt
dd7d0cfc45 rtsp: Added gst_rtsp_connection_create_from_fd().
API: gst_rtsp_connection_create_from_fd()
2009-08-24 13:19:44 +02:00
Peter Kjellerstedt
814eaa728a rtsp: Add initial buffer support.
The initial buffer contains data for a connection which should be used
before starting to actually read anything from the socket.
2009-08-24 13:19:44 +02:00
Peter Kjellerstedt
41f1d9a7d9 rtsp: Add support for the Authentication-Info header.
The Authentication-Info header is defined in RFC 2617 (Digest Access
Authentication).
2009-08-24 11:24:27 +02:00
Peter Kjellerstedt
3c4fa9274f rtsp: Avoid duplicated headers.
Remove any existing Session and Date headers before adding new ones
when sending a request. This may happen if the user of this code reuses
a request (rtspsrc does this when resending after authorization fails).
2009-08-19 09:31:51 +02:00
Peter Kjellerstedt
3b888cfe2a rtsp: Corrected the HTTP digest authorization computation.
Do not use sizeof() on an array passed as an argument to a function and
expect to get anything but the size of a pointer. As a result only the
first 4 (or 8) bytes of the response buffer were initialized to 0 in
auth_digest_compute_response() which caused it to return a string which
was not NUL-terminated...
2009-08-18 16:50:58 +02:00
Tim-Philipp Müller
cb19626c8c rtspconnection: don't use GLib-2.18 function
g_checksum_reset() was added only in GLib 2.18, but we still require
only 2.16, so work around that if we only have 2.16. Fixes #591357.
2009-08-10 20:18:24 +01:00
Sebastian Dröge
79ade6ad68 rtsp: Use GLib's GChecksum instead of our own MD5 implementation 2009-08-10 10:19:01 +02:00
Wim Taymans
f5962f0a4f rtsp: include in.h for FreeBSD compat
Fixes #586920
2009-06-29 12:20:52 +02:00
Peter Kjellerstedt
c398f2f376 rtsp: Moved a comment. 2009-06-29 09:31:40 +02:00
Руслан Ижбулатов
07c237ad19 Define WINVER before including any win headers
Fixes bug #587080.
2009-06-27 14:02:50 +02:00
Peter Kjellerstedt
4fd61fbaa4 rtsp: Made the parsing of the RTSP URL scheme more generic. 2009-06-17 18:34:57 +02:00
Peter Kjellerstedt
726a47f777 rtsp: Added gst_rtsp_watch_queue_data().
gst_rtsp_watch_queue_data() is similar to gst_rtsp_watch_queue_message()
but allows for queuing any data block for writing (much like
gst_rtsp_connection_write() vs. gst_rtsp_connection_send().)

API: gst_rtsp_watch_queue_data()
2009-06-17 18:34:33 +02:00
Peter Kjellerstedt
595f8b6d00 rtsp: Only extract the session ID from RTSP responses. 2009-06-17 18:02:18 +02:00
Peter Kjellerstedt
ddbeb44f14 rtsp: Added support for parsing IPv6 addresses in RTSP URLs. 2009-06-17 18:00:17 +02:00
Peter Kjellerstedt
95a606a0bb rtsp: Use getaddrinfo() to support both IPv4 and IPv6. 2009-06-17 17:59:47 +02:00
Peter Kjellerstedt
e1a4c8871a rtsp: Improved base64 decoding in fill_bytes().
The base64 decoding in fill_bytes() expected the size of the read data to
be evenly divisible by four (which is true for the base64 encoded data
itself). This did not, however, take whitespace (especially line breaks)
into account and would fail the decoding if any whitespace was present.
2009-06-17 17:53:54 +02:00
Wim Taymans
33837d420c rtsp: add Timestamp header field
fixes #585994
2009-06-16 18:57:20 +02:00
Peter Kjellerstedt
73dd8236ce rtsp: Use a more consistent naming of GstRTSPRec variables. 2009-06-15 09:28:34 +02:00
Peter Kjellerstedt
ff38999c8b rtsp: Call message_sent() callback for all sent messages.
Previously the messages_sent() callback was only called for messages
which had a CSeq, which excluded all data messages. Instead of using the
CSeq as ID, use a simple index counter.
2009-06-15 09:28:13 +02:00
Wim Taymans
e01fab3ace rtsp: add some more docs 2009-06-09 22:00:53 +02:00
Peter Kjellerstedt
263c5b227b rtsp: Avoid a compiler warning. 2009-06-09 18:24:55 +02:00
Peter Kjellerstedt
dfc57e3f8a rtsp: Updated documentation for GstRTSPResult.
Moved GST_RTSP_ELAST to be last in the documentation to match the actual
enum values.
2009-06-09 18:23:28 +02:00
Peter Kjellerstedt
9c40eeeb4c rtsp: Plug a memory leak.
Free memory related to any partially read and/or written RTSP messages.
2009-06-09 16:28:20 +02:00
Peter Kjellerstedt
2dbd8702dd rtsp: Fixed a typo. 2009-06-05 14:06:17 +02:00
Peter Kjellerstedt
de18ad458f rtsp: Remove an unused variable. 2009-06-05 14:05:54 +02:00
Peter Kjellerstedt
b0a9848524 rtsp: Removed duplicate initialization of conn->writefd. 2009-06-05 13:59:14 +02:00
Peter Kjellerstedt
0167e3589d rtsp: Use #defined status codes. 2009-06-05 13:55:08 +02:00
Peter Kjellerstedt
c1a6644a18 rtsp: Correct gen_tunnel_reply().
Prevent gen_tunnel_reply() from generating an incomplete response
in case an error response code is given.
2009-06-05 13:53:29 +02:00
Wim Taymans
59d9833924 rtsp: add G_LIKELY because we can 2009-06-02 12:10:39 +02:00
Peter Kjellerstedt
d8e0b5a4da rtsp: Avoid compiler warnings with -Wextra. 2009-06-01 09:59:22 +02:00
Peter Kjellerstedt
848b834cb9 rtsp: Include gst/gstconfig.h to make sure GST_PADDING is defined. 2009-06-01 09:58:27 +02:00
Tim-Philipp Müller
6292ff4ae0 Revert "rtspconnection: don't use GLib-2.16 API, we require only 2.14"
This reverts commit 418760cf74.

We now require GLib 2.16.
2009-05-26 18:21:31 +01:00
Tim-Philipp Müller
418760cf74 rtspconnection: don't use GLib-2.16 API, we require only 2.14
Fixes #579267.
2009-04-17 10:35:34 +01:00
Josep Torra
71ab187355 RTSP: add missing headers for WMS RTSP
Add missing headers related to Windows Media RTSP extension.
Fixes #578942
2009-04-14 18:31:52 +02:00
Wim Taymans
88110ea67e rtsp: use fully qualified urls when using a proxy
Use a fully qualified url when specifying the url for tunneled requests through
a proxy.
See #573173
2009-04-02 22:28:55 +02:00
Wim Taymans
eed784b372 rtsp: fix little typo in the comments 2009-04-01 09:03:35 +02:00
Tim-Philipp Müller
fc8c5cba15 rtspconnection: make gst_rtsp_watch_queue_message() thread-safe
People might queue messages from a thread other than the thread in which
the main context which this watch is attached is iterated from, so use
a GAsyncQueue instead of a GList, so g_list_append() doesn't trample
over list nodes just freed in the other thread. This just fixes issues
I've had with gst-rtsp-server. We might need more locking in various
places here.
2009-03-31 18:30:57 +01:00
Tim-Philipp Müller
dfe96ce618 rtsp: clear the entire builder structure
And use structure instead of variable with sizeof when
clearing the rtsp message structure, for clarity.
2009-03-31 18:30:48 +01:00
Tim-Philipp Müller
dd9f077177 docs: fix typo in gst_rtsp_message_unset() API docs 2009-03-31 18:30:48 +01:00
Wim Taymans
8b37dc3eb8 rtsp: add support for proxies
Add suport for proxy servers. Currently only used for tunneled HTTP
connections without authentication.
2009-03-31 19:00:00 +02:00
Wim Taymans
8be68f983c Revert "rtsp: reset whole message (was sizeof pointer instead of sizeof type)"
This reverts commit 79de0b8d67.
2009-03-31 18:57:08 +02:00
Stefan Kost
79de0b8d67 rtsp: reset whole message (was sizeof pointer instead of sizeof type) 2009-03-31 12:27:09 +03:00
Wim Taymans
0d3d3026d2 rtsp: start CSeq counting from 1 instead of 0
Start counting from 1 instead of 0 as this is what most other clients
seem to do.
2009-03-25 16:37:28 +01:00
Wim Taymans
1081ae59eb rtsp: add ETag and If-Match headers
Add new headers, we need them for RealMedia support.
2009-03-25 16:36:14 +01:00
Sebastian Dröge
108ead73c8 rtsp: Use GLib base64 functions and deprecate gst_rtsp_base64_encode
This also fixes another instance of CVE-2008-4316.
2009-03-17 22:53:44 +01:00
Wim Taymans
f4b7cbbf16 rtsp: fix resolving of hostnames
We were returning a pointer to a stack variable with the resolved hostname,
which doesn't work.
return a copy of the resolved ip address instead.
Fixes #575256.
2009-03-13 16:19:41 +01:00