Commit graph

57 commits

Author SHA1 Message Date
Tim-Philipp Müller
58aa58f049 rtsp-server: add missing GST_EXPORT and export deprecated funcs 2017-11-26 13:03:39 +00:00
Jonathan Karlsson
0f87202a71 rtsp-session: Handle the case when timeout=0
According to the documentation, a timeout of value 0 means
that the session never timeouts. This adds handling of that.
If timeout=0 we just return with a -1 from
gst_rtsp_session_next_timeout_usec ().

https://bugzilla.gnome.org/show_bug.cgi?id=785058
2017-11-15 17:20:33 +02:00
Thibault Saunier
b56930704f gi: Fix some annotations and docstrings 2017-04-13 14:20:10 -03:00
Sebastian Dröge
6e145fadf9 rtsp-session: Only remove deprecated API if requested to do so, not just when disabling
gst_rtsp_session_is_expired() and gst_rtsp_session_next_timeout() were
affected.
2017-01-12 19:04:23 +02:00
Kseniia
6136ef66d4 rtsp-session: Fix segfault when doing keep-alive after removing the session
If keep-alive happens after removing the session but before finalizing the
stream transport, we would segfault.

https://bugzilla.gnome.org/show_bug.cgi?id=750544
2016-09-05 22:57:52 +03:00
Ian
178f2d6fe5 rtsp-session: RFC2326 does not allow a space between ; and timeout in the Session header
This works with rtspsrc and live555, but fails with e.g. ffmpeg.

https://bugzilla.gnome.org/show_bug.cgi?id=766619
2016-05-19 11:57:33 +03:00
Kent-Inge Ingesson
d2f1997c4b rtsp-session: Use monotonic time for RTSP session timeout
Changed RTSP session timeout handling to monotonic time
and deprecating the API for current system time.

This fixes timeouts when the system time changes.

https://bugzilla.gnome.org/show_bug.cgi?id=743346
2015-02-19 10:43:30 +02:00
Branko Subasic
2218510cae rtsp-*: Treat sending packets to clients as keepalive
As long as gst-rtsp-server can successfully send RTP/RTCP data to
clients then the client must be reading. This change makes the server
timeout the connection if the client stops reading.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=736647
2014-09-24 10:37:59 +03:00
Wim Taymans
945c93fde0 filter: Release lock in filter functions
Release the object lock before calling the filter functions. We need to
keep a cookie to detect when the list changed during the filter
callback. We also keep a hashtable to make sure we only call the filter
function once for each object in case of concurrent modification.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732950
2014-07-10 11:36:55 +02:00
Wim Taymans
5aec4af1b9 client: manage media in session as a last step
Once we manage a media in a session, we can't unmanage it anymore
without destroying it. Therefore, first check everything before we
manage the media, otherwise if something is wrong we have no way to
unmanage the media.
If we created a new session and something went wrong, remove the session
again. Fixes a leak in the unit test.
2014-07-08 14:46:13 +02:00
Göran Jönsson
aaf921cac4 rtsp-session: Timeout in header.
Adding the possbilty to always have timout in header.
This is configurabe with setting "timeout-always-visible".

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=728264
2014-06-05 10:36:11 +02:00
Sebastian Rasmussen
b1b5301577 gobject-introspection: Add annotations to support language bindings
In addition a few cosmetic changes:

 * Adjust the order of arguments
 * Fix typo: occured -> occurred
 * Fix indentation after Return:-clauses

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726941
2014-03-24 00:36:42 +00:00
Wim Taymans
2f17369e9d media: add suspend modes
Add support for different suspend modes. The stream is suspended right after
producing the SDP and after PAUSE. Different suspend modes are available that
affect the state of the pipeline. NONE leaves the pipeline state unchanged and
is the current and old behaviour, PAUSE will set the pipeline to the PAUSED
state and RESET will bring the pipeline to the NULL state.
A stream is also unsuspended when it goes back to PLAYING, for RESET streams,
this means that the pipeline needs to be prerolled again.

