Commit graph

1097 commits

Author SHA1 Message Date
Sebastian Dröge 961de06be2 Add ONVIF subclass headers to the installed headers in meson.build too 2018-11-01 12:49:51 +02:00
Sebastian Dröge 5392cbba8a rtsp-server: Declare GstRTSPServer struct before anything else
It's needed by all kinds of other headers, including the ones that are
required for defining the GstRTSPServer struct itself and its API.
2018-11-01 11:29:01 +02:00
Sebastian Dröge d525000f6a Mark all ONVIF-specific subclasses as Since 1.14 2018-11-01 10:23:02 +02:00
Sebastian Dröge 84a7f459a1 Include ONVIF types from single-include rtsp-server.h
... by actually making it a single-include header and moving everything
related to the GstRTSPServer type to rtsp-server-object.h instead.
Otherwise there are too many circular includes.

https://bugzilla.gnome.org/show_bug.cgi?id=797361
2018-11-01 10:18:22 +02:00
Göran Jönsson 7cfd59820a rtsp-stream: use idle source in on_message_sent
When the underlying layers are running on_message_sent, this sometimes
causes the underlying layer to send more data, which will cause the
underlying layer to run callback on_message_sent again. This can go on
and on.

To break this chain, we introduce an idle source that takes care of
sending data if there are more to send when running callback

https://bugzilla.gnome.org/show_bug.cgi?id=797289
2018-10-23 08:18:52 +01:00
Edward Hervey ebafccb65a rtsp-client: Remove timeout GSource on cleanup
Avoids ending up with races where a timeout would still be around
*after* a client was gone. This could happen rather easily in
RTSP-over-HTTP mode on a local connection, where each RTSP message
would be sent as a different HTTP connection with the same tunnelid.

If not properly removed, that timeout would then try to free again
a client (and its contents).
2018-10-22 09:35:54 +02:00
Tim-Philipp Müller 22ced50da5 autotools: fix distcheck 2018-10-04 14:31:59 +01:00
Ognyan Tonchev 7b5e232a9e onvif: encapsulate onvif part into a bin
...and thus do not let onvif affect pipelines latency

https://bugzilla.gnome.org/show_bug.cgi?id=797174
2018-10-03 13:26:36 +03:00
Patricia Muscalu c394de2348 New property for socket binding to mcast addresses
By default the multicast sockets are bound to INADDR_ANY,
as it's not allowed to bind sockets to multicast addresses
in Windows. This default behaviour can be changed by setting
bind-mcast-address property on the media-factory object.

https://bugzilla.gnome.org/show_bug.cgi?id=797059
2018-09-28 13:27:48 +03:00
Tim-Philipp Müller 62d4c0b179 libs: fix API export/import and 'inconsistent linkage' on MSVC
Export rtsp-server library API in headers when we're building the
library itself, otherwise import the API from the headers.

This fixes linker warnings on Windows when building with MSVC.

Fix up some missing config.h includes when building the lib which
is needed to get the export api define from config.h

https://bugzilla.gnome.org/show_bug.cgi?id=797185
2018-09-24 09:36:21 +01:00
Edward Hervey ff51e9a68d rtsp-media-factory: Add missing break statements
This resulted in warnings/assertions whenever one accessed the
max-mcast-ttl property.

CID #1439515
CID #1439523
2018-09-19 14:31:56 +02:00
Nirbheek Chauhan 8a7f5cfe5f meson: Maintain macOS ABI through dylib versioning
Requires Meson 0.48, but the feature will be ignored on older versions
so it's safe to add it without bumping the requirement.

Documentation:
https://github.com/mesonbuild/meson/blob/master/docs/markdown/Reference-manual.md#shared_library
2018-08-31 14:42:48 +05:30
David Svensson Fors a2e182c3b4 rtsp-client: Avoid reuse of channel numbers for interleaved
If a (strange) client would reuse interleaved channel numbers in
multiple SETUP requests, we should not accept them. The channel
numbers are used for looking up stream transports in the
priv->transports hash table, and transports disappear from the table
if channel numbers are reused.

