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.
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
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.
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
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.
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.
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.
Make the media accept an array of transports for the streams that we have
configured for the play/pause requests.
Implement server states for a client and its media.
Require 0.10.22.1 (git HEAD) of gstreamer.
Remove some unneeded variables in the session state of a stream such as the
owner media and the server transport.
Get the configuration of a media stream in a session based on the media_stream
in the original object instead of our cached index.
Free more data in the finalize method.
Added various other test server examples
Move the SDP message generation to a separate helper.
Refactor common code for finding the session.
Add content-base for realplayer compatibility
Clean up request uris before processing for better vlc compatibility.
Move prerolling and pipeline construction to the RTSPMedia object.
Use multiudpsink for future pipeline reuse.
Rename GstRTSPMediaBin to GstRTSPMedia
Parse the request url into a GstRTSPUri object and pass this object to the
various handlers and methods that require the uri.
Make GstMediaFactory an object that can instantiate GstMediaBin objects.
The GstMediaBin object has a handle to a bin with elements and to a list of
GstMediaStream objects that this bin produces.
Add GstMediaMapper that can map url mountpoints to GstMediaFactory objects along
with methods to register and remove those mappings.
Add methods and a property to GstRTSPServer to manage the GstMediaMapper object
used by the server instance.
Modify the example application so that it shows how to create custom pipelines
attached to a specific mount point.
Various misc cleanps.