Commit graph

1179 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
Edward Hervey
7bf8c4d218 rtsp-client: Don't leak addr
CID #1422260
2017-11-21 09:53:19 +01:00
Edward Hervey
4d98bc5e55 Run gst-indent 2017-11-21 09:53:08 +01:00
Edward Hervey
6371f2fc29 rtsp-media: Don't unblock with remaining dynamic payloaders
If we still have some dynamic paylaoders which haven't posted
no-more-pads yet, don't go to PREPARED if one of the streams
blocked.

The risk was that we would end up not exposing/using all specified
streams.

The downside is that if you have _multiple_ _live_ _dynamic_ payloaders
then it will take a bit more time to start. But only if those 3
conditions are present.

https://bugzilla.gnome.org/show_bug.cgi?id=769521
2017-11-21 07:59:15 +01:00
Edward Hervey
d1a6418fe2 rtsp-media: Fix doc 2017-11-21 07:59:15 +01:00
Edward Hervey
0dddaba9bb rtsp-media: Don't set float on a gint64 variable
Just use 0. Fixes 'undefined' behaviour from clang
2017-11-21 07:59:15 +01:00
Edward Hervey
27d256d4ca rtsp-media: Fix previous commit
We only want to count dynamic payloaders
2017-11-21 07:59:15 +01:00
Edward Hervey
2386e91c36 rtsp-media: Handle multiple dynamic elements
If we have more than one dynamic payloader in the pipeline, we need
to wait until the *last* one emits 'no-more-pads' before switching
to PREPARED.

Failure to do so would result in a race where some of the streams
wouldn't properly be prepared

https://bugzilla.gnome.org/show_bug.cgi?id=769521
2017-11-20 09:38:49 +01:00
Sebastian Dröge
d51f8abe56 rtsp-stream: Only update the RTP udpsink if it actually exists
For send-only streams it does not exist, but the RTCP udpsink might.
2017-11-15 19:56:26 +02:00
Patricia Muscalu
efdb795c86 rtsp-media: seek on media pipelines that are complete
Make sure that a seek is performed on pipelines that
contain at least one sink element.

Change-Id: Icf398e10add3191d104b1289de612412da326819

https://bugzilla.gnome.org/show_bug.cgi?id=788340
2017-11-15 19:56:26 +02:00
Patricia Muscalu
a7732a68e8 Dynamically reconfigure pipeline in PLAY based on transports
The initial pipeline does not contain specific transport
elements. The receiver and the sender parts are added
after PLAY.
If the media is shared, the streams are dynamically
reconfigured after each PLAY.

https://bugzilla.gnome.org/show_bug.cgi?id=788340
2017-11-15 19:56:15 +02:00
Patricia Muscalu
930a602e17 rtsp-stream: obtain stream position from pad
If no sinks have been added yet, obtain the current and
the stop position of the stream from the send_src pad.

Change-Id: Iacd4ab4bdc69f6b49370d06012880ce48a7d595a

https://bugzilla.gnome.org/show_bug.cgi?id=788340
2017-11-15 17:46:00 +02:00
Patricia Muscalu
5ec1b80989 rtsp-session-media: add function to get a list of transports
Change-Id: I817e10624da0f3200f24d1b232cff481099278e3

https://bugzilla.gnome.org/show_bug.cgi?id=788340
2017-11-15 17:46:00 +02:00
Patricia Muscalu
51d670f73b rtsp-stream: add functions to get rtp and rtcp multicast sockets
Change-Id: Iddfe6e0bd250cb0159096d5eba9e4202d22b56db

https://bugzilla.gnome.org/show_bug.cgi?id=788340
2017-11-15 17:46:00 +02:00
Patricia Muscalu
c9605cc5e1 stream: set async=sync=false only for RTCP appsink
Change-Id: I929a218a9adf4759f61322b6f2063aacc5595f90

https://bugzilla.gnome.org/show_bug.cgi?id=788340
2017-11-15 17:46:00 +02:00
Patricia Muscalu
b5c3ef8d53 rtsp-media: return minimum value in query position case
The minimum position should be returned as we are interested
in the whole interval.

Change-Id: I30e297fc040c995ae40c25dee8ff56321612fe2b

