Commit graph

1514 commits

Author SHA1 Message Date
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
Nirbheek Chauhan
208258472c meson: Update option names to omit disable_ and with- prefixes
Also yield common options to the outer project (gst-build in our case)
so that they don't have to be set manually.
2018-05-05 20:31:43 +05:30
Tim-Philipp Müller
858a9d2054 meson: use -Wl,-Bsymbolic-functions where supported
Just like the autotools build.
2018-04-25 11:00:32 +01:00
Tim-Philipp Müller
90d006141a configure: check for -good and -bad plugins only in uninstalled setup
Avoids confusing configure messages looking or a -good .pc file
that doesn't exist.

Also use plugindir variables that common macros set while at it.

https://bugzilla.gnome.org/show_bug.cgi?id=795466
2018-04-22 20:10:15 +01:00
Joakim Johansson
808b49cbfc rtsp-client: Fix session timeout
When streaming data over TCP then is not the keep-alive
functionality working.

The reason is that the function do_send_data have changed
to boolean but the code is still checking the received result
from send_func with GST_RTSP_OK.

The result is that a successful send_func will always lead to
that do_send_data is returning false and the keep-alive will
not be updated.

https://bugzilla.gnome.org/show_bug.cgi?id=795321
2018-04-20 10:13:53 +03: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
Sebastian Dröge
9f5d3ee7a8 Revert "rtsp-server: Switch around sendonly/recvonly attributes"
This reverts commit 3d275b1345.

While RFC 3264 (SDP) says that sendonly/recvonly are from the point of view of
the requester, the actual RTSP RFCs (RFC 2326 / 7826) disagree and say
the opposite, just like the ONVIF standard.

Let's follow those RFCs as we're doing RTSP here, and add a property at
a later time if needed to switch to the SDP RFC behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=793964
2018-04-17 17:50:05 +03:00
Tim-Philipp Müller
d49edc5582 Automatic update of common submodule
From 3fa2c9e to ed78bee
2018-04-16 10:53:52 +01:00
Sebastian Dröge
ef878da703 gst: Run everything through gst-indent again 2018-04-04 10:06:06 +03:00
Branko Subasic
48ad01beba rtsp-media: query the position on active streams if media is complete
If the media is complete, i.e. one or more streams have been configured
with sinks, then we want to query the position on those streams only.
A query on an incomplete stream may return a position that originates from
an earlier preroll.

https://bugzilla.gnome.org/show_bug.cgi?id=794964
2018-04-04 10:05:38 +03: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
c36d6b477c rtsp-client: do not free string passed to take_header 2018-03-30 23:34:01 +02:00
Mathieu Duponchelle
8bf341ad02 rtsp-stream: do not take lock in request_aux_receiver
Added it right before pushing the previous commit, it is
incorrect and deadlocks because this function gets called
from the join_bin thread, which already holds the lock,
that's the reason why request_aux_sender didn't take the
lock either.
2018-03-30 23:10:10 +02:00
Mathieu Duponchelle
988db52016 rtsp-server: add API to enable retransmission requests
"do-retransmission" was previously set when rtx-time != 0,
which made no sense as do-retransmission is used to enable
the sending of retransmission requests, where as rtx-time
is used by the peer to enable storing of buffers in order
to respond to retransmission requests.

rtsp-media now also provides a callback for the
request-aux-receiver signal.

https://bugzilla.gnome.org/show_bug.cgi?id=794822
2018-03-30 17:55:32 +02: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
ae0e08dac2 rtsp-client: Send KeyMgmt header in ANNOUNCE response
When sending back an encrypted RTCP back channel, it is useful
for the client to know the encryption key.

https://bugzilla.gnome.org/show_bug.cgi?id=794813
2018-03-30 17:55:32 +02:00
Mathieu Duponchelle
a093f4442b rtsp-stream: extract handle_keymgmt from rtsp-client
rtspclientsink will also need to parse KeyMgmt headers
sent by the server to decrypt the RTCP backchannel stream

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
Göran Jönsson
3a129300f0 rtsp-client:Error handling when equal http session cookie
There are some clients that are sending same session cookie on random
basis.

https://bugzilla.gnome.org/show_bug.cgi?id=753616
2018-03-21 17:39:02 -04:00
Sebastian Dröge
3d21e8d4c8 rtsp-media-factory-uri: Fix compilation with latest GLib
rtsp-media-factory-uri.c: In function ‘rtsp_media_factory_uri_create_element’:
rtsp-media-factory-uri.c:621:17: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
   data->factory = g_object_ref (factory);
                 ^
