Commit graph

118 commits

Author SHA1 Message Date
Nirbheek Chauhan
befa41cdf6 rtspsrc: Implement ONVIF backchannel support
Set backchannel=onvif to enable, and use the 'push-backchannel-sample'
action signal with the correct stream id.
2018-02-16 11:06:27 +02:00
Edward Hervey
10bc8fdfd2 rtspsrc: Do more checks for seekability
When receiving a seek event, check whether we can actually seek based
on the information the server provided.

Also add more documentation on what the seekable field means
2017-11-24 15:39:38 +01:00
Thibault Saunier
8121752887 rtsp: Start implementing support for RTSP 2.0
- Handle version negotation:

  Added a `default-version` property so that the user can configure
  what to use in case the server does not support version negotation
  (which actually exist)

- Handle pipelined requests, which allow avoiding full round trip to
  setup the RTP streams (request are sent in a raw, and response are
  handled as they arrive).

- Handle the new Media-Properties header

- Handle the new Seek-Style header

- Handle the new Accept-Ranges header

Handling of IPV6 should already be OK.

We are still missing (at least) the following features (which do not
seem really mandatory as they require a "persistent connection between
server and client"):

  - Server to Client TEARDOWN command (Not so usefull fmpov)
  - PLAY_NOTIFY (not needed for our server yet)
  - Support for the new REDIRECT features

and probably some more protocol changes might not be handled yet.

https://bugzilla.gnome.org/show_bug.cgi?id=781446
2017-10-05 12:05:40 -03:00
Patrick Radizi
3de0244532 rtpbin: add option for sanity checking timestamp offset
Timestamp offsets needs to be checked to detect unrealistic values
caused for example by NTP clocks not in sync. The new parameter
max-ts-offset lets the user decide an upper offset limit. There
are two different cases for checking the offset based on if
ntp-sync is used or not:
1) ntp-sync enabled
   Only negative offsest are allowed since a positive offset would
   mean that the sender and receiver clocks are not in sync.
   Default vaule of max-ts-offset = 0 (disabled)
2) ntp-sync disabled
   Both positive and negative offsets are allowed.
   Default vaule of max-ts-offset = 3000000000
The reason for different default values is to be backwards
compatible.

https://bugzilla.gnome.org/show_bug.cgi?id=785733
2017-09-15 13:33:14 +03:00
Patrick Radizi
23f7739ba4 rtpbin: add option for increasing ts_offset gradually
Instant large changes to ts_offset may cause timestamps to move
backwards and also cause visible effects in media playback. The new
option max-ts-offset-adjustment lets the application control the rate to
apply changes to ts_offset.

https://bugzilla.gnome.org/show_bug.cgi?id=784002
2017-09-14 13:15:56 +03:00
Sebastian Dröge
a722f6e832 rtspsrc: Use a mutex for protecting against concurrent send/receives
We currently send data to the RTSP connection from multiple threads:
whenever a command is to be handled and whenever RTCP is generated. This
can cause data corruption or worse if both happen at the same time.

As such, protect gst_rtsp_connection_send() and gst_rtsp_connection_receive()
calls with a mutex. While this means that we hold a mutex during the IO
operation, this is not actually a problem as the IO operation can be
interrupted (gst_rtsp_connection_flush()) at any time and is blocking by
itself anyway.
2017-06-15 15:25:23 +03:00
Mathieu Duponchelle
f6283b082e rtspsrc: uniquify stream ids
https://bugzilla.gnome.org/show_bug.cgi?id=783307
2017-06-07 23:30:05 +02:00
Sebastian Dröge
7c728db1f3 rtspsrc: Update caps for TCP whenever they change
We only changed them for UDP so far, which caused the wrong seqnum-base and
other information to be passed to rtpjitterbuffer/etc when seeking. This
usually wasn't that much of a problem as the code there is robust enough, but
every now and then it causes us to drop up to 32756 packets before we
continue doing anything meaningful.