https://bugzilla.gnome.org/show_bug.cgi?id=788340
2017-11-15 17:46:00 +02:00
Jonathan Karlsson
0f87202a71 rtsp-session: Handle the case when timeout=0
According to the documentation, a timeout of value 0 means
that the session never timeouts. This adds handling of that.
If timeout=0 we just return with a -1 from
gst_rtsp_session_next_timeout_usec ().

https://bugzilla.gnome.org/show_bug.cgi?id=785058
2017-11-15 17:20:33 +02: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
89ccaa6932 docs: add media factory transport mode accessors
and fix the documentation for the return value of the getter
2017-10-26 14:44:55 +02:00
Branko Subasic
619ac7b710 rtsp-client: unref 'pipelined_requests' in finalize
The hash table priv->pipelined_requests is not unref:ed in the
finalize funktion. Make sure it is.

https://bugzilla.gnome.org/show_bug.cgi?id=788704
2017-10-09 20:39:14 +02:00
Thibault Saunier
8608c1cae4 rtsp-media: Initialize scalar variable
CID 1418985
2017-10-09 14:44:40 +02:00
Thibault Saunier
9706199efb Start support for RTSP 2.0
This adds basic support for new 2.0 features, though the protocol is
subposdely backward incompatible, most semantics are the sames.

This commit adds:

- features:
 * version negotiation
 * pipelined requests support
 * Media-Properties support
 * Accept-Ranges support

- APIs:
  * gst_rtsp_media_seekable

The RTSP methods that have been removed when using 2.0 now return
BAD_REQUEST.

https://bugzilla.gnome.org/show_bug.cgi?id=781446
2017-10-05 13:23:48 -03:00
Thibault Saunier
8b38aa9c46 stream: Use stream duration as stream-stop if segment was not configured with a stop
Allowing client to know stream duration when no seeking happened.

https://bugzilla.gnome.org/show_bug.cgi?id=783435
2017-10-05 12:07:13 -03:00
Sebastian Dröge
c04e3b07dd rtsp-media-factory: Don't cache any media if NULL was returned as key
The docs already mentioned this, but we actually stored it in the hash
table with key==NULL and leaked its reference forever.
2017-09-25 19:41:33 +03: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
Satya Prakash Gupta
d690fbd37d sdp: fix Memory leak in error case
https://bugzilla.gnome.org/show_bug.cgi?id=787059
2017-08-31 11:04:05 +01:00
Sebastian Dröge
ffbabb1529 rtsp-client: Fix typo in debug message 2017-08-14 21:04:58 +03:00
Julien Isorce
d72284bdf8 rtsp-stream: fix connection delay due to wrong assumption on last-sample
Commit 852cc09f54 assumed that
multiudpsink's last-sample always comes from the payloader. Which
is wrong if auxiliary streams are multiplexed in the same stream.

So check the buffer's ssrc against the caps'ssrc before to use its
seqnum. If not the same ssrc just use the payloader as done prior
the commit above or when there is no last-sample yet.

https://bugzilla.gnome.org/show_bug.cgi?id=784094
2017-06-29 14:52:09 +01:00
Tim-Philipp Müller
b344248630 Mark symbols explicitly for export with GST_EXPORT 2017-05-18 10:35:18 +01: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
Thibault Saunier
b56930704f gi: Fix some annotations and docstrings 2017-04-13 14:20:10 -03:00
Thibault Saunier
133e91462a meson: Build gir 2017-04-13 14:11:43 -03:00
Sebastian Dröge
cd4e675f0c rtsp-client: Also handle the (S|G)ET_PARAMETER case of size==0 || !data as keep-alive
If there is no Content-Length header, no body would be allocated and the
'\0' would also not be appended to the body.
2017-01-19 14:57:19 +02:00
Sebastian Dröge
ac1124efb4 rtsp-client: Fix handling of keep-alive GET_PARAMETER/SET_PARAMETER
While they logically have 0 bytes length, GstRTSPConnection is appending
a '\0' to everything making the size be 1 instead.
2017-01-19 14:24:07 +02:00
Sebastian Dröge
6e145fadf9 rtsp-session: Only remove deprecated API if requested to do so, not just when disabling
gst_rtsp_session_is_expired() and gst_rtsp_session_next_timeout() were
affected.
2017-01-12 19:04:23 +02:00
Patricia Muscalu
fb7833245d rtsp-stream: corrected if-statement in _get_server_port()
This bug was accidentally introduced while fixing a segfault
in _get_server_port() function.

