platform/upstream/gstreamer.git
15 years agowhitespace fixes
Wim Taymans [Wed, 9 Sep 2009 08:25:33 +0000 (10:25 +0200)]
whitespace fixes

15 years agovideosink: add "show-preroll-frame" property
Tim-Philipp Müller [Tue, 8 Sep 2009 16:59:30 +0000 (17:59 +0100)]
videosink: add "show-preroll-frame" property

Add a property to disable rendering of video frames during preroll. This
will only work for videosinks that use the new ::show_frame() vfunc instead
of overriding basesink's preroll and render vfuncs directly.

API: GstVideoSink:show-preroll-frame

15 years agoximagesink, xvimagesink: use new GstVideoSink::show_frame() vfunc
Tim-Philipp Müller [Tue, 8 Sep 2009 16:43:26 +0000 (17:43 +0100)]
ximagesink, xvimagesink: use new GstVideoSink::show_frame() vfunc

15 years agovideo: add GstVideoSinkClass::show_frame()
Tim-Philipp Müller [Tue, 8 Sep 2009 17:19:19 +0000 (18:19 +0100)]
video: add GstVideoSinkClass::show_frame()

Add ::show_frame() vfunc which maps to basesink's ::preroll and ::render
vfuncs and add some gtk-doc chunks.

API: GstVideoSinkClass::show_frame()

15 years agonavigation: don't do stuff inside g_return_val_if_fail() statements
Tim-Philipp Müller [Tue, 8 Sep 2009 15:00:47 +0000 (16:00 +0100)]
navigation: don't do stuff inside g_return_val_if_fail() statements

Or it will all fall apart if someone compiles with -DG_DISABLE_ASSERT.

15 years agonavigation: Fix compiler warning with MSVC
Havard Graff [Mon, 31 Aug 2009 18:24:22 +0000 (20:24 +0200)]
navigation: Fix compiler warning with MSVC

Fixes bug #594275.

15 years agobasertpdepayload: fix event forwarding
Havard Graff [Mon, 31 Aug 2009 18:31:56 +0000 (20:31 +0200)]
basertpdepayload: fix event forwarding

15 years agortcpbuffer: add missing break in handling of GST_RTCP_TYPE_PSFB
Havard Graff [Mon, 31 Aug 2009 18:36:37 +0000 (20:36 +0200)]
rtcpbuffer: add missing break in handling of GST_RTCP_TYPE_PSFB

Fixes #594258

15 years agofix whitespace
Wim Taymans [Tue, 8 Sep 2009 11:02:46 +0000 (13:02 +0200)]
fix whitespace

15 years agobaseaudiosrc: improve slave skew resync
Håvard Graff [Tue, 8 Sep 2009 10:59:20 +0000 (12:59 +0200)]
baseaudiosrc: improve slave skew resync

The old one did the mistake of not actually advancing the ringbuffer, it just
adjusted the segbase, introducing the whole lenght of the ringbuffer as an
extra delay in the pipeline.

Also make sure that the resync can never go back in time, producing the same
timestamps that has already been produced, as this can cause severe problems
for sinks and other synching mechanisms.

Fixes #594256

15 years agotypefinding: disable typefinder for headerless flac
Tim-Philipp Müller [Mon, 7 Sep 2009 16:13:12 +0000 (17:13 +0100)]
typefinding: disable typefinder for headerless flac

Disable headerless flac typefinder as long as it happily typefinds anything
including /dev/urandom as flac and as long as it's not particularly useful
given that such streams don't really exist in the wild.

Also fix up some comments so that gtk-doc doesn't complain about them.

15 years agoximagesink: fix small memory leak when setting window title
René Stadler [Sun, 6 Sep 2009 12:21:43 +0000 (15:21 +0300)]
ximagesink: fix small memory leak when setting window title