https://bugzilla.gnome.org/show_bug.cgi?id=765689
2016-04-27 20:52:32 +03:00
Aleix Conchillo Flaqué
c36930535d rtspsrc: add srtp rollover counters from mikey crypto sessions
The server can send multiple crypto sessions, one for each SSRC with its
own rollover counter. We parse this information and pass it to the SRTP
decoder via the "request-key" signal.

https://bugzilla.gnome.org/show_bug.cgi?id=730540
2016-04-15 18:12:06 +02:00
Sebastian Dröge
df247f091c rtpjitterbuffer: Add RFC7273 media clock handling
https://bugzilla.gnome.org/show_bug.cgi?id=762259
2016-04-03 11:24:34 +03:00
Sebastian Dröge
01c0f8723f rtpbin/rtpjitterbuffer/rtspsrc: Add property to set maximum ms between RTCP SR RTP time and last observed RTP time
https://bugzilla.gnome.org/show_bug.cgi?id=755125
2015-09-25 23:55:05 +02:00
George Kiagiadakis
e2f2f087ec rtspsrc: send the User-Agent header
Sometimes it is useful to know this information on the
server side. Other popular implementations (vlc, ffmpeg, ...)
also send this header on every message.

This includes a new "user-agent" property that the user
can set to use a custom User-Agent string. The default
is "GStreamer/<version>"

https://bugzilla.gnome.org/show_bug.cgi?id=750101
2015-08-14 15:59:06 +02:00
Hyunjun Ko
f560a3d223 rtspsrc: Add new ntp-time-source property and deprecate use-pipeline-clock property
Enable to use new ntp-time-source property of rtpbin

https://bugzilla.gnome.org/show_bug.cgi?id=751496
2015-06-25 17:16:49 +02:00
Xavier Claessens
b0b3e8e2cc rtspsrc: Add a GTlsInteraction property
It can be used for TLS client authentication.

https://bugzilla.gnome.org/show_bug.cgi?id=750471
2015-06-09 20:03:18 -04:00
Sebastian Dröge
9b14170355 rtspsrc: Use single-include header for the RTSP library 2015-05-20 16:37:55 +03:00
Nicolas Dufresne
84725d62b5 rtspsrc: Fix segment in TCP mode
It is expected that buffers are time-stamped with running time. Set
a segment accordingly. In this case we pick 0,-1 as this is what udpsrc
would do. Depayloaders will update the segment to reflect the playback
position.

https://bugzilla.gnome.org/show_bug.cgi?id=635701
2015-03-26 17:54:08 -04:00
Matthew Waters
bf0a19bf02 rtspsrc: add retransmission support according to RFC4588
Based on the client-rtpaux example
2014-12-16 16:40:08 +01:00
Aleix Conchillo Flaqué
7ce0ea3946 rtspsrc: add support for key length parameters
This patch adds supports for the incoming key management parameters for
encryption and authentication key lengths.

It also adds a new signal request-rtcp-key that allows the user to
provide the crypto parameters and key for the RTCP stream.