2018-03-20 16:21:37 +02:00
Tim-Philipp Müller
034d818ec5 Back to development 2018-03-20 10:21:36 +00:00
Tim-Philipp Müller
2fdb040b26 Release 1.14.0 2018-03-19 20:27:06 +00:00
Tim-Philipp Müller
dc4a6d07ad Release 1.13.91 2018-03-13 19:28:36 +00:00
Tim-Philipp Müller
2df75442d0 rtsp-server: GST_EXPORT -> GST_RTSP_SERVER_API
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.
2018-03-13 13:37:13 +00:00
Sebastian Dröge
e5527e4403 rtsp-onvif-media-factory: Document that backchannel pipelines must end with async=false sinks
https://bugzilla.gnome.org/show_bug.cgi?id=794143
2018-03-07 12:20:05 +02:00
Tim-Philipp Müller
e6e64c95c6 Release 1.13.90 2018-03-03 22:49:36 +00:00
Mathieu Duponchelle
1288faeae7 permissions: add Since tags and example for new API 2018-03-02 16:24:23 +01:00
Mathieu Duponchelle
e356cf33f2 permissions: more bindings-friendly API
https://bugzilla.gnome.org/show_bug.cgi?id=793975
2018-03-02 16:21:37 +01:00
Mathieu Duponchelle
030992d03a meson: enable more warnings 2018-03-01 19:28:16 +01:00
Sebastian Dröge
0dc6170582 rtsp-client: Place netaddress meta on packets received via TCP
This allows us to later map signals from rtpbin/rtpsource back to the
corresponding stream transport, and allows to do keep-alive based on
RTCP packets in case of TCP media transport.

https://bugzilla.gnome.org/show_bug.cgi?id=789646
2018-02-28 21:12:43 +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
Carlos Rafael Giani
5f29712243 rtsp-media: Replace g_print() log line
https://bugzilla.gnome.org/show_bug.cgi?id=793838
2018-02-26 15:26:29 +02:00
Mathieu Duponchelle
ddb0d83844 rtsp-media: fix RECORD getting stuck
The test_record case was working because async=false had
been added in https://bugzilla.gnome.org/show_bug.cgi?id=757488
but that was incorrect, as it should not be needed.

Removing async=false made the test fail as expected, this is
fixed by not trying to preroll when preparing the media for
RECORD, as start_prepare is called upon receiving ANNOUNCE,
and our peer will not start sending media until it has received
a response to that request, and sent and received a response
to RECORD as well, thus obviously preventing preroll.

https://bugzilla.gnome.org/show_bug.cgi?id=793738
2018-02-23 16:13:56 +01:00
Mathieu Duponchelle
99edc9445a rtsp-auth: fix set_tls_authentication_mode annotation 2018-02-23 03:26:21 +01:00
Víctor Manuel Jáquez Leal
b7e8198211 rtp-server: remove redefined variable
res is a boolean variable which is defined in the function scope and
redefined, with no reason, in the loop scope. This patch removes the
redefinition.

https://bugzilla.gnome.org/show_bug.cgi?id=793592
2018-02-19 12:00:58 +01:00
Ognyan Tonchev
14c511ae62 stream: Add functions for checking if stream is receiver or sender
...and replace all checks for RECORD in GstRTSPMedia which are really
for "sender-only". This way the code becomes more generic and introducing
support for onvif-backchannel later on will require no changes in
GstRTSPMedia.
2018-02-16 11:04:53 +02:00
Ognyan Tonchev
62aae8c7dc onvif: Make requires_backchannel() public
...in order to let subclasses building the onvif part of the pipeline
check whether backchannel shall be included or not.
2018-02-16 11:04:53 +02:00
Sebastian Dröge
3d275b1345 rtsp-server: Switch around sendonly/recvonly attributes
They are wrong in the ONVIF streaming spec. The backchannel should be
recvonly and the normal media should be sendonly: direction is always
from the point of view of the SDP offerer (the server) according to
RFC 3264.
2018-02-16 11:04:53 +02:00
Sebastian Dröge
72dc8acd86 rtsp: Add support for ONVIF backchannel
This adds a new RTSP server, client, media-factory and media subclass
for handling the specifics of the backchannel. Ideally this later can be
extended with other ONVIF specific features.
2018-02-16 11:04:53 +02:00
Sebastian Dröge
231700b2bb rtsp-media: Add support for sending+receiving medias
We need to add an appsrc/appsink in that case because otherwise the
media bin will be a sink and a source for rtpbin, causing a pipeline
loop.

https://bugzilla.gnome.org/show_bug.cgi?id=788950
2018-02-16 11:04:53 +02:00
Tim-Philipp Müller
94e70b77aa Back to development 2018-02-15 19:44:28 +00:00
Tim-Philipp Müller
f862676ec7 Release 1.13.1 2018-02-15 17:15:40 +00:00
Mathieu Duponchelle
9046b5d083 session-pool: remove nullable return annotation
create_watch can only return NULL from the API guards, no
need for nullable.
2018-02-14 17:11:19 +01:00
Mathieu Duponchelle
ee44f38051 set_clock functions: Add nullable annotations 2018-02-13 18:59:49 +01:00