15 years agoxvimagesink: fix small memory leak when setting window title
René Stadler [Sat, 5 Sep 2009 22:42:42 +0000 (01:42 +0300)]
xvimagesink: fix small memory leak when setting window title

15 years agointrospection: Add *.gir and *.typelib to .gitignore
Sebastian Dröge [Sat, 5 Sep 2009 11:55:27 +0000 (13:55 +0200)]
introspection: Add *.gir and *.typelib to .gitignore

15 years agointroduction: Fix out-of-tree build
Sebastian Dröge [Sat, 5 Sep 2009 11:46:58 +0000 (13:46 +0200)]
introduction: Fix out-of-tree build

15 years agortsp: Fix introspection build by ordering sources/headers in dependency order
Sebastian Dröge [Sat, 5 Sep 2009 11:13:23 +0000 (13:13 +0200)]
rtsp: Fix introspection build by ordering sources/headers in dependency order

15 years agoaudio: Remove debug echo
Sebastian Dröge [Sat, 5 Sep 2009 11:09:17 +0000 (13:09 +0200)]
audio: Remove debug echo

15 years agoaudio: Fix build of introspection data by using dependency order for the headers...
Sebastian Dröge [Sat, 5 Sep 2009 11:08:19 +0000 (13:08 +0200)]
audio: Fix build of introspection data by using dependency order for the headers/sources

15 years agointrospection: Strip Gst prefix from all types/functions
Sebastian Dröge [Sat, 5 Sep 2009 10:31:47 +0000 (12:31 +0200)]
introspection: Strip Gst prefix from all types/functions

15 years agointrospection: Fix build if gir-repository is not installed
Sebastian Dröge [Sat, 5 Sep 2009 09:49:41 +0000 (11:49 +0200)]
introspection: Fix build if gir-repository is not installed

15 years agovideo: Add gobject-introspection support
Sebastian Dröge [Sat, 5 Sep 2009 09:37:14 +0000 (11:37 +0200)]
video: Add gobject-introspection support

15 years agotag: Add gobject-introspection support
Sebastian Dröge [Sat, 5 Sep 2009 09:35:34 +0000 (11:35 +0200)]
tag: Add gobject-introspection support

15 years agosdp: Add gobject-introspection support
Sebastian Dröge [Sat, 5 Sep 2009 09:34:11 +0000 (11:34 +0200)]
sdp: Add gobject-introspection support

15 years agolibs: Add nodist headers and sources to the introspection files
Sebastian Dröge [Sat, 5 Sep 2009 09:31:48 +0000 (11:31 +0200)]
libs: Add nodist headers and sources to the introspection files

15 years agortsp: Add gobject-introspection support
Sebastian Dröge [Sat, 5 Sep 2009 09:28:59 +0000 (11:28 +0200)]
rtsp: Add gobject-introspection support

15 years agortp: Add gobject-introspection support
Sebastian Dröge [Sat, 5 Sep 2009 09:25:42 +0000 (11:25 +0200)]
rtp: Add gobject-introspection support

15 years agoriff: Add gobject-introspection support
Sebastian Dröge [Sat, 5 Sep 2009 09:23:13 +0000 (11:23 +0200)]
riff: Add gobject-introspection support

15 years agopbutils: Add gobject-introspection support
Sebastian Dröge [Sat, 5 Sep 2009 09:20:51 +0000 (11:20 +0200)]
pbutils: Add gobject-introspection support

15 years agonetbuffer: Add gobject-introspection support
Sebastian Dröge [Sat, 5 Sep 2009 09:17:07 +0000 (11:17 +0200)]
netbuffer: Add gobject-introspection support

15 years agointerfaces: Add gobject-introspection support
Sebastian Dröge [Sat, 5 Sep 2009 09:15:05 +0000 (11:15 +0200)]
interfaces: Add gobject-introspection support

15 years agofft: Add gobject-introspection support
Sebastian Dröge [Sat, 5 Sep 2009 09:04:19 +0000 (11:04 +0200)]
fft: Add gobject-introspection support