https://bugzilla.gnome.org/show_bug.cgi?id=730473
2014-06-19 16:11:19 +02:00
Wim Taymans
6210cbe1e2 rtspsrc: send sender SSRC in the MIKEY message
Allocate a new SSRC for our RTCP messages back to the server and set
this in the MIKEY message.
2014-04-03 17:40:01 +02:00
Wim Taymans
2edd450369 rtspsrc: create and send the RTCP encryption key
Create and make a key for encrypting the RTCP packets back to the server
and wrap this in a MIKEY message that we send as a header in the SETUP
request.
2014-04-03 12:21:27 +02:00
Wim Taymans
67f3113759 rtspsrc: srtp handling 2014-03-25 10:23:24 +01:00
Wim Taymans
224239096d rtspsrc: skip streams with same control url
Keep track of what streams we did the SETUP for. We only need to
configure caps, wait for pads and push events on setup streams. We can
remove the disabled state of the stream and simplify some checks.
After we setup a stream, skip the other streams that have the same
control url. Use a skipped flag to mark streams that should be skipped.
2014-03-06 12:30:54 +01:00
Wim Taymans
27d883fe64 rtspsrc: just use the SDP index as the stream id
Use the index of the media stream in the SDP as the stream id instead of
keeping a separate counter.
2014-03-06 12:30:54 +01:00
Wim Taymans
70de0e4e99 rtspsrc: Add support for multiple payload types
A media stream can have multiple payload types. Parse all the payload
types and collect the caps information. We then have to store the
pt<->caps mapping instead of 1 pt and 1 caps.
Parse the profile from the SDP and use that to negotiate the transport
instead of always using AVP.
Rework how we do some tweaks for ASF and Realmedia.
2014-03-04 16:40:34 +01:00
Aleix Conchillo Flaqué
62f5a27416 rtspsrc: add tls-database property
Add support for a new property: tls-database. If the property is set,
the certificate database will be given to the rtsp connection if TLS
protocol is being used. If the server certificate can't be verified with
the default database, this additional database will be used.

https://bugzilla.gnome.org/show_bug.cgi?id=724396
2014-02-20 20:03:40 +01:00
Sebastian Dröge
8054cd5df3 Revert "rtspsrc: Proxy rtpjitterbuffer do-retransmission property"
This reverts commit 9f7b1128b1.

This should be handled automatically be rtspsrc if the AVPF profile
is used, and manual enabling of it can be done with the new-manager
signal.
2014-01-24 12:37:39 +01:00
Aleix Conchillo Flaqué
9f7b1128b1 rtspsrc: Proxy rtpjitterbuffer do-retransmission property
https://bugzilla.gnome.org/show_bug.cgi?id=722866
2014-01-24 09:14:59 +01:00
Sebastian Dröge
9ae6981578 rtspsrc: Use the synced buffer mode in auto mode if a clock provider is in the SDP 2013-11-13 10:54:19 +01:00
Rico Tzschichholz
b137f79581 rtsp: Add missing gio-2.0 deps and includes 2013-11-02 23:12:13 +01:00
Aleix Conchillo Flaque
82b8374af8 rtspsrc: allow setting tls certificate validation flags
Added a new property "tls-validation-flags". If the url transport is
TLS, the validation flags will be set to the rtsp connection.

https://bugzilla.gnome.org/show_bug.cgi?id=711230
2013-11-01 16:47:36 +01:00
Youness Alaoui
6636efd31a rtspsrc: Add sdes property and proxy it to rtpbin 2013-08-21 09:06:02 +02:00
Wim Taymans
bb9d42b976 rtspsrc: avoid some flushes 2013-06-26 14:58:53 +02:00
Youness Alaoui
547df8e14f rtspsrc: Expose use-pipeline-clock property 2013-06-25 14:50:33 +02:00
Sebastian Dröge
b17750ed9e rtspsrc: Proxy the ntp-sync property of rtpbin 2013-04-12 12:58:50 +02:00
Wim Taymans
f8013487c9 rtspsrc: add support for NetClientClock
When the server suggests a GstNetTimeProvider in the SDP, set up a
GstNetClientClock that slaves to the remote clock and suggest this clock in
provide_clock.
2013-04-11 15:00:05 +01:00
Sebastian Dröge
d80ff8e7f3 rtspsrc: Proxy the multicast-iface property of udpsrc 2013-04-03 17:53:13 +02:00
Tim-Philipp Müller
95a37196b3 rtspsrc: add "proxy-id" and "proxy-pw" properties
to match souphttpsrc. user/password passed via the URI
will still take precedence though.

