Commit graph

36 commits

Author SHA1 Message Date
Thibault Saunier
5b039416db docs: Port to hotdoc 2019-05-13 11:38:39 -04:00
Sebastian Dröge
640c5bba41 rtspclientsink: Set async-handling=false for the internal bins
Without this we can easily run into a race condition with async state changes:
- the pipeline is doing an async state change
- we set the internal bins to PLAYING but that's ignored because an
  async state change is currently pending
- the async state change finishes but does not change the state of the
  internal bins because of locked_state==TRUE
- the internal bins stay in PAUSED forever
2019-04-22 10:38:08 +00:00
Sebastian Dröge
c4653ef38b rtspclientsink: Use write_messages() API to send buffer lists in one go
And to write messages with multiple memories also via writev().
2019-04-22 10:38:08 +00:00
Sebastian Dröge
0f0a10525a rtspclientsink: Notify the stream transport about each written message
Otherwise it will never try to send us the next one: it tries to keep
exactly one message in-flight all the time.

In gst-rtsp-server this is done asynchronously via the GstRTSPWatch but
in the client sink we always write data out synchronously.
2019-04-15 17:34:56 +00:00
Sebastian Dröge
d708f9736b rtsp-server: Add support for buffer lists
This adds new functions for passing buffer lists through the different
layers without breaking API/ABI, and enables the appsink to actually
provide buffer lists.

This should already reduce CPU usage and potentially context switches a
bit by passing a whole buffer list from the appsink instead of
individual buffers. As a next step it would be necessary to
  a) Add support for a vector of data for the GstRTSPMessage body
  b) Add support for sending multiple messages at once to the
    GstRTSPWatch and let it be handled internally
  c) Adding API to GOutputStream that works like writev()

Fixes https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/issues/29
2019-01-30 14:39:50 +02:00
Matthew Waters
5bd835a196 meson: add pkg-config file for the rtspclientsink plugin 2018-08-31 18:11:04 +10:00
Matthew Waters
b5a61f488d rtspclientsink: fix waiting for multiple streams
We were previously only ever waiting for a single stream to notify it's
blocked status through GstRTSPStreamBlocking.  Actually count streams to
wait for.

Fixes rtspclientsink sending SDP's without out some of the input
streams.

https://bugzilla.gnome.org/show_bug.cgi?id=796624
2018-06-21 20:56:46 +10:00
Jan Schmidt
b3a4df7ab8 rtspclientsink: Don't deadlock in preroll on early close
If the connection is closed very early, the flushing
marker might not get set and rtspclientsink can get
deadlocked waiting for preroll forever.

https://bugzilla.gnome.org/show_bug.cgi?id=786961
2018-05-09 04:09:02 +10:00
Mathieu Duponchelle
bfc35ae1ae Implement support for ULP Forward Error Correction
In this initial commit, interface is only exposed for RECORD,
further work will be needed in rtspsrc to support this for
PLAY.