15 years agocdda: Add gobject-introspection support
Sebastian Dröge [Sat, 5 Sep 2009 09:01:44 +0000 (11:01 +0200)]
cdda: Add gobject-introspection support

This is disabled for now until gobject-introspection is fixed

15 years agoaudio: Add gobject-introspection support
Sebastian Dröge [Sat, 5 Sep 2009 08:50:48 +0000 (10:50 +0200)]
audio: Add gobject-introspection support

15 years agoapp: Add gobject-introspection support
Sebastian Dröge [Sat, 5 Sep 2009 08:40:21 +0000 (10:40 +0200)]
app: Add gobject-introspection support

15 years agoAutomatic update of common submodule
Sebastian Dröge [Sat, 5 Sep 2009 08:20:24 +0000 (10:20 +0200)]
Automatic update of common submodule

From 00a859e to 19fa4f3

15 years agotypefind: fix midi typefinding
Wim Taymans [Fri, 4 Sep 2009 13:48:06 +0000 (15:48 +0200)]
typefind: fix midi typefinding

We already have a audio/midi typefinder so don't override it with the midi in
RIFF typefinder or else we fail to detect plain midi files.

15 years agouridecodebin: do buffering for more uris
Wim Taymans [Fri, 4 Sep 2009 09:29:55 +0000 (11:29 +0200)]
uridecodebin: do buffering for more uris

Add ssh://, ftp://, sftp://, myth:// to the list of uris that require
buffering.

Fixes #594020

15 years agotypefindfunctions: Add typefinder for Midi inside RIFF
Sebastian Dröge [Fri, 4 Sep 2009 05:36:10 +0000 (07:36 +0200)]
typefindfunctions: Add typefinder for Midi inside RIFF

This is a standard Midi file format that should be supported by
all Midi decoders and also has the mimetype audio/mid according to
the Midi specification homepage.

Fixes bug #594094.

15 years agoaudiortppay: add some debugging
Wim Taymans [Thu, 3 Sep 2009 16:53:19 +0000 (18:53 +0200)]
audiortppay: add some debugging

15 years agoaudiortppay: handle gaps
Wim Taymans [Thu, 3 Sep 2009 15:53:47 +0000 (17:53 +0200)]
audiortppay: handle gaps

Add various conversion functions between time<->bytes<->rtptime that will be
used later on.
Refactor the min/max packet length code so that it can be used for both
sample/frame based payloaders. Cache the returned values.
code cleanups.
When we discover a DISCONT buffer, make the outgoing RTP timestamps have the
same gap as the GStreamer timestamps gap.

15 years agoaudiortppay: fix frame duration calculations
Wim Taymans [Thu, 3 Sep 2009 12:13:44 +0000 (14:13 +0200)]
audiortppay: fix frame duration calculations

Fix the calculation of the frame duration and rtp timestamps.
Add some debugging

15 years agortppay: add some debugging
Wim Taymans [Thu, 3 Sep 2009 12:13:12 +0000 (14:13 +0200)]
rtppay: add some debugging

15 years agoaudiortppay: use offsets for RTP timestamps
Wim Taymans [Wed, 2 Sep 2009 17:49:57 +0000 (19:49 +0200)]
audiortppay: use offsets for RTP timestamps

Have a custom sample/frame function to generate an offset that the base class
will use for generating RTP timestamps. This results in perfect RTP timestamps
on the output buffers.
Refactor setting metadata on output buffers.
Add some more functionality to _flush().
Handle DISCONT on the input buffers and set the marker bit and DISCONT flag on
the next outgoing buffer.
Flush the pending data on EOS.

15 years agoaudiortppay: move function around
Wim Taymans [Wed, 2 Sep 2009 11:13:54 +0000 (13:13 +0200)]
audiortppay: move function around