https://bugzilla.gnome.org/show_bug.cgi?id=776345
2017-01-10 10:38:13 +00:00
Patricia Muscalu
f47e6ab9f6 rtsp-stream: fixed segmenation fault in _get_server_port()
Calling function gst_rtsp_stream_get_server_port() results in
segmenation fault in the RTP/RTSP/TCP case.
Port that the server will use to receive RTCP makes only
sense in the UDP case, however the function should handle
the TCP case in a nicer way.

https://bugzilla.gnome.org/show_bug.cgi?id=776345
2017-01-09 15:27:40 +02:00
Aleksandr Slobodeniuk
b27e7c6b5b dosc: Fix a little typo
https://bugzilla.gnome.org/show_bug.cgi?id=777037
2017-01-09 10:19:53 +00:00
Patricia Muscalu
42f270e7f2 rtsp-stream: Fixed TCP transport case
Make sure that the appsink element is actually added to
the bin before trying to link it with the elements in it.

https://bugzilla.gnome.org/show_bug.cgi?id=776343
2016-12-22 14:21:54 +02:00
Edward Hervey
dea000f2e3 media: Fix pt map caps
Since decryption is handled within rtpbin, all outcoming stream
caps will be application/x-rtp (i.e. regular rtp)

Fixes RECORD with SRTP streams
2016-12-02 15:47:12 +01:00
Edward Hervey
8317139121 media-factory: Create media objects with the proper transport mode
The function called immediately afterwards (collect_streams()) will
need it to work properly
2016-12-02 15:47:12 +01:00
Sebastian Dröge
d633c0103a rtsp-auth: Don't remove digest-auth nonces that already/still have a client connected 2016-12-02 14:36:50 +02:00
Sebastian Dröge
708fd3c325 rtsp-media-factory: Don't create a pipeline for the media pipeline string
We're going to put a pipeline into a pipeline otherwise, which is not
exactly ideal.
2016-12-01 18:04:34 +02:00
Kseniia Vasilchuk
09e499387d media: Fix race condition around finish_unprepare() if called multiple time
https://bugzilla.gnome.org/show_bug.cgi?id=755329
2016-12-01 16:39:00 +02: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
Matthew Waters
b38eb8e99e stream: block the output of rtpbin instead of the source pipeline
85c52e194b introduced a more correct
detection of the srtp rollover counter to add to the SDP.

Unfortunately, it was incomplete for live pipelines where the logic
blocks the source bin before creating the SDP and thus would never have
the necessary informaiton to create a correct SDP with srtp encryption.

Move the pad blocks to rtpbin's output pads instead so that the
necessary information can be created before we need the information for
the SDP.

https://bugzilla.gnome.org/show_bug.cgi?id=770239
2016-11-23 23:08:16 +11:00
Dag Gullberg
f00ac2daf2 rtsp-client: add IDLE timeout, before session exists
The RTSP server will not timeout an idle RTSP connection
(note this is different from doing timeout on a RTSP
session).

At least for Apache this is a problem when running RTSP over
HTTPS since it uses one of the threads (there is a rather
limited number) that are available for handling requests.

https://bugzilla.gnome.org/show_bug.cgi?id=771830
2016-11-23 09:45:33 +00:00
Göran Jönsson
335d279a96 rtsp-stream: Set close-socket FALSE on UDP src:es
With this RTSP server can use the sockets independent on the udpsrc
state.
When the udp src is finalized it will unref socket and when g_socket
is finalized the socket will be closed.

https://bugzilla.gnome.org/show_bug.cgi?id=765673
2016-11-22 13:59:30 +02: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
Sebastian Dröge
927a44c55b rtsp-auth: Add support for Digest authentication
https://bugzilla.gnome.org/show_bug.cgi?id=774416
2016-11-19 11:59:34 +02:00
Scott D Phillips
d7676bfba3 Enable building with MSVC
https://bugzilla.gnome.org/show_bug.cgi?id=774640
2016-11-19 11:58:05 +02:00
Scott D Phillips
01ef7f32b6 client: update do_send_message to match type GstRTSPClientSendFunc
This type mismatch fails building with MSVC