https://bugzilla.gnome.org/show_bug.cgi?id=794911
2018-04-19 18:25:31 +02:00
Tim-Philipp Müller
e3bbd40f0e rtspclientsink: make sure not to use freed string
Set transport string to NULL after freeing it, so that
at worst we get a NULL pointer if constructing a new
transport string fails (which shouldn't really fail here).
Also check return value of that, just in case.

CID 1433768.
2018-04-02 12:35:04 +01:00
Mathieu Duponchelle
7894328029 rtspclientsink: add rtx ssrc to mikey's crypto sessions
https://bugzilla.gnome.org/show_bug.cgi?id=794813
2018-03-30 17:55:32 +02:00
Mathieu Duponchelle
c683cadcdf rtspclientsink: Handle the KeyMgmt header in ANNOUNCE response
This in order to be able to decrypt the RTCP backchannel

https://bugzilla.gnome.org/show_bug.cgi?id=794813
2018-03-30 17:55:32 +02:00
Mathieu Duponchelle
7f9b8c2107 rtspclientsink: Fix client ports for the RTCP backchannel
This was broken since the work for delayed transport creation
was merged: the creation of the transports string depends on
calling stream_get_server_port, which only starts returning
something meaningful after a call to stream_allocate_udp_sockets
has been made, this function expects a transport that we parse
from the transport string ...

Significant refactoring is in order, but does not look entirely
trivial, for now we put a band aid on and create a second transport
string after the stream has been completed, to pass it in
the request headers instead of the previous, incomplete one.

https://bugzilla.gnome.org/show_bug.cgi?id=794789
2018-03-30 17:55:32 +02:00
Mathieu Duponchelle
6f308daa5f rtspclientsink: if OPEN failed, unqueue next command
As READY_TO_PAUSED can no longer return async, the RECORD
command will be queued before the OPEN command fails
(for example in case the server could not be connected),
and record then waits for ever.

https://bugzilla.gnome.org/show_bug.cgi?id=793896
2018-02-27 20:37:14 +01:00
Mathieu Duponchelle
ba9395c158 rtspclientsink: fix retrieval of custom payloader caps
If a bin is passed as the custom payloader, the caps of
its factory will be empty, the correct way to obtain the caps
is to query its sinkpad.
2018-02-26 22:59:17 +01:00
Mathieu Duponchelle
7f6367cc63 rtspclientsink: fix extra unref of custom payloader 2018-02-26 22:59:00 +01:00
Mathieu Duponchelle
fcf71d8efb rspclientsink: fix recent code indentation 2018-02-26 22:57:39 +01:00
Mathieu Duponchelle
a41d0fb5c2 rtspclientsink: add missing get_type prototype 2018-02-26 20:27:57 +01:00
Mathieu Duponchelle
731c464007 rtspclientsink: allow setting payloader as pad property
This was a FIXME  item, and can be quite useful, also
allowing to specify payloader properties from the command
line, which is always nice.

https://bugzilla.gnome.org/show_bug.cgi?id=793776
2018-02-26 19:33:01 +01:00
Edward Hervey
587c1c4707 rtpsclientsink: Initialize and clear newly added mutex and cond
While it *did* work, glib would automatically create new mutex and cond
... which never got freed
2017-12-20 14:17:02 +01:00
Patricia Muscalu
64f1a3ab85 rtspclientsink: Use the new rtsp-stream API
https://bugzilla.gnome.org/show_bug.cgi?id=790412
2017-12-18 11:34:48 +01:00
Patricia Muscalu
96cfed48bf rtspclientsink: Wait until OPEN has been scheduled
Make sure that the sink thread has started opening connection
to the server before continuing.

https://bugzilla.gnome.org/show_bug.cgi?id=790412
2017-12-18 11:34:48 +01:00
Sebastian Dröge
c3e53322d9 rtspclientsink: Add "accept-certificate" signal for manually checking a TLS certificate for validity
https://bugzilla.gnome.org/show_bug.cgi?id=785024
2017-11-01 13:43:33 +02:00
Mathieu Duponchelle
f1088f368f rtspclientsink: Use a mutex for protecting against concurrent send/receives
This is a simple port of:

* a722f6e832
* c438545dc9
* cd17c71dce

in gst-plugins-good.
2017-09-18 19:43:17 +02:00
Nicolas Dufresne
e1d43cab65 Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 14:44:43 -04:00
Jan Schmidt
cc59abc824 rtspclientsink: Don't leave stale pointer after unref
Fix a warning on shutdown - don't keep a pointer to an
alread-unreffed object.
2016-11-30 21:15:12 +11:00
Sebastian Dröge
6622b5be14 rtspclientsink: Move to new helper function to parse authentication responses
https://bugzilla.gnome.org/show_bug.cgi?id=774416
2016-11-19 11:59:34 +02:00
Tim-Philipp Müller
a353e50747 Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson
2016-08-31 00:04:43 +01:00
Edward Hervey
2639fbdb7f rtspclientsink: Check return value of sscanf
And just make sure we always have 0/0 if we have an error

CID #1352031
2016-04-29 11:45:19 +02:00
Sebastian Dröge
b63a6f029f rtspclientsink: Add support for setting the multicast interface
https://bugzilla.gnome.org/show_bug.cgi?id=763000
2016-03-25 12:52:12 +02:00
Vineeth TM
1796ce2f03 rtspclientsink: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763196
2016-03-24 14:38:56 +02:00
Jan Schmidt
b96e4e16a7 rtspsink: Fix some leaks in rtspclientsink and the unit test.
https://bugzilla.gnome.org/show_bug.cgi?id=762525
2016-02-24 02:12:08 +11:00
Luis de Bethencourt
fb9e957cc2 rtspclientsink: remove check for impossible condition
Goto error label checks stream to see if it needs to be unreferenced before
returning, but this goto jumps happens before the stream is ever set, so it
will always be NULL in this error label.

CID #1352034
2016-02-09 10:36:56 +00:00
Luis de Bethencourt
4922b7f6b2 rtspclientsink: clean switch statements
Coverity demands for fallthrough statements to be clearly commented,
to distinguish from accidental fall throughs. And it also needs all
cases to finish with a break, even if the break is never going to be
executed like in the case of a continue jump.

CID #1352039
CID #1352040
2016-02-08 23:33:22 +00:00
Jan Schmidt
b55fafdfbf rtspclientsink: Simplify slightly using new -base API
Use the new Mikey and SDP API in the base plugins libs
to simplify some code.

https://bugzilla.gnome.org/show_bug.cgi?id=758180
2016-01-29 01:44:26 +11:00
Jan Schmidt
f54dd50203 rtspsink: Add rtspclientsink element
Add an rtspclientsink element that accepts streams for which
there is a registered payloader and sends them to
an RTSP server using RECORD.

Sending is synchronised to the pipeline clock. Payload-types
are automatically selected. The 'new-payloader' signal is fired
for custom configuration of payloaders when they are created.

Can now stream a movie like this:

receiver:
  ./test-record "( decodebin name=depay0 ! videoconvert ! autovideosink \
       decodebin name=depay1 ! audioconvert ! autoaudiosink )"
sender:
  gst-launch-1.0 filesrc location=file-with-aac-and-h264.mp4 ! qtdemux name=d ! \
       queue ! aacparse ! rtspclientsink location=rtsp://127.0.0.1:8554/test name=s \

https://bugzilla.gnome.org/show_bug.cgi?id=758180
2016-01-29 01:44:26 +11:00