15 years agoaudiortppay: fix sample duration calculation
Wim Taymans [Wed, 2 Sep 2009 11:12:28 +0000 (13:12 +0200)]
audiortppay: fix sample duration calculation

15 years agoaudiortppay: more refactoring
Wim Taymans [Wed, 2 Sep 2009 10:24:22 +0000 (12:24 +0200)]
audiortppay: more refactoring

Unify the sample/frame buffer handling code by making the functions plugable.

15 years agoaudiortppayload: refactor some more
Wim Taymans [Wed, 2 Sep 2009 10:03:27 +0000 (12:03 +0200)]
audiortppayload: refactor some more

Refactor getting the packet min/max size and alignment code.
Refactor converting bytes to time.
change some variable to something shorter.

15 years agoaudiortppayload: refactor and cleanup
Wim Taymans [Wed, 2 Sep 2009 08:46:30 +0000 (10:46 +0200)]
audiortppayload: refactor and cleanup

Always use the adapter when we need to fragment the incomming buffer. Use more
modern adapter functions to avoid malloc and memcpy. The overall result is that
the code looks cleaner while it should be equally fast and in some case avoid a
memcpy and malloc.
Use the adapter timestamping functions for more precise timestamps in case of
weird disconts.
Cache some values instead of recalculating them.
Add gst_base_rtp_audio_payload_flush() to flush a certain amount of bytes from
the internal adapter.

API: GstBaseRTPAudioPayload::gst_base_rtp_audio_payload_flush()

15 years agoUpdate common
Tim-Philipp Müller [Thu, 3 Sep 2009 15:56:55 +0000 (16:56 +0100)]
Update common

15 years agobasertppay: add property to disable perfect RTP time
Wim Taymans [Thu, 3 Sep 2009 09:29:23 +0000 (11:29 +0200)]
basertppay: add property to disable perfect RTP time

Add a property to disable the generation of perfect RTP timestamps. By default
it is active.

API: GstBaseRTPPayload::perfect-rtptime

15 years agobasertppay: allow subclasses to influence RTP time
Wim Taymans [Wed, 2 Sep 2009 17:47:26 +0000 (19:47 +0200)]
basertppay: allow subclasses to influence RTP time

Allow subclasses to use the OFFSET field on RTP buffers to influence the way in
which RTP timestamps are generated. Usually timestamps are created from the
GStreamer timestamps on the buffer, which could result in imperfect RTP
timestamps.

15 years agobasertppay: add macro to cast
Wim Taymans [Wed, 2 Sep 2009 17:44:49 +0000 (19:44 +0200)]
basertppay: add macro to cast

15 years agoaudiopayload: code cleanups
Wim Taymans [Tue, 1 Sep 2009 16:26:52 +0000 (18:26 +0200)]
audiopayload: code cleanups

15 years agoaudiortppayload: don't check adapter
Wim Taymans [Tue, 1 Sep 2009 16:08:14 +0000 (18:08 +0200)]
audiortppayload: don't check adapter

the adapter is never NULL so we don't need to check it.
Use _scale functions to avoid overflows.

15 years agotypefinding: move gio-based xdg mime typefinder from -bad to -base
Tim-Philipp Müller [Wed, 2 Sep 2009 23:14:02 +0000 (00:14 +0100)]
typefinding: move gio-based xdg mime typefinder from -bad to -base

Its purposes is mainly to avoid false positives (e.g. mp3 typefinder
reporting a 20% probability and somesuch). Won't be registered if
the gio plugin has been disabled via ./configure --disable-gio.

15 years agosubparse: GstAdapter is not a GstObject and should be freed with g_object_unref
Tim-Philipp Müller [Tue, 1 Sep 2009 14:06:51 +0000 (15:06 +0100)]
subparse: GstAdapter is not a GstObject and should be freed with g_object_unref

