Commit graph

1506 commits

Author SHA1 Message Date
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
Mathieu Duponchelle
c725ef01a4 All around: add annotations and API guards 2018-02-12 19:16:11 +01:00
Mathieu Duponchelle
2bb00ebfaa test-cleanup: bind any port
The meson test suite runs tests in parallel, trying to bind
a single port made the test fail.
2018-02-12 19:12:35 +01:00
Tim-Philipp Müller
cd96202465 meson: make version numbers ints and fix int/string comparison
WARNING: Trying to compare values of different types (str, int).
The result of this is undefined and will become a hard error
in a future Meson release.
2018-02-08 19:15:10 +00: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
22e1bc7763 autotools: use -fno-strict-aliasing where supported
https://bugzilla.gnome.org/show_bug.cgi?id=769183
2018-02-05 08:43:46 +01:00
Tim-Philipp Müller
3a8bed19da meson: use -fno-strict-aliasing where supported
https://bugzilla.gnome.org/show_bug.cgi?id=769183
2018-01-30 20:35:24 +00: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