https://bugzilla.gnome.org/show_bug.cgi?id=774640
2016-11-17 23:38:15 +00:00
Sebastian Dröge
179eb9ae89 rtsp-sdp: Fix indentation 2016-11-11 14:42:08 +02:00
Neha Arora
166a903594 rtsp-media: Only signal "new-state" if the state has actually changed
https://bugzilla.gnome.org/show_bug.cgi?id=774173
2016-11-10 13:16:23 +02:00
Branko Subasic
8425ea6969 client: emit signal in the beginning of each rtsp request
These signals let the application validate the requests, configure the
media/stream in a certain way and also generate error status code in
case of error or bad request.

https://bugzilla.gnome.org/show_bug.cgi?id=758062
2016-11-01 20:25:22 +02:00
Göran Jönsson
dbf91ab231 rtsp-client: Session filter in unwatch session
Call session filter with filter_session_media as paramer in
client_unwatch_session if using drop_backlog = FALSE.

In client_unwatch_session its allowed to grow the watchs backlog.
If using drop_backlog = FALSE and the backlog is full it will cause
a deadlock when setting session media state to NULL
if the backlog is not allowed to grow.

https://bugzilla.gnome.org/show_bug.cgi?id=771983
2016-10-25 12:55:59 +03:00
Nikita Bobkov
ff65732270 rtsp-client: Fix factory leaking in find_media() in error cases
https://bugzilla.gnome.org/show_bug.cgi?id=771488
2016-10-20 14:01:38 +03:00
Xavier Claessens
c0f24fea83 stream: Fix randomly missing streams from SDP with dynamic elements
When using dynamic elements, gst_rtsp_stream_join_bin() is called from
"pad-added" signal. In that case priv->srcpad could already have its caps,
and they'll be sent to priv->send_src[0] pad. That means that when it
connects "notify::caps" signal, that pad could already have received its
caps and the signal won't be emitted anymore.

In that case priv->caps stay to NULL and when building the SDP that stream
gets ignored. Leading to missing video or audio when playing in client side.

https://bugzilla.gnome.org/show_bug.cgi?id=772478
2016-10-06 19:05:36 +03:00
Ian Jamison
34389831cb rtsp-server: Hint that set_multicast_iface expects the name of the interface
To prevent any possibly confusion with IPs or anything else.

https://bugzilla.gnome.org/show_bug.cgi?id=771530
2016-09-18 10:00:29 -04:00
Sebastian Dröge
800bed8c9c rtsp-media: Call g_free() instead of g_object_unref() on multicast-iface strings
https://bugzilla.gnome.org/show_bug.cgi?id=763000#c5
2016-09-18 09:58:55 -04:00
Sebastian Dröge
74c8a9f4cf rtsp-stream: Remove unused _locked() variant of a function
It was added during refactoring.
2016-09-07 18:44:34 +03:00
Xavier Claessens
e882fe9e06 stream: cosmetic cleanup
https://bugzilla.gnome.org/show_bug.cgi?id=766612
2016-09-07 18:40:57 +03:00
Xavier Claessens
f5f350645a stream: Compare IP addresses case insensitive in more places
https://bugzilla.gnome.org/show_bug.cgi?id=766612
2016-09-07 18:40:57 +03:00
Xavier Claessens
f90ab92547 stream: Fix leaked joined_bin
There is no need to keep a strong ref on it, and _leave_bin() was
setting it to NULL before calling g_clear_object() so it was leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=766612
2016-09-07 18:40:57 +03:00
Sebastian Dröge
d33eca6156 rtsp-stream: Compare IP address strings case insensitive
Otherwise IPv6 addresses might fail this comparision.
2016-09-06 19:15:23 +03:00
Sebastian Dröge
e5a49efa7f rtsp-stream: Bind multicast sockets to ANY as before
https://bugzilla.gnome.org/show_bug.cgi?id=766612#c48
2016-09-06 19:10:21 +03:00
Kseniia
6136ef66d4 rtsp-session: Fix segfault when doing keep-alive after removing the session
If keep-alive happens after removing the session but before finalizing the
stream transport, we would segfault.

https://bugzilla.gnome.org/show_bug.cgi?id=750544
2016-09-05 22:57:52 +03:00
Sebastian Dröge
ca855abae1 rtsp-stream: Always create multicast UDP elements if the protocol flag is set
Adding them later will cause deadlocks due to
1) pre-rolling and staying in PAUSED with the unicast/TCP sinks
2) adding the multicast sink
3) waiting for it to get data to preroll again