15 years agov4lsrc: fix timestamping for when we do not have a clock yet
Tim-Philipp Müller [Tue, 1 Sep 2009 14:02:37 +0000 (15:02 +0100)]
v4lsrc: fix timestamping for when we do not have a clock yet

Should fix #559049.

15 years agov4lsrc: don't log not-yet-initialised integer value
Tim-Philipp Müller [Tue, 1 Sep 2009 13:30:41 +0000 (14:30 +0100)]
v4lsrc: don't log not-yet-initialised integer value

15 years agov4lsrc: avoid unnecessary run-time type checks in custom buffer finalize
Tim-Philipp Müller [Tue, 1 Sep 2009 13:28:48 +0000 (14:28 +0100)]
v4lsrc: avoid unnecessary run-time type checks in custom buffer finalize

And reflow code to be more indent friendly.

15 years agobasertppayload: Make instance init faster by not reading /dev/urandom 3 times
Jonas Holmberg [Tue, 1 Sep 2009 08:39:52 +0000 (10:39 +0200)]
basertppayload: Make instance init faster by not reading /dev/urandom 3 times

... which is the default seed when creating a new GRand. Because
GLib in older versions used buffered IO this would take a lot of time.

Instead use the global GRand for getting random numbers and keep the
three instance GRand for backward compatibility with a simple seed.

Fixes bug #593284.

15 years agoadder: improve caps filter functionality. Fixes #590146.
Stefan Kost [Mon, 31 Aug 2009 19:48:01 +0000 (22:48 +0300)]
adder: improve caps filter functionality. Fixes #590146.

Also use the capsfilter if there is no src-peer as the caps constrain what
we can do. Don't create any_caps as a default, as we check for NULL to skip the
filtering. This is a (small) performance regression as we always intersect
otherwise.

15 years agodecodebin2: Post missing plugin messages before any error messages
Sebastian Dröge [Mon, 31 Aug 2009 09:10:55 +0000 (11:10 +0200)]
decodebin2: Post missing plugin messages before any error messages

15 years agocddabasesrc: safely handle the indexes
Wim Taymans [Fri, 28 Aug 2009 17:06:57 +0000 (19:06 +0200)]
cddabasesrc: safely handle the indexes

15 years agodef: add new rtsp symbols
Wim Taymans [Fri, 28 Aug 2009 17:06:44 +0000 (19:06 +0200)]
def: add new rtsp symbols

15 years agobasertppayload: whitespace fixes.
Wim Taymans [Fri, 28 Aug 2009 12:08:30 +0000 (14:08 +0200)]
basertppayload: whitespace fixes.

15 years agoBug 593035 - set IN_CAPS for streamheader buffer
Marc-André Lureau [Thu, 27 Aug 2009 16:59:49 +0000 (18:59 +0200)]
Bug 593035 - set IN_CAPS for streamheader buffer

15 years agoplaybin: The internally linked pad of the selector might be NULL in some cases
Sebastian Dröge [Wed, 26 Aug 2009 14:56:19 +0000 (16:56 +0200)]
playbin: The internally linked pad of the selector might be NULL in some cases

15 years agoplaybin: Fix iterate internal linked pads functions for the stream selectors
Sebastian Dröge [Wed, 26 Aug 2009 14:45:49 +0000 (16:45 +0200)]
playbin: Fix iterate internal linked pads functions for the stream selectors

This now used the new gst_iterator_new_single() function and as a side effect
fixes bug #592864.

15 years agoriff: Add support for AVF files
Sebastian Dröge [Wed, 26 Aug 2009 07:08:53 +0000 (09:08 +0200)]
riff: Add support for AVF files

AVF is valid RIFF but has AVF0 has first fourcc instead of RIFF.

Fixes bug #593117.

15 years agotypefindfunctions: Detect AVF files as RIFF files too
Sebastian Dröge [Wed, 26 Aug 2009 07:08:12 +0000 (09:08 +0200)]
typefindfunctions: Detect AVF files as RIFF files too