Base on patches by Ognyan Tonchev <ognyan@axis.com>

See https://bugzilla.gnome.org/show_bug.cgi?id=711257
2013-11-28 16:18:39 +01:00
Tim-Philipp Müller
33c4bdfa01 rtsp-server: sprinkle some allow-none annotations for g-i 2013-11-18 10:47:04 +00:00
Wim Taymans
b0f609ce7f rtsp: allow NULL func in filters
Passing a null function make the filters return a list of
refcounted objects.
2013-11-15 16:35:05 +01:00
Sebastian Pölsterl
e756324490 Fixed several GIR warnings 2013-11-12 11:15:58 +01:00
Wim Taymans
0b3644a21b docs: improve docs 2013-07-11 16:57:14 +02:00
Wim Taymans
5a833f503e session: use path matching for session media
Use a path string instead of a uri to lookup session media in the sessions. Also
use path matching to find the largest possible path that matches.
2013-07-03 12:37:48 +02:00
Olivier Crête
b9d111372e Document locking and its order 2013-03-11 11:07:19 +01:00
Wim Taymans
ad00c5e792 rtsp: make object details private
Make all object details private
Add methods to access private bits
2012-11-29 11:11:05 +01:00
Wim Taymans
11cf3f3ccb session: add locking 2012-11-12 16:42:37 +01:00
Wim Taymans
5b4340067a session: move session header code in session object 2012-11-12 12:40:34 +01:00
Tim-Philipp Müller
4dba434f16 Fix FSF address 2012-11-04 00:14:25 +00:00
Sebastian Pölsterl
75598337a9 rtsp-server: added annotations to indicate type of ownership transfer of return values
https://bugzilla.gnome.org/show_bug.cgi?id=680777
2012-10-28 15:39:04 +00:00
Wim Taymans
348b7f9c21 docs: update docs 2012-10-26 12:35:20 +02:00
Wim Taymans
de7c72dec2 rtsp: massive refactoring
Make GObjects from the remaining simple structures.
Remove GstRTSPSessionStream, it's not needed.
Rename GstRTSPMediaStream -> GstRTSPStream: It is shorter
Rename GstRTSPMediaTrans -> GstRTSPStreamTransport: It describes how
  a GstRTSPStream should be transported to a client.
Rename GstRTSPMediaFactory::get_element -> create_element because that
  more accurately describes what it does.
Make nice methods instead of poking in the structures.
Move some methods inside the relevant object source code.
Use GPtrArray to store objects instead of plain arrays, it is more
  natural and allows us to more easily clean up.
Move the allocation of udp ports to the Stream object. The Stream object
  contains the elements needed to stream the media to a client.
Improve the prepare and unprepare methods. Unprepare should now undo
  everything prepare did. Improve also async unprepare when doing EOS on
  shutdown. Make sure we always unprepare correctly.
2012-10-25 21:29:58 +02:00
Sebastian Pölsterl
e11e855ac8 rtsp-server: fixed comments and GIR annotations
https://bugzilla.gnome.org/show_bug.cgi?id=680777
2012-10-18 19:17:01 +01:00
Ognyan Tonchev
4f0ef292f0 session: add ttl to the transport header in SETUP
See https://bugzilla.gnome.org/show_bug.cgi?id=685561
2012-10-10 11:13:58 +02:00
Wim Taymans
fde25cd9c3 rtsp-server: port some more to 0.11
Fix caps.
Remove bufferlist stuff
Update for new API.
Add queue before appsink now that preroll-queue-len is gone.
Update for request pad changes.
2011-12-09 10:53:30 +01:00
Wim Taymans
9e97faf2db server: improve debugging in various objects 2011-01-12 18:14:48 +01:00
Wim Taymans
50b4c8de98 rtsp-server: add support for buffer lists
Add support for sending bufferlists received from appsink.