https://bugzilla.gnome.org/show_bug.cgi?id=395427
2012-12-31 00:22:27 +00:00
Aleix Conchillo Flaque
6c855edf03 rtspsrc: allow client to disable reconnection
* gst/rtsp/gstrtspsrc.[ch]: added new "udp-reconnect" property. Before,
  rtspsrc always tried to reconnect to the server when the RTSP
  connection was closed by the server. This property lets the user
  decide whether it wants rtspsrc to reconnect or not.

  https://bugzilla.gnome.org/show_bug.cgi?id=683912
2012-11-16 12:55:10 +01:00
Tim-Philipp Müller
230cf41cc9 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:07:18 +00:00
Aleix Conchillo Flaque
4a200b670f rtp: make rtp packet probation configurable (bug #682512) 2012-08-30 21:49:57 +02:00
Aleix Conchillo Flaque
8d864dbbfc rtspsrc: make jitterbuffer drop-on-latency available (fix #682055)
Conflicts:

	gst/rtsp/gstrtspsrc.h
2012-08-22 10:39:19 +02:00
Wim Taymans
935472aba7 rtspsrc: Rework the async state handling
Always send the flushing events to the udp elements now that basesrc supports
this. This makes sure a segment event is sent correctly after a flush.
Keep track of the currently executing command and make it possible to specify
what command you want to cancel when starting a new async command.

See https://bugzilla.gnome.org/show_bug.cgi?id=677905
2012-06-12 16:05:40 +02:00
Wim Taymans
c44cd8f55b Merge branch 'master' into 0.11
unport gdkpixbuf
not merged: https://bugzilla.gnome.org/show_bug.cgi?id=654850

Conflicts:
	docs/plugins/Makefile.am
	docs/plugins/gst-plugins-good-plugins-docs.sgml
	docs/plugins/gst-plugins-good-plugins-sections.txt
	docs/plugins/gst-plugins-good-plugins.hierarchy
	docs/plugins/inspect/plugin-avi.xml
	docs/plugins/inspect/plugin-png.xml
	ext/flac/gstflacdec.c
	ext/flac/gstflacdec.h
	ext/libpng/gstpngdec.c
	ext/libpng/gstpngenc.c
	ext/speex/gstspeexdec.c
	gst/audioparsers/gstflacparse.c
	gst/flv/gstflvmux.c
	gst/rtp/gstrtpdvdepay.c
	gst/rtp/gstrtph264depay.c
2012-03-22 11:53:24 +01:00
Marc Leeman
b4756db358 gstrtspsrc: disable RTSP keep-alive on request 2012-03-12 15:14:21 +01:00
Wim Taymans
1584806634 port to new gthread API 2012-01-19 11:33:53 +01:00
Tim-Philipp Müller
87aa29d2cf rtspsrc: make connection-speed property a guint64 2011-11-24 01:19:32 +00:00
Wim Taymans
33f18b8ea4 Merge branch 'master' into 0.11
Conflicts:
	gst/audioparsers/gstamrparse.c
	gst/isomp4/qtdemux.c
2011-09-06 16:06:25 +02:00
Marc Leeman
ce276d903c rtspsrc: allow sending short RTSP requests to a server
Some encoders (Arecont) do not like the long OPTIONS sent at startup as sent by
GStreamer, but do accept the short header as sent by Live555.

This patch makes the extending the request optional by adding a property
(short-header).

Fixes #655805.

API: GstRTSPSrc:short-header
2011-09-05 13:26:06 +02:00
Wim Taymans
c731cd3d95 rtsp: port to 0.11 2011-06-09 17:52:34 +02:00
Mark Nauwelaerts
f7ddf811d7 rtspsrc: fix and improve async handling
Simplify the command handling; passing a command to thread means we really
want it to get the message, which means to always flush provided the command
can handle being interrupted.  Command thread indicates whether command
allows interruption and ensure non-flushing connection as it subsequently
needs it.

In particular, this also makes the TEARDOWN sequence interruptable
and also prevents races where _loop_ could miss a command and would
continue receiving (or at least trying to).

See #632504.
2011-05-17 11:56:22 +02:00