AVF is valid RIFF but has AVF0 as first fourcc instead of RIFF.

Partially fixes bug #593117.

15 years agoaudioresample: Add unit test for checking for timestamp drifts
Sebastian Dröge [Fri, 21 Aug 2009 09:51:47 +0000 (11:51 +0200)]
audioresample: Add unit test for checking for timestamp drifts

This also checks for perfect timestamping and offsetting.

15 years agoaudioresample: Fix drain processing
Sebastian Dröge [Fri, 21 Aug 2009 08:11:23 +0000 (10:11 +0200)]
audioresample: Fix drain processing

In case we have to convert internally don't process output length input samples
but history length input samples.

15 years agoaudioresample: Improve debugging a bit in the unit test
Sebastian Dröge [Fri, 21 Aug 2009 08:02:05 +0000 (10:02 +0200)]
audioresample: Improve debugging a bit in the unit test

15 years agoaudioresample: On the first buffer we need discont handling
Sebastian Dröge [Fri, 21 Aug 2009 08:00:49 +0000 (10:00 +0200)]
audioresample: On the first buffer we need discont handling

Otherwise we won't get upstream timestamps and everything and all
output buffers would have -1 timestamps.

15 years agosubparse: Remove dependency on regex.h as it's not used anyway
Руслан Ижбулатов [Fri, 21 Aug 2009 04:23:39 +0000 (08:23 +0400)]
subparse: Remove dependency on regex.h as it's not used anyway

Fixes bug #592544.

15 years agoaudioresample: Fix buffer overflow when pushing the drain
Kipp Cannon [Fri, 21 Aug 2009 04:58:31 +0000 (06:58 +0200)]
audioresample: Fix buffer overflow when pushing the drain

15 years agoaudioresample: Fix timestamp drift
Kipp Cannon [Fri, 21 Aug 2009 04:57:58 +0000 (06:57 +0200)]
audioresample: Fix timestamp drift

Fixes bug #591934.

15 years agoRemove Ronald Bultje from Authors field
David Schleef [Mon, 24 Aug 2009 18:34:35 +0000 (11:34 -0700)]
Remove Ronald Bultje from Authors field

Replaced with "GStreamer maintainers
<gstreamer-devel@lists.sourceforge.net>" or just removed,
depending on the number of other authors.

15 years agoplaybin2: fix refcounting of _get_sink()
Wim Taymans [Mon, 24 Aug 2009 13:06:28 +0000 (15:06 +0200)]
playbin2: fix refcounting of _get_sink()

g_value_set_object() increases the refcount of the sink, which is not needed
because the object should already be refcounted. Make sure this is always the
case and use g_value_take_object().

Fixes: #592884

15 years agortsp: Mark Transport as supporting multiple values.
Peter Kjellerstedt [Mon, 24 Aug 2009 12:39:16 +0000 (14:39 +0200)]
rtsp: Mark Transport as supporting multiple values.

15 years agortsp: Added missing Since tags.
Peter Kjellerstedt [Mon, 24 Aug 2009 11:58:17 +0000 (13:58 +0200)]
rtsp: Added missing Since tags.

15 years agoringbuffer: Improve audiosink startup performance
Eero Nurkkala [Mon, 24 Aug 2009 11:27:55 +0000 (13:27 +0200)]
ringbuffer: Improve audiosink startup performance

When we start the ringbuffer, immediatly continue processing samples if the
writer prepared some for us.

Fixes #545807

15 years agortsp: Added new API for sending using GstRTSPWatch.
Peter Kjellerstedt [Mon, 17 Aug 2009 09:53:43 +0000 (11:53 +0200)]
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()

15 years agortsp: Made gst_rtsp_watch_queue_data() thread safe.
Peter Kjellerstedt [Mon, 17 Aug 2009 09:46:32 +0000 (11:46 +0200)]
rtsp: Made gst_rtsp_watch_queue_data() thread safe.