Fixes #635832
2010-12-29 16:26:41 +01:00
Edward Hervey
eb83fc6318 rtsp-server: Run gst-indent
Since it wasn't using the upstream common previously, there was no
indentation check before commiting.
2010-12-11 10:48:42 +01:00
Edward Hervey
b95165fcff rtsp-server: Some more doc fixups 2010-12-11 10:48:25 +01:00
Wim Taymans
450b68252f media: cleanup media transport before freeing
Cleanup the media transport data before freeing. In particular, remove the qdata
from the rtpsource object.
2010-08-24 16:47:30 +02:00
Wim Taymans
4fdd2bf4d1 session: add support for prevent session timeouts
Add an atomix counter to prevent session timeouts when we are, for example,
streaming over TCP.
2010-04-06 17:07:27 +02:00
Wim Taymans
558c7fddd2 session: small cleanups 2010-04-06 15:44:45 +02:00
Wim Taymans
4eccdd9dd7 session: indent 2010-03-16 18:34:43 +01:00
Wim Taymans
c7ca9b74eb media: avoid doing _get_state() for state changes
When preparing, use the ASYNC_DONE and ERROR messages in the bus handler to wait
until the media is prerolled or in error. This avoids doing a blocking call of
gst_element_get_state() that can cause lockups when there is an error.

Fixes #611899
2010-03-05 17:54:09 +01:00
Wim Taymans
63addbc278 session: handle transport setup correctly
Handle UDP, MCAST and TCP transport negotiation more correctly.
Store the server session SSRC in the transport.
2010-03-05 13:27:18 +01:00
Sebastian Pölsterl
6d227be7a9 Use GStreamer's debugging subsystem 2009-11-21 19:20:23 +01:00
Wim Taymans
7338ab81e1 rtsp: allocate channels in TCP mode
When the client does not provide us with channels in TCP mode, allocate channels
ourselves.
2009-07-27 19:42:44 +02:00
Wim Taymans
9bed89c3b7 rtsp: use RTCP to keep the session alive
Use the RTCP rtcp-from stats field to find the associated session and use this
to keep the session alive.
2009-05-26 19:01:10 +02:00
Wim Taymans
7bbdf7bf97 session: add 5sec to the real session timeout
Allow the session to live 5sec longer before really timing out. This should give
clients some extra time to keep the session active.
2009-05-26 17:27:07 +02:00
Tim-Philipp Müller
8f16b1504e docs: fix typo in API docs 2009-04-01 00:45:17 +01:00
Wim Taymans
ebc28a47da Add TCP transports
Use appsrc and appsink to send and receive RTP/RTCP packets in the TCP
connection.
2009-03-11 16:45:12 +01:00
Wim Taymans
bc785b0a47 Add better support for session timeouts
Add a method to request the number of milliseconds when a session will timeout.
2009-02-13 19:56:01 +01:00
Wim Taymans
e1154c92d6 Some more session timeout handling
Move the session header setting code to a central place so that we always add
the timeout parameter too.

Handle timeouts by running the session cleanup code.

Stop media before cleaning up.
2009-02-13 12:57:45 +01:00
Wim Taymans
ae9da4c5b0 Add more timeout stuff
Add method to check if a session is expired.
Add method to perform cleanup on a session pool.
2009-02-04 20:10:39 +01:00
Wim Taymans
aedd4652f3 Add beginnings of session timeouts and limits
Add the timeout value to the Session header for unusual timeout values.

Allow us to configure a limit to the amount of active sessions in a pool. Set a
limit on the amount of retry we do after a sessionid collision.

Add properties to the sessionid and the timeout of a session. Keep track of
creation time and last access time for sessions.
2009-02-04 19:52:50 +01:00
Wim Taymans
e789a8fdf3 Cleanup of sessions and more
Fix the refcounting of media and sessions in the client. Properly clean up the
session data when the client performs a teardown.

Add Server header to responses.

Allow for multiple uri setups in one session.

Add Range header to the PLAY response and add the range attribute to the SDP
message.

Fix the session pool remove method, it used the wrong key in the hashtable. Also
give the ownership of the sessionid to the session object.
2009-02-04 17:00:42 +01:00