3) never happens because the queues after the tee are full.
2016-09-05 18:09:22 +03:00
Sebastian Dröge
be4b9718e3 rtsp-stream: Fix up various multicast related issues 2016-09-05 16:32:57 +03:00
Xavier Claessens
8495c47a9d stream: revert back to create udpsrc/udpsink on DESCRIBE for unicast
This is basically reverting changes introduced in commit f62a9a7,
because it was introducing various regressions:

- It introduces a leak of udpsrc elements that got wrongly fixed by adding
  an hash table in commit cba045e. We should have at most 4 udpsrc for unicast:
  ipv4/ipv6, rtp/rtcp. They can be reused for all unicast clients.
- If a mcast client connects, it creates a new socket in SETUP to try to respect
  the destination/port given by the client in the transport, and overrides the
  socket already set on the udpsink element. That means that if we already had a
  client connected, the source address on the udp packets it receives suddenly
  changes.
- If a 2nd mcast client connects, the destination/port in its transport is
  ignored but its transport wasn't updated.

What this patch does:

- Revert back to create udpsrc/udpsink for unicast clients on DESCRIBE.
- Always have a tee+queue when udp is enabled. This could be optimized
  again in a later patch, but is more complicated. If no unicast clients
  connects then those elements are useless, this could be also optimized
  in a later patch.
- When mcast transport is added, it creates a new set of udpsrc/udpsink,
  seperated from those for unicast clients. Since we already support only
  one mcast address, we also create only one set of elements.

https://bugzilla.gnome.org/show_bug.cgi?id=766612
2016-09-05 13:36:17 +03:00
Xavier Claessens
aa0e60445d stream: factor our plug_src function
https://bugzilla.gnome.org/show_bug.cgi?id=766612
2016-09-05 13:26:08 +03:00
Xavier Claessens
47a3956b48 stream: factor out plug_sink function
https://bugzilla.gnome.org/show_bug.cgi?id=766612
2016-09-05 13:26:02 +03:00
Xavier Claessens
a44f198ffc stream: small documentation clarification
https://bugzilla.gnome.org/show_bug.cgi?id=766612
2016-09-05 13:25:57 +03:00
Xavier Claessens
82a618c2e6 stream: rename addr_v4/6 to mcast_addr_v4/6 for clarity
https://bugzilla.gnome.org/show_bug.cgi?id=766612
2016-09-05 13:25:51 +03:00
Xavier Claessens
55a1df5724 stream: Keep a ref on joined bin
https://bugzilla.gnome.org/show_bug.cgi?id=766612
2016-09-05 13:25:39 +03:00
Xavier Claessens
3ff4529a92 stream: code cleanup
https://bugzilla.gnome.org/show_bug.cgi?id=766612
2016-09-05 13:24:06 +03:00
Xavier Claessens
2b223af792 stream: small fix in error code path
https://bugzilla.gnome.org/show_bug.cgi?id=766612
2016-09-05 13:24:01 +03:00
Xavier Claessens
07f17c2cce Revert "rtsp-stream: Fix crash on cleanup with shared media and multiple udpsrc"
This partly reverts commit cba045e1b1,
but keeps unit tests.

https://bugzilla.gnome.org/show_bug.cgi?id=766612
2016-09-05 13:23:53 +03: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
Nikita Bobkov
de3d0c4522 rtsp-client: Fix leaking of media in error cases
With additional fixes by Kseniya Vasilchuk <vasilchukkseniia@gmail.com>
and myself to make the media refcounting a bit easier to follow.

https://bugzilla.gnome.org/show_bug.cgi?id=755632
2016-08-02 17:46:49 +03:00
Sebastian Dröge
687301af86 rtsp-client: Fix leaking of session in error cases
https://bugzilla.gnome.org/show_bug.cgi?id=755632
2016-08-02 15:18:30 +03:00
Aleix Conchillo Flaqué
85c52e194b sdp: add rollover counters for all sender SSRC
We add different crypto sessions in MIKEY, one for each sender
SSRC. Currently, all of them will have the same security policy, 0.

The rollover counters are obtained from the srtpenc element using the
"stats" property.