15 years agortsp: Added gst_rtsp_connection_set_http_mode().
Peter Kjellerstedt [Wed, 17 Jun 2009 13:37:53 +0000 (15:37 +0200)]
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()

15 years agortsp: Allow gst_rtsp_connection_do_tunnel() to just setup decoding context.
Peter Kjellerstedt [Tue, 16 Jun 2009 17:35:23 +0000 (19:35 +0200)]
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.

15 years agortsp: Write as much as possible in gst_rtsp_source_dispatch().
Peter Kjellerstedt [Tue, 16 Jun 2009 17:04:54 +0000 (19:04 +0200)]
rtsp: Write as much as possible in gst_rtsp_source_dispatch().

Try to write as much as possible if there are multiple messages queued.

15 years agortsp: Add error_full callback to GstRTSPWatchFuncs.
Peter Kjellerstedt [Tue, 16 Jun 2009 16:38:02 +0000 (18:38 +0200)]
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.

15 years agortsp: Made read_line() support LWS.
Peter Kjellerstedt [Mon, 17 Aug 2009 16:29:17 +0000 (18:29 +0200)]
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).

15 years agortsp: Do not split headers which should not be split.
Peter Kjellerstedt [Thu, 20 Aug 2009 12:12:50 +0000 (14:12 +0200)]
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.

15 years agortsp: Parse WWW-Authenticate headers correctly.
Peter Kjellerstedt [Thu, 20 Aug 2009 12:12:09 +0000 (14:12 +0200)]
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.

15 years agortsp: Improve parse_line().
Peter Kjellerstedt [Wed, 17 Jun 2009 19:46:27 +0000 (21:46 +0200)]
rtsp: Improve parse_line().

Make parse_line() handle keys with multiple values on one line correctly.

15 years agortsp: Rewrote setup_tunneling().
Peter Kjellerstedt [Wed, 17 Jun 2009 21:15:23 +0000 (23:15 +0200)]
rtsp: Rewrote setup_tunneling().

Rewrote setup_tunneling() to use normal GstRTSPMessages instead of hard
coded strings and duplicates of the message parsing code.

15 years agortsp: Rewrote gen_tunnel_reply().
Peter Kjellerstedt [Mon, 24 Aug 2009 08:20:16 +0000 (10:20 +0200)]
rtsp: Rewrote gen_tunnel_reply().

Rewrote gen_tunnel_reply() to generate a normal GstRTSPMessage rather
than a hard coded string.

15 years agortsp: Ignore the Content-Length for POST requests.
Peter Kjellerstedt [Mon, 24 Aug 2009 08:19:35 +0000 (10:19 +0200)]
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.

15 years agortsp: Normalize lines (remove extra whitespace) before parsing.
Peter Kjellerstedt [Wed, 17 Jun 2009 18:52:48 +0000 (20:52 +0200)]
rtsp: Normalize lines (remove extra whitespace) before parsing.

15 years agortsp: Made parse_string() return a result.
Peter Kjellerstedt [Wed, 10 Jun 2009 11:11:31 +0000 (13:11 +0200)]
rtsp: Made parse_string() return a result.

This will catch parsing errors when a too long string is received.

15 years agortsp: Improved parsing of messages.
Peter Kjellerstedt [Wed, 10 Jun 2009 09:43:31 +0000 (11:43 +0200)]
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.

15 years agortsp: Added support for HTTP messages
Peter Kjellerstedt [Tue, 9 Jun 2009 15:54:20 +0000 (17:54 +0200)]
rtsp: Added support for HTTP messages

15 years agortsp: Added gst_rtsp_connection_create_from_fd().
Peter Kjellerstedt [Tue, 9 Jun 2009 14:22:17 +0000 (16:22 +0200)]
rtsp: Added gst_rtsp_connection_create_from_fd().

API: gst_rtsp_connection_create_from_fd()