RFC 7826 (RTSP 2.0), Section 18.54, clarifies that it is OK for the
server to change the channel numbers suggested by the client.

https://bugzilla.gnome.org/show_bug.cgi?id=796988
2018-08-29 14:46:01 +03:00
Sebastian Dröge bd76c2f9c5 Fix indentation again 2018-08-14 14:31:55 +03:00
Patricia Muscalu cbe6ae3c48 stream: Added a list of multicast client addresses
When media is shared, the same media stream can be sent
to multiple multicast groups. Currently, there is no API
to retrieve multicast addresses from the stream.
When calling gst_rtsp_stream_get_multicast_address() function,
only the first multicast address is returned.
With this patch, each multicast destination requested in SETUP
will be stored in an internal list (call to
gst_rtsp_stream_add_multicast_client_address()).
The list of multicast groups requested by the clients can be
retrieved by calling gst_rtsp_stream_get_multicast_client_addresses().
There still exist some problems with the current implementation
in the multicast case:
1) The receiving part is currently only configured with
regard to the first multicast client (see
https://bugzilla.gnome.org/show_bug.cgi?id=796917).
2) Secondly, of security reasons, some constraints should be
put on the requested multicast destinations (see
https://bugzilla.gnome.org/show_bug.cgi?id=796916).

Change-Id: I6b060746e472a0734cc2fd828ffe4ea2956733ea

https://bugzilla.gnome.org/show_bug.cgi?id=793441
2018-08-14 14:31:42 +03:00
Patricia Muscalu 4c6cecf5d6 stream: Choose the maximum ttl value provided by multicast clients
The maximum ttl value provided so far by the multicast clients
will be chosen and reported in the response to the current
client request.

Change-Id: I5408646e3b5a0a224d907ae215bdea60c4f1905f

https://bugzilla.gnome.org/show_bug.cgi?id=793441
2018-08-14 14:31:42 +03:00
Patricia Muscalu 048e24a7c6 rtsp-stream: Don't require address pool in the transport specific case
If "transport.client-settings" parameter is set to true, the client is
allowed to specify destination, ports and ttl.
There is no need for pre-configured address pool.

Change-Id: I6ae578fb5164d78e8ec1e2ee82dc4eaacd0912d1

https://bugzilla.gnome.org/show_bug.cgi?id=793441
2018-08-14 14:31:42 +03:00
Patricia Muscalu 308480e762 client: Don't reserve multicast address in the client setting case
When two multicast clients request specific transport
configurations, and "transport.client-settings" parameter is
set to true, it's wrong to actually require that these two
clients request the same multicast group.
Removed test_client_multicast_invalid_transport_specific test
cases as they wrongly require that the requested destination
address is supposed to be present in the address pool, also in
the case when "transport.client-settings" parameter is set to true.

Change-Id: I4580182ef35996caf644686d6139f72ec599c9fa

https://bugzilla.gnome.org/show_bug.cgi?id=793441
2018-08-14 14:31:41 +03:00
Patricia Muscalu a7bb684e9b Add new API for setting/getting maximum multicast ttl value
Change-Id: I5ef4758188c14785e17fb8fbf42a3dc0cb054233

https://bugzilla.gnome.org/show_bug.cgi?id=793441
2018-08-14 14:31:41 +03:00
Mathieu Duponchelle c414158022 rtsp-stream: avoid duplicating the first multicast client
In dcb4533fed , we made it so
clients were dynamically added and removed to the multicast
udp sinks, as such we should no longer add a first client in
set_multicast_socket_for_udpsink

https://bugzilla.gnome.org/show_bug.cgi?id=793441
2018-08-14 14:31:41 +03:00
Sebastian Dröge d06f3af0be Revert "rtsp-stream: avoid duplicating the first multicast client"
This reverts commit 3357094440.

Commits where accidentially squashed together
2018-08-14 14:25:53 +03:00
Sebastian Dröge 443c2b73e5 Revert "Add new API for setting/getting maximum multicast ttl value"
This reverts commit 7f0ae77e40.

Commits where accidentially squashed together
2018-08-14 14:25:42 +03:00
Sebastian Dröge 17335e9906 Revert "rtsp-stream: Don't require address pool in the transport specific case"
This reverts commit a9db3e7f09.

Commits where accidentially squashed together
2018-08-14 14:25:37 +03:00
Sebastian Dröge 29ae15f6f1 Revert "stream: Choose the maximum ttl value provided by multicast clients"
This reverts commit 499e437e50.

Commits where accidentially squashed together
2018-08-14 14:25:14 +03:00
Patricia Muscalu 499e437e50 stream: Choose the maximum ttl value provided by multicast clients
The maximum ttl value provided so far by the multicast clients
will be chosen and reported in the response to the current
client request.

https://bugzilla.gnome.org/show_bug.cgi?id=793441
2018-08-14 14:10:41 +03:00
Patricia Muscalu a9db3e7f09 rtsp-stream: Don't require address pool in the transport specific case
If "transport.client-settings" parameter is set to true, the client is
allowed to specify destination, ports and ttl.
There is no need for pre-configured address pool.

https://bugzilla.gnome.org/show_bug.cgi?id=793441
2018-08-14 14:10:23 +03:00
Patricia Muscalu 7f0ae77e40 Add new API for setting/getting maximum multicast ttl value
https://bugzilla.gnome.org/show_bug.cgi?id=793441
2018-08-14 14:10:20 +03:00
Mathieu Duponchelle 3357094440 rtsp-stream: avoid duplicating the first multicast client
In dcb4533fed , we made it so
clients were dynamically added and removed to the multicast
udp sinks, as such we should no longer add a first client in
set_multicast_socket_for_udpsink

https://bugzilla.gnome.org/show_bug.cgi?id=793441
2018-08-14 14:10:02 +03:00
Thibault Saunier 20dc49749c rtsp-server: Add gstreamer-base gir dir in autotools 2018-08-06 15:33:04 -04:00
Mathieu Duponchelle 12f8abb549 rtsp-client: always allocate both IPV4 and IPV6 sockets
multiudpsink does not support setting the socket* properties
after it has started, which meant that rtsp-server could no
longer serve on both IPV4 and IPV6 sockets since the patches
from https://bugzilla.gnome.org/show_bug.cgi?id=757488 were
merged.

When first connecting an IPV6 client then an IPV4 client,
multiudpsink fell back to using the IPV6 socket.

When first connecting an IPV4 client, then an IPV6 client,
multiudpsink errored out, released the IPV4 socket, then
crashed when trying to send a message on NULL nevertheless,
that is however a separate issue.

This could probably be fixed by handling the setting of
sockets in multiudpsink after it has started, that will
however be a much more significant effort.

For now, this commit simply partially reverts the behaviour
of rtsp-stream: it will continue to only create the udpsinks
when needed, as was the case since the patches were merged,
it will however when creating them, always allocate both
sockets and set them on the sink before it starts, as was
the case prior to the patches.

Transport configuration will only error out if the allocation
of UDP sockets fails for the actual client's family, this
also downgrades the GST_ERRORs in alloc_ports_one_family
to GST_WARNINGs, as failing to allocate is no longer
necessarily fatal.

https://bugzilla.gnome.org/show_bug.cgi?id=796875
2018-08-01 20:42:34 +02:00
Sebastian Dröge 37e75cb8ea rtsp-stream: Slightly simplify locking 2018-07-23 18:03:51 +03:00
David Svensson Fors 12169f1e84 Limit queued TCP data messages to one per stream
Before, the watch backlog size in GstRTSPClient was changed
dynamically between unlimited and a fixed size, trying to avoid both
unlimited memory usage and deadlocks while waiting for place in the
queue. (Some of the deadlocks were described in a long comment in
handle_request().)

In the previous commit, we changed to a fixed backlog size of 100.
This is possible, because we now handle RTP/RTCP data messages differently
from RTSP request/response messages.

The data messages are messages tunneled over TCP. We allow at most one
queued data message per stream in GstRTSPClient at a time, and
successfully sent data messages are acked by sending a "message-sent"
callback from the GstStreamTransport. Until that ack comes, the
GstRTSPStream does not call pull_sample() on its appsink, and
therefore the streaming thread in the pipeline will not be blocked
inside GstRTSPClient, waiting for a place in the queue.

pull_sample() is called when we have both an ack and a "new-sample"
signal from the appsink. Then, we know there is a buffer to write.

RTSP request/response messages are not acked in the same way as data
messages. The rest of the 100 places in the queue are used for
them. If the queue becomes full of request/response messages, we
return an error and close the connection to the client.

Change-Id: I275310bc90a219ceb2473c098261acc78be84c97
2018-07-23 17:45:00 +03:00
David Svensson Fors 287345f6ac rtsp-client: Use fixed backlog size
Change to using a fixed backlog size WATCH_BACKLOG_SIZE.

Preparation for the next commit, which changes to a different way of
avoiding both deadlocks and unlimited memory usage with the watch
backlog.
2018-07-23 17:44:15 +03:00
Carlos Rafael Giani 12c2dd6e1c rtsp-media: unref clock (if set) when finalizing
https://bugzilla.gnome.org/show_bug.cgi?id=796814
2018-07-16 23:56:09 +01:00
Tim-Philipp Müller 7f7a210b84 media-factory: unref old clock when setting new clock
https://bugzilla.gnome.org/show_bug.cgi?id=796724
2018-07-12 19:02:40 +01:00
Brendan Shanks f304096994 media-factory: unref clock in finalize
https://bugzilla.gnome.org/show_bug.cgi?id=796724
2018-07-12 19:02:40 +01:00
Tim-Philipp Müller 1cd6c0340e rtsp-onvif-media: fix g-ir-scanner warnings 2018-07-12 19:02:40 +01:00
Louis-Francis Ratté-Boulianne 604240f7eb client: Strip transport parts as whitespaces could be around commas
https://bugzilla.gnome.org/show_bug.cgi?id=758428
2018-07-06 16:13:33 -04:00
Göran Jönsson c1fab570d8 rtsp-stream: avoid pushing data on unlinked udpsrc pad during setup
Fix race when setting up source elements.

Since we set the source element(s) to PLAYING state before hooking
them up to the downstream funnel, it's possible for the source element
to receive packets before we actually get to linking it to the funnel,
in which case buffers would be pushed out on an unlinked pad, causing
it to error out and stop receiving more data.

We fix this by blocking the source's srcpad until we have linked it.

https://bugzilla.gnome.org/show_bug.cgi?id=796160
2018-06-27 12:25:45 +02:00
Ognyan Tonchev f110016ac6 rtsp-stream: Fix mismatch between allowed and configured protocols
https://bugzilla.gnome.org/show_bug.cgi?id=796679
2018-06-26 15:41:07 +02:00
Ulf Olsson 4d25e04bd7 rtsp-stream: Emit a signal when the SRTP decoder is created
https://bugzilla.gnome.org/show_bug.cgi?id=778080
2018-06-26 15:38:33 +02:00
Patricia Muscalu 4007050335 rtsp-stream: Don't require presence of sinks in _get_*_socket()
Transport specific sink elements are added to the pipeline
in PLAY request and sockets are already created in SETUP so
it's actually wrong to require the presence of sinks in
_get_*_socket() functions.

https://bugzilla.gnome.org/show_bug.cgi?id=793441
2018-06-26 14:01:02 +02:00
Patricia Muscalu dcb4533fed rtsp-stream: Update transport for multicast clients as well
If a multicast client requests different transport settings
than the existing one make sure that this new transport
configuruation is propagated to the multicast udp sink.

https://bugzilla.gnome.org/show_bug.cgi?id=793441
2018-06-26 11:08:45 +02:00
Patricia Muscalu 1a38de2b17 rtsp-stream: Set the multicast TTL parameter on multicast udp sinks
And not on unicast udp sinks

https://bugzilla.gnome.org/show_bug.cgi?id=793441
2018-06-26 10:59:25 +02:00
Tim-Philipp Müller 2eb4d1b810 Update for g_type_class_add_private() deprecation in recent GLib 2018-06-24 12:48:11 +02:00
Tim-Philipp Müller e82ba1e52f Fix indentation 2018-06-24 12:45:49 +02:00
Mathieu Duponchelle 5ede2a5c5c rtsp-auth: Add support for parsing .htdigest files
Passwords are usually not stored in clear text, but instead
stored already hashed in a .htdigest file.

Add support for parsing such files, add API to allow setting
a custom realm in RTSPAuth, and update the digest example.

https://bugzilla.gnome.org/show_bug.cgi?id=796637
2018-06-21 15:47:39 +02:00
Mathieu Duponchelle 3b70c68e6e rtsp-stream: only create funnel if it didn't exist already.
This precented using multiple protocols for the same stream.

https://bugzilla.gnome.org/show_bug.cgi?id=796634
2018-06-20 01:36:57 +02:00
Patricia Muscalu 768fb5695c Get payloader stats only for the sending streams
Get/set payloader properties only for streams that actually
contain a payloader element.

https://bugzilla.gnome.org/show_bug.cgi?id=796523
2018-06-13 10:13:12 +03:00
Edward Hervey 89e6ee73b1 Makefile: Don't hardcode libtool for g-i build
Similar to the other commits in core/base/bad
2018-05-18 14:54:46 +02:00
Johan Bjäreholt 913eae2e7e rtsp-onvif-media-factory: export gst_rtsp_onvif_media_factory_requires_backchannel
https://bugzilla.gnome.org/show_bug.cgi?id=796229
2018-05-18 08:57:28 +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
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
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 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
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 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
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
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
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
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
Mathieu Duponchelle c725ef01a4 All around: add annotations and API guards 2018-02-12 19:16:11 +01:00
Mathieu Duponchelle 2613748730 gst_rtsp_context_get_current: add (skip) annotation
The return value type is defined with G_DEFINE_POINTER_TYPE,
and gi emits the following warning:

Invalid non-constant return of bare structure or union; register as
boxed type or (skip)
2018-02-06 18:06:14 +01:00
Mathieu Duponchelle 03a512e4e1 rtsp-client: add type annotations
gi doesn't seem to be able to figure out the type of the
signal parameters when defined with G_DEFINE_POINTER_TYPE
2018-02-06 18:06:14 +01:00
Tim-Philipp Müller 5964247829 mount-points: bail out of loop again when matching mount points
Previous patch led to us iterating the entire sequence. Bail out
of the loop again if we have a match but are moving away from it.

https://bugzilla.gnome.org/show_bug.cgi?id=771555
2018-01-25 12:14:33 +00:00
Andrew Bott c3e58dfdbe mount-points: fix matching of paths where there's also an entry with a common prefix
e.g. with the following mount points

/raw
/raw/snapshot
/raw/video

_match() would not match /raw/video and /raw/snapshot correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=771555
2018-01-25 12:12:57 +00:00
Tim-Philipp Müller b1f515178a permissions: add some new API to make this usable from bindings
https://bugzilla.gnome.org/show_bug.cgi?id=787073
2018-01-18 23:53:20 +00:00
Tim-Philipp Müller 8708262ebe rtsp-token: annotate constructors for bindings
This maps _new_empty() to _new(), which also makes RTSPToken()
work properly now. Since this API wasn't usable from bindings
before, this should hopefully be fine.

https://bugzilla.gnome.org/show_bug.cgi?id=787073
2018-01-18 22:37:57 +00:00
Tim-Philipp Müller 54a8c6bddf rtsp-token: add some API to set fields from bindings
The existing functions are all vararg-based and as such
not usable from bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=787073
2018-01-18 22:37:57 +00:00
Sebastian Dröge 4ec17b1975 rtsp-stream: Set multicast TTL on the multicast sockets
And not if we do unicast UDP.

https://bugzilla.gnome.org/show_bug.cgi?id=791743
2017-12-19 11:34:37 +02:00
Sebastian Dröge 4d86f99449 rtsp-stream: Decide based on the sockets, not the addresses if we already allocated a socket
In the multicast case (as in test-multicast, not test-multicast2), the
address could be allocated/reserved (and thus set) already without
allocating the actual socket. We need to allocate the socket here still
instead of just claiming that it was already allocated.

See https://bugzilla.gnome.org/show_bug.cgi?id=791743#c2
2017-12-19 11:16:51 +02:00
Edward Hervey 64a46d47ba rtsp-server: Minor doc fixes
Mostly for g-i
2017-12-07 16:08:50 +01:00
Thibault Saunier 1555143299 Fix build when -Werror=deprecated-declarations is on
As gst_rtsp_session_next_timeout is deprecated.

```
../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-session.c:760:3: error: ‘gst_rtsp_session_next_timeout’ is deprecated: Use 'gst_rtsp_session_next_timeout_usec' instead [-Werror=deprecated-declarations]
   res = (gst_rtsp_session_next_timeout (session, now) == 0);
   ^~~
../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-session.c:685:1: note: declared here
 gst_rtsp_session_next_timeout (GstRTSPSession * session, GTimeVal * now)
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
2017-11-30 23:58:16 -03:00
Patricia Muscalu caa3f1caac rtsp-stream: Do not reset 'blocking' if stream is already blocked
https://bugzilla.gnome.org/show_bug.cgi?id=790674
2017-11-27 07:58:42 +01:00
Patricia Muscalu 0015791f8f rtsp-media: Fix missing lock in gst_rtsp_media_seekable()
https://bugzilla.gnome.org/show_bug.cgi?id=790674
2017-11-27 07:58:42 +01:00
Tim-Philipp Müller 3d61e20a99 rtsp: fix distcheck 2017-11-26 14:46:05 +00:00
Tim-Philipp Müller 8c1cdb7a4a win32: remove .def file with exports
They're no longer needed, symbol exporting is now explicit
via GST_EXPORT in all cases (autotools, meson, incl. MSVC).
2017-11-26 13:14:12 +00:00
Tim-Philipp Müller 58aa58f049 rtsp-server: add missing GST_EXPORT and export deprecated funcs 2017-11-26 13:03:39 +00:00
Edward Hervey 9514f2d354 rtsp-media: Enable seeking query before pipeline is complete
SDP are now provided *before* the pipeline is fully complete. In order
to know whether a media is seekable or not therefore requires asking
the invididual streams.

API: gst_rtsp_stream_seekable

https://bugzilla.gnome.org/show_bug.cgi?id=790674
2017-11-25 07:53:11 +01:00
Patricia Muscalu bb29d2e2ee rtsp-media: Fix handling in default_unsuspend()
Handle the case when streams are not blocked and media
is suspended from PAUSED.

Change-Id: I2f3d222ea7b9b20a0732ea5dc81a32d17ab75040

https://bugzilla.gnome.org/show_bug.cgi?id=790674
2017-11-24 10:52:36 +01:00
Patricia Muscalu 132e00adfd rtsp-media: Removed fakesink elements
There is not need of adding fakesink elements to the media
pipeline in the dynamic-payloader case.
The media pipeline itself is dynamically updated with
the receiver and sender parts that are based on the client
transport information known after SETUP has been received.

Change-Id: I4e88c9b500c04030669822f0d03b1842913f6cb9

https://bugzilla.gnome.org/show_bug.cgi?id=790674
2017-11-24 10:52:36 +01:00
Patricia Muscalu ac6169d50a rtsp-media: Corrected ASYNC_DONE handling
Media is complete when all the transport based parts are
added to the media pipeline. At this point ASYNC_DONE is
posted by the media pipeline and media is ready to enter
the PREPARED state.

Change-Id: I50fb8dfed88ebaf057d9a35fca2d7f0a70e9d1fa

https://bugzilla.gnome.org/show_bug.cgi?id=790674
2017-11-24 10:52:36 +01:00