https://bugzilla.gnome.org/show_bug.cgi?id=730539
2016-06-14 11:14:48 +02:00
Tim-Philipp Müller
fc2554404b docs: fix some typos 2016-06-07 20:44:42 +01:00
Tim-Philipp Müller
7de0d6580a g-i: pass compiler env to g-ir-scanner
It's what introspection.mak does as well. Should
fix spurious build failures on gnome-continuous
(caused by g-ir-scanner getting compiler details
via python which is broken in some environments
so passing the compiler details bypasses that).
2016-05-25 10:28:43 +01:00
Ian
178f2d6fe5 rtsp-session: RFC2326 does not allow a space between ; and timeout in the Session header
This works with rtspsrc and live555, but fails with e.g. ffmpeg.

https://bugzilla.gnome.org/show_bug.cgi?id=766619
2016-05-19 11:57:33 +03: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
Jake Foytik
fe5f8077c1 rtsp-stream: Fix crash on cleanup with shared media and multiple udpsrc
- Unicast udpsrcs are now managed in a hash table. This allows for proper cleanup in with shared streams and fixes a memory leak.
 - Unicast udpsrcs are now properly cleaned up when shared connections exit. See the update_transport() function.
 - Create unit test for shared media.

https://bugzilla.gnome.org/show_bug.cgi?id=764744
2016-04-29 11:49:14 +03:00
Sebastian Dröge
aa9a2443a1 rtsp-stream: Always bind to ANY when address is a multicast address and not only on Windows
For IPv6 addresses, binding to a multicast group does not work on Linux
either. Always bind to ANY and then later join the multicast group.

https://bugzilla.gnome.org/show_bug.cgi?id=764679
2016-04-29 11:48:57 +03:00
Patricia Muscalu
f0891e2cdf rtsp-thread-pool: explained why GSource is a part of ThreadImpl
Clarified why it is necessary to add source information to
GstRTSPThreadImpl. See the reported bug in GLib:
https://bugzilla.gnome.org/show_bug.cgi?id=720186
for more information.

https://bugzilla.gnome.org/show_bug.cgi?id=761702
2016-04-06 09:46:34 +01:00
Sebastian Dröge
60dd95849f rtsp-server: Use $(GST_NET_LIBS) / $(GST_NET_CFLAGS) 2016-04-03 12:06:29 +03:00
Sebastian Dröge
9fab555cc5 rtsp-server: Implement clock signalling according to RFC7273
For NTP and PTP clocks we signal the actual clock that is used and signal
the direct media clock offset.

For all other clocks we at least signal that it's the local sender clock.

This allows receivers to know which clock was used to generate the media and
its RTP timestamps. Receivers can then implement network synchronization,
either absolute or at least relative by getting the sender clock rate directly
via NTP/PTP instead of estimating it from RTP timestamps and packet receive
times.

https://bugzilla.gnome.org/show_bug.cgi?id=760005
2016-04-03 11:22:31 +03: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
Sebastian Dröge
69d04f3838 rtsp-media: 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
Sebastian Dröge
8e72e69eec rtsp-stream: Don't set the state of the appsrc from PLAYING to PAUSED again during setup
This would get us NO_PREROLL in the bin again and break seeking.
Thanks to Carlos Rafael Giani for helping to debug this!

https://bugzilla.gnome.org/show_bug.cgi?id=740509
2016-03-16 23:36:30 +02:00
Sebastian Dröge
8b68edd138 rtsp-stream: Ensure that the pipeline is live and later-added udpsrcs are syncing the state with the parent bin
Without this, RECORD pipelines are broken because
a) we wait for ASYNC_DONE which never happens anymore because udpsrc would be
added later. Previously it was there earlier and due to NO_PREROLL caused the
pipeline to preroll immediately
b) the udpsrc for the pipeline is added later and never set to PLAYING state,
as the corresponding code previously was only for PLAY pipelines.

https://bugzilla.gnome.org/show_bug.cgi?id=763281
2016-03-10 19:47:13 +02:00
Jan Schmidt
4a6f63ad03 rtsp-stream: Fix typo in the docstring
gst_rtsp_stream_set_client_side -> gst_rtsp_stream_is_client_side
2016-03-11 01:23:15 +11:00
Sebastian Dröge
206d2ded09 rtsp-stream: Disable multicast loopback for all our sockets
On Windows this is a receiver-side setting, on Linux a sender-side setting. As
we provide a socket ourselves to udpsrc, udpsrc is never setting the multicast
loopback setting on the socket... while udpsink does which unfortunately has
no effect here on Windows but on Linux.

https://bugzilla.gnome.org/show_bug.cgi?id=757488
2016-03-05 10:53:15 +02:00
Sebastian Dröge
9794822549 rtsp-stream: Only bind multicast sockets to ANY on Windows
On Linux it is still needed to bind to the multicast address
to filter out random other packets, while on Windows binding
to multicast addresses just fails.
2016-03-04 13:51:12 +02:00
Sebastian Dröge
a7ced98346 rtsp-stream: Only use the address pool for unicast UDP if it contains unicast addresses
Otherwise we fail to allocate UDP ports if the pool only contains multicast
addresses, which is something that used to work before. For unicast addresses
if the pool contains none, we just allocate them as if there is no pool at
all.

https://bugzilla.gnome.org/show_bug.cgi?id=757488
2016-03-03 10:43:13 +02:00
Sebastian Dröge
406ed190ac rtsp-server: Fix indentation 2016-03-02 11:48:49 +02:00
Sebastian Dröge
bcee3202d3 rtsp-stream: Don't bind the sockets to multicast addresses
This works on Linux but fails completely on Windows. You're supposed
to bind to ANY and then join the multicast group.

https://bugzilla.gnome.org/show_bug.cgi?id=757488
2016-03-02 11:47:47 +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
Patricia Muscalu
f62a9a7eb9 rtsp-stream: postpone UDP socket allocation until SETUP
Postpone the allocation of the UDP sockets until we know
what transport has been chosen by the client.
Both unicast and multicast UDP sources are created in one
function.

https://bugzilla.gnome.org/show_bug.cgi?id=757488
2016-02-23 17:05:15 +02:00
Patricia Muscalu
d10ba734cd rtsp-stream: postpone the creation of the UDP sources
Code refactoring: allocate the UDP ports after the sender and
the reciver parts have been created.
We postpone the creation of the UDP sources until the UDP
ports have been allocated.

https://bugzilla.gnome.org/show_bug.cgi?id=757488
2016-02-23 17:05:15 +02:00
Patricia Muscalu
66389cb900 rtsp-stream: added function for setting UDP sources to PLAYING state
Code refactoring: Introduced a function for setting UDP sources
to PLAYING state.

https://bugzilla.gnome.org/show_bug.cgi?id=757488
2016-02-23 17:05:15 +02:00
Patricia Muscalu
c0cadc6ec3 rtsp-stream: added function for creating and configuring UDP sources
Code refactoring: create and configure UDP sources in a separate function.

https://bugzilla.gnome.org/show_bug.cgi?id=757488
2016-02-23 17:05:15 +02:00
Patricia Muscalu
b26c16c824 rtsp-stream: added function for RTP/RTCP socket configuration
Code refactoring: configure RTP and RTCP sockets for UDP sinks
in a separate function.

https://bugzilla.gnome.org/show_bug.cgi?id=757488
2016-02-23 17:05:15 +02:00
Patricia Muscalu
6b6970ab23 rtsp-stream: added function for creating and configuring UDP sinks
Code refactoring: create and configure UDP sinks in a separate function.

https://bugzilla.gnome.org/show_bug.cgi?id=757488
2016-02-23 17:05:15 +02:00
Patricia Muscalu
89bc8009dd rtsp-stream: added helper function for creating the sender/receiver parts
Code refactoring: introduced helper function for creating
the receiver and the sender parts of the streaming pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=757488
2016-02-23 17:05:15 +02: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
Steven Hoving
aea624b6f8 rtsp-media: fix state_lock not locked again when preroll fails
https://bugzilla.gnome.org/show_bug.cgi?id=761399
2016-02-02 10:36:05 +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
Jan Schmidt
b6ca057c72 rtsp-stream: Add functions for using rtsp-stream from the client
Add a boolean to indicate that the rtsp-stream is running on the
'client' side of an RTSP connection, for sending streams via
RECORD. In that case, the roles of the client/server ports
in transport setup are swapped.

https://bugzilla.gnome.org/show_bug.cgi?id=758180
2016-01-29 01:44:26 +11:00
Jan Schmidt
192a1eea34 rtsp-sdp: Add gst_rtsp_sdp_from_stream()
A new function that adds info from a GstRTSPStream into an SDP message.

https://bugzilla.gnome.org/show_bug.cgi?id=758180
2016-01-29 01:44:26 +11:00
Steven Hoving
fefc011dfb rtsp-media: Fix mutex beeing unlocked while they should be locked
https://bugzilla.gnome.org/show_bug.cgi?id=761226
2016-01-28 09:34:32 +01:00
Tim-Philipp Müller
ac1d35b147 rtsp-media-factory: add missing break in "clock" property setter
CID 1348453
2016-01-15 07:01:37 +00:00
Srimanta Panda
fdbda049c6 rtsp-stream: fixed assert during update transport
When RTSP server trying update transport during multicast, it throws an
assert. The assert is thrown because it is trying to get the parent of
an non-existing funnel element.

https://bugzilla.gnome.org/show_bug.cgi?id=760150
2016-01-07 14:31:03 +02:00
Tim-Philipp Müller
bec94861b0 docs: remove dummy function declarations with G_INLINE_FUNC for gtk-doc
gtk-doc can handle static inline functions just fine these days,
there's no need for this stuff any more.
2016-01-03 17:26:31 +00:00
Hyunjun Ko
924f914172 sdp: replace duplicated codes to call new base sdp apis
https://bugzilla.gnome.org/show_bug.cgi?id=745880
2015-12-31 17:13:39 +02:00
Sebastian Dröge
7a41d396ae rtsp-media: Add API to directly configure a clock on the media pipelines 2015-12-30 18:40:43 +02:00
Sebastian Dröge
cbf3f3888f rtsp-media: Fix typo in docs gst_rtsp_media_set_latncy() -> latency() 2015-12-30 16:43:17 +02:00
Sebastian Dröge
6b76c02552 rtsp-media-factory: Add FIXME for 2.0 2015-12-30 16:30:38 +02:00
Sebastian Dröge
3d6b93bcd3 rtsp-stream: Fix indentation 2015-12-30 16:29:45 +02:00
Sebastian Rasmussen
b2abb97043 rtsp-media: Do not prepare media after media times out
Deferred calls to start_prepare() can be deferred past the point until
which wait_preroll() and by proxy gst_rtsp_media_get_status() is
prepared to wait. Previously there was no lock and no check for this
situation. This meant that a media could be prepared and unprepared
simultaneously by two different threads. Now a lock is in place and a
suitable check is done.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=759773
2015-12-28 14:08:09 +02:00
Sebastian Dröge
c8f179948e rtsp-media: Add property to decide if sending media should be stopped when a client disconnects without TEARDOWN
Without TEARDOWN it might be desireable to keep the media running and continue
sending data to the client, even if the RTSP connection itself is
disconnected.

Only do this for session medias that have only UDP transports. If there's at
least on TCP transport, it will stop working and cause problems when the
connection is disconnected.

https://bugzilla.gnome.org/show_bug.cgi?id=758999
2015-12-28 10:51:56 +02:00
Olivier Crête
ee3a7b61ef rtsp-session-pool: Avoid dollar sign ($) in session ids
Live555 in VLC strips off dollar signs and then gets very confused,
we don't loose too much entropy by just skipping it.
2015-12-15 16:57:37 -05:00
Xavier Claessens
0ea68a1b0f rtsp-server: Add g_autoptr() support to all types
https://bugzilla.gnome.org/show_bug.cgi?id=754464
2015-12-14 13:52:17 -05:00
Srimanta Panda
f96947b350 rtsp-stream: fixed valgrind error
Fixed the valgrind error in unit test. The UDP source created during
gst_rtsp_stream_join_bin() was not released while destroying the rtp
bin.

https://bugzilla.gnome.org/show_bug.cgi?id=759010
2015-12-08 09:47:53 +02:00
Srimanta Panda
ed70572c6c rtsp-client: suspend media during setup request
SETUP request from clients needs to suspend the media to clear the
prerolled buffers. Otherwise it will not affect the prerolled buffer
and the prerolled buffers will be incorrect (for example block-size
from setup request will not affect the prerolled buffer unless the
media is suspended).

https://bugzilla.gnome.org/show_bug.cgi?id=758268
2015-12-04 15:48:23 +02:00