Commit graph

1056 commits

Author SHA1 Message Date
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 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
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 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
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
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
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 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
Srimanta Panda 82dffd17b3 rtsp-stream: create stream pipeline based on transport
Based on the protocol, create the rtsp stream pipeline. If only TCP or
only UDP is set as the transport protocol, it will not add the extra tee
or queue element to the pipeline. Both these elements will be added, if
it supports both TCP and UDP protocols. This improves the pipeline
performance when one protocol is present.

https://bugzilla.gnome.org/show_bug.cgi?id=758179
2015-12-04 14:13:10 +02:00
Sebastian Dröge 61772cb326 rtsp-stream: Only create RTP sending/receiving rtpbin pads if needed
Adding them when not needed will start some logic inside rtpbin that might be
problematic. Also if e.g. for a sender media we suddenly receive RTP data, we
would start up a rtpjitterbuffer and behave in weird ways.

We still set up the UDP sources for RTP receiving for a sender media to be
able to receive any packets sent by the client for NAT traversal. They will
all go to a fakesink though.

Having an rtpjitterbuffer in the media pipeline will cause the pipeline to be
NO_PREROLL, which will cause deadlocks when seeking the media as it will never
receive ASYNC_DONE after a seek.

https://bugzilla.gnome.org/show_bug.cgi?id=758319
2015-12-01 15:32:45 +02:00
Sebastian Dröge cdc0849dfe rtsp-stream: Disable multicast loopback for the multicast udp sources too
On POSIX this setting is for sender sockets, on Windows for receiver sockets.
Previously we were only setting this for sender sockets, which caused looped
back packets to be received on Windows if a multicast transport was used.
2015-11-17 12:45:58 +02:00
Jan Schmidt 9e92a0307c rtsp-client: Report RECORD and ANNOUNCE as supported in the OPTIONS 2015-11-17 01:12:28 +11:00
Marcus Prebble b90d4ba917 rtsp-server: Change the logic so we don't pop a NULL context
When doing a port scan (e.g. with nmap) the call to GST_RTSP_CHECK()
will sometimes fail. This call is made before any context is pushed
resulting in an attempt to pop a NULL context.

https://bugzilla.gnome.org/show_bug.cgi?id=757949
2015-11-11 15:58:27 +01:00
David Svensson Fors 81ae320383 rtsp-stream: Always unref return value of gst_object_get_parent()
Fixes a leak of a GstBin in the udp-mcast case.

https://bugzilla.gnome.org/show_bug.cgi?id=756968
2015-10-22 19:28:15 +03:00
Hyunjun Ko a51337974c stream: listen to sender ssrc signals
https://bugzilla.gnome.org/show_bug.cgi?id=746747
2015-10-02 16:40:31 +03:00
Sebastian Rasmussen 6f1cad9237 rtsp-media: Take reference to media that will be prepared
default_prepare() takes a transfer-none reference GstRTSPMedia object.
Later on a g_idle_source_new() is created and a pointer to the media
object is passed as user data. If the media is freed before the idle
source is dispatched the media object pointer is invalid, but the idle
source callback expects it to still be valid. To fix this a reference to
the media object is taken when registering the source callback function
and a corresponding release of the reference is done when the souce is
destroyed.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=755748
2015-09-29 11:23:06 +01:00
Tim-Philipp Müller da8a31ac88 stream: fix docs for recently-added get/set_buffer_size API
https://bugzilla.gnome.org/show_bug.cgi?id=749095
2015-09-17 20:07:34 +01:00
Jan Schmidt 315c2f93bb rtsp-media: Don't crash on encrypted RTX SDP
In parse_keymgmt(), don't mutate the input string that's been passed
as const, especially since we might need the original value again if
the same key info applies to multiple streams (RTX, for example).

https://bugzilla.gnome.org/show_bug.cgi?id=754753
2015-09-09 17:57:15 +10:00
Jan Schmidt 27736d406e rtsp-stream: Implement UDP buffer size setting.
Add gst_rtsp_stream_(get|set)_buffer_size and use it to configure the
UDP TX buffer size.

Incorporates a patch by Hyunjun Ko <zzoon.ko@samsung.com>
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=749095
2015-09-03 22:19:40 +10:00
Jan Schmidt 9bfcdba42b rtsp-media: Fix small typo causing gtk-doc to complain 2015-09-03 22:16:30 +10:00
Hyunjun Ko 4c6b1faa6a media-factory: get port number through gst_rtsp_url_get_port
https://bugzilla.gnome.org/show_bug.cgi?id=753473
2015-08-16 12:08:49 +02:00
Xavier Claessens 8511ffe178 Document that source keeps a ref on server until it's destroyed
https://bugzilla.gnome.org/show_bug.cgi?id=749227
2015-08-10 12:18:53 -04:00
Nicolas Dufresne 707ac9c487 media: Only add fakesink once per pipeline
The intention is to prevent going PLAYING state before pads are created.
If there was mutilple dynamic payload, it would leak few fakesink and
actually prevent from ever reaching playing state.

https://bugzilla.gnome.org/show_bug.cgi?id=753385
2015-08-08 09:46:40 -04:00
Nicolas Dufresne 160b87430f Revert "rtsp-media: Only add 1 fakesink per pipeline"
This reverts commit 22bf61f16c.
2015-08-08 09:08:37 -04:00
Nicolas Dufresne 22bf61f16c rtsp-media: Only add 1 fakesink per pipeline
There should be only one fakesink per pipeline, not per dynpay. This
would lead to element naming clash.
2015-08-07 09:33:55 -04:00
Vineeth TM 3920e21cd0 rtsp-media: assertion error due to wrong condition check
In media to caps function, reserved_keys array is being used for variable i,
leading to GLib-CRITICAL **: g_ascii_strcasecmp: assertion 's1 != NULL' failed
changed it to variable j

https://bugzilla.gnome.org/show_bug.cgi?id=753009
2015-07-30 15:52:08 +03:00
Sebastian Dröge ae7bec97cb rtsp-media: Strip keys from the fmtp that we use internally in our caps
Skip keys from the fmtp, which we already use ourselves for the
caps. Some software is adding random things like clock-rate into
the fmtp, and we would otherwise here set a string-typed clock-rate
in the caps... and thus fail to create valid RTP caps

https://bugzilla.gnome.org/show_bug.cgi?id=753009
2015-07-29 11:28:21 +01:00
Xavier Claessens 5585dc5878 threadpool: Fix possible warning in gst_rtsp_thread_pool_cleanup()
https://bugzilla.gnome.org/show_bug.cgi?id=752640
2015-07-20 16:47:05 -04:00
Ognyan Tonchev 8922afb88d rtsp-client: allow application to decide what requirements are supported
Add "check-requirements" signal and vfunc to allow application
(and subclasses) to check the requirements.

Based on patch from Hyunjun Ko <zzoon.ko@samsung.com>

https://bugzilla.gnome.org/show_bug.cgi?id=749417
2015-06-23 14:38:29 +01:00
Ognyan Tonchev fb71b9c4e9 rtsp-media: Always use real payloader when creating streams
A bin that contains the real payloader might be used as payloader. In this
case we have to get the real payloader for the various properties it provides.

Example use cases for this are bins that payload some media and then have
additional elements that add metadata or RTP extension headers to the stream.

https://bugzilla.gnome.org/show_bug.cgi?id=750800
2015-06-16 11:09:37 +02:00
Hyunjun Ko 2a3dd3d38f rtsp-stream: add description for gst_rtsp_stream_request_aux_sender
https://bugzilla.gnome.org/show_bug.cgi?id=750764
2015-06-11 11:37:03 +01:00
Xavier Claessens 6ec8fe44b2 GstRTSPAuth: Add client certificate authentication support
https://bugzilla.gnome.org/show_bug.cgi?id=750471
2015-06-09 19:51:46 -04:00
Göran Jönsson 08e0c79cee rtsp-client: No flush during Teardown.
When calling gst_rtsp_watch_write_data in gstrtspconnection.c and
backlog is empty it can happen that just a part of a message will be
sent and rest is in backlog queue. If then flush during teardown
just a part of message will be sent.This can lead to client miss
teardown response since it expect to get the last part of message.

The flushing during teardown was introduced to fix a deadlock that now
is fixed more generally in handle_request by temporary  setting backlog
size to unlimited.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=749845
2015-06-03 15:09:10 +02:00
Sebastian Dröge 8700468499 rtsp-server: Use single-include rtsp header to make sure we get all definitions 2015-05-20 17:05:47 +03:00
Sebastian Dröge 1c30c60e64 rtsp-media: Mark some more functions static 2015-05-05 16:46:57 +02:00
Sebastian Dröge bbdf0a47d1 rtsp-media: Only unblock the media in suspend() when actually changing the state
Otherwise we're going to lose a few packets for live streams during DESCRIBE.
2015-05-05 16:46:19 +02:00
Sebastian Dröge ec2c500a9d rtsp-sdp: Only add RTX to the SDP when using a feedback profile 2015-05-04 16:31:20 +02:00
Hyunjun Ko 4ff22ef6d2 rtsp-stream: get valid clock-rate from last-sample
clock-rate in last-sample's caps is integer, not unsigned.
To get this value properly, variable needs to be type-casted to int.

https://bugzilla.gnome.org/show_bug.cgi?id=747614
2015-04-27 12:41:59 +02:00
Hyunjun Ko de590b4b2a rtsp-stream: fix to get valid each stream data for request-aux-sender signal
Because of duplicated g_signal_connect for request-aux-sender signal,
wrong stream pointer is passed to the signal handler.
Instead of passing each stream, pass stream array and get the relevant stream.

https://bugzilla.gnome.org/show_bug.cgi?id=747839
2015-04-15 15:14:04 +02:00
Sebastian Dröge ef3bfd757b rtsp-stream: Limit the queues to 1 buffer
We only need them to be able to pre-roll, queueing up more data here
is only going to harm latency and memory usage.
2015-03-23 21:04:43 +01:00
Sebastian Dröge 357af7aea6 rtsp-stream: Update comment and ASCII art to the latest code
We have a queue in front of the udpsink too to prevent the pipeline from
locking up.
2015-03-23 20:59:52 +01:00
Nicolas Dufresne dfb053add3 rtsp-media: Properly return first rtptime
Instead we where returning first GstBuffer timestamp. This would result
in clock skew and unwanted behaviour in RTSP playback.

https://bugzilla.gnome.org/show_bug.cgi?id=746479
2015-03-21 11:04:05 -04:00
Nicolas Dufresne 01562286ba rtsp-stream: Don't leave buffer mapped
If the seq is NULL, the RTP buffer was left mapped. We should always
unmap the buffer.
2015-03-18 16:44:19 -04:00
Tim-Philipp Müller 896767b041 Fix double semicolons 2015-03-10 09:39:22 +00:00
Sebastian Dröge 852cc09f54 rtsp-stream: Get the seqnum-base and other information from the last buffer in the sink
This gives more accurate values than asking the payloader. There might be
queueing happening between the payloader and the sink.

https://bugzilla.gnome.org/show_bug.cgi?id=745704
2015-03-09 16:00:38 +01:00
Sebastian Dröge b58af93d83 rtsp-media: Don't seek for PLAY if the position will not change
https://bugzilla.gnome.org/show_bug.cgi?id=745704
2015-03-09 13:00:25 +01:00
Sebastian Dröge 93bdbb6acd rtsp-media: Don't include payload type in the caps for framesize
When the sdp media attribute framesize are converted to caps
the <payload> should not be included.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725335

Based on the patch for rtspsrc by Linus Svensson <linussn@axis.com>
2015-03-09 10:21:49 +01:00
Linus Svensson 9dadaed2fd rtsp-sdp: add payload type to the sdp framesize attribute
The sdp framesize attribute is desribed in RFC6064. It is specified
for payloading of H263 and has the following form
a=framesize:<payload type> <width>-<height>. The <width>-<height> part
should be added to the caps in a payloader and the <payload type> should
be added by the rtsp-server.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725334
2015-03-09 09:26:38 +01:00
Jan Schmidt db42945c2c rtsp-media-factory: Add functions to set/get the media gtype
Allow specifying the GType of a GstRtspMedia subclass to create
as a simpler way to get the factory to create a custom
GstRtspMedia sub-class, without subclassing GstRtspMediaFactory.
2015-03-03 11:53:16 +11:00
Gregor Boirie bc7765eee7 rtsp-media: fix double unlock in _get_buffer_size()
Fixes an abort when calling gst_rtsp_media_get_buffer_size()
because of double g_mutex_unlock () usage.

https://bugzilla.gnome.org/show_bug.cgi?id=745434
2015-03-02 10:50:57 +00:00
Kent-Inge Ingesson d2f1997c4b rtsp-session: Use monotonic time for RTSP session timeout
Changed RTSP session timeout handling to monotonic time
and deprecating the API for current system time.

This fixes timeouts when the system time changes.

https://bugzilla.gnome.org/show_bug.cgi?id=743346
2015-02-19 10:43:30 +02:00
Sebastian Dröge 51ed357597 rtsp-client: Only error out in PLAY if seeking actually failed
If the media was just not seekable, we continue from whatever position we are
and let the client decide if that is what is wanted or not.

Only if the actual seek failed, we can't really recover and should error out.
2015-02-13 12:21:16 +02:00
Andreas Frisch bac59c52f1 rtsp-stream: Add necessary queues between tee and multiudpsink
https://bugzilla.gnome.org/show_bug.cgi?id=744379
2015-02-13 11:28:43 +02:00
Sebastian Dröge 98b162f54b rtsp-media: If seeking fails, don't wait forever for the media to preroll again
Instead error out properly the same way as if the SEEKING query already
failed.
2015-02-12 16:53:27 +02:00
Tim-Philipp Müller dc43f427a9 rtsp-stream: minor code formatting fix 2015-02-11 17:25:35 +00:00
Luis de Bethencourt ec7bf5379e rtsp-media: fix logic for collect_streams
Fix the logic of gst_rtsp_media_collect_streams() so after looping collecting
all streams it knows if it got any, and can check if the transport mode is OK.

CID #1268400
2015-02-10 16:45:23 +00:00
Sebastian Dröge 8405cfad3a rtsp-media: Don't set the transport mode based on what elements we find
Just print a warning if the one that was set before disagrees with what
elements we found. It must already be set to something before as this
function is called after we received the SDP from ANNOUNCE in RECORD mode,
and we would reject ANNOUNCE if the RECORD flag was not set.
2015-02-09 10:21:50 +01:00
Tim-Philipp Müller 57c21c8f9e rtsp-client: fix awkward if clause 2015-02-08 12:08:36 +00:00
Sebastian Dröge a93ed7e5d4 rtsp-media: Use flags to distinguish between PLAY and RECORD media 2015-02-06 09:42:50 +01:00
Tim-Philipp Müller e9ce91634c rtsp-client: fix a couple of leaks in handle_announce 2015-02-06 09:42:50 +01:00
Sebastian Dröge 35b2b10cf4 rtsp-media: Expose latency setting for setting the rtpbin latency 2015-02-06 09:42:50 +01:00
Sebastian Dröge 844add610d rtsp-stream: Put the timestamp of receival of the initial packet over TCP on the first buffer 2015-02-06 09:42:50 +01:00
Sebastian Dröge ccf6c6eb53 Add initial support for RECORD
We currently only support media that is RECORD or PLAY only, not both at once.

https://bugzilla.gnome.org/show_bug.cgi?id=743175
2015-02-06 09:42:42 +01:00
Anila Balavan 18668bf495 rtsp-stream: RTCP and RTP transport cache cookies seperated
RTCP packets were not sent because the same tr_cache_cookie was used for
both RTP and RTCP. So only one of the tr_cache lists were populated
depending on which one was sent first. If the tr_cache list is not
populated then no packets can be sent. Most often this happened to be
RTCP. Now seperate RTCP and RTP transport cache cookies are added which
resulted in both the tr_cache_lists to be populated regardless of which
one was sent first.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=743734
2015-01-30 18:26:44 +01:00
Tim-Philipp Müller 6987a00fa9 rtsp-stream: fix false compiler warning
rtsp-stream.c:3034: error: ‘visited’ may be used uninitialized in this function
2015-01-21 14:58:19 +00:00
Tim-Philipp Müller cc3e0ed39b rtsp-client: log interleaved data received 2015-01-19 23:24:28 +00:00
Tim-Philipp Müller 47eaac5b9e rtsp-client: fix unintentional fallthrough to debug warning when receiving interleaved data 2015-01-19 23:18:02 +00:00
Sebastian Dröge fcef562f35 rtsp-client: If we have a single-stream media and SETUP contains no control, use the one and only stream 2015-01-19 13:09:20 +01:00
Sebastian Dröge 69e346419a rtsp-client: Use a random session ID in the SDP
RFC4566 Section 5.2 says that it should make the username, session id,
nettype, addrtype and unicast address tuple globally unique. Always using
1188340656180883 is not going to guarantee that: https://xkcd.com/221/

Instead let's create a 64 bit random number, which at least brings us
closer to the goal of global uniqueness.

https://tools.ietf.org/html/rfc4566#section-5.2
2015-01-18 19:08:36 +01:00
Sebastian Dröge 586fe4ea4b rtsp-client: Drop trailing \0 of RTSP DATA messages
We add a trailing \0 in GstRTSPConnection to make parsing of
string message bodies easier (e.g. the SDP from DESCRIBE) but
for actual data this means we have to drop it or otherwise
create invalid data.
2015-01-16 20:06:57 +01:00
Göran Jönsson 0d2de69db9 rtsp-stream: Have one copy of the transports cache for RTP and RTCP each
Fixes crash when two threads access handle_new_sample() at the same
time, one for RTP, one for RTCP.

Otherwise, when iterating over the transports cache, it might be modified by
another thread at the same time if the transports cookie has changed.

https://bugzilla.gnome.org/show_bug.cgi?id=742954
2015-01-16 12:52:43 +01:00
Sebastian Dröge fe8e877dd9 rtsp-stream: Set format=TIME on our app sources for TCP 2015-01-15 19:35:01 +01:00
Sebastian Rasmussen 94f3e18c5b Revert "rtsp-session-pool: Make sure session IDs are properly URI-escaped"
This reverts commit 935e8f852d.

RFC 2326 states that session IDs may consist of alphanumeric as well as
the safe characters $-_.+ -- N.B. the percent character is not allowed.

Previously the session ID was URI-escaped, this meant that any character
which was not alphanumeric or any of the characters +-._~ would be
percent encoded. While the RFC (surprisingly) mentions that linear white
space in session IDs should be URI-escaped, it does not say anything
about other characters. Moreover no white space is allowed in the
session ID. Finally the percent character which is the result of
URI-escaping is not allowed in a session ID.

So there is no reason to do any URI-escaping, and now it is removed.

https://bugzilla.gnome.org/show_bug.cgi?id=742869
2015-01-14 18:43:37 +01:00
Sebastian Dröge 79e41bc2be rtsp-client: Add a send_message default signal handler
This allows subclasses to easily hook into the response sending
mechanism without doing everything from a signal, which seems
awkward from subclasses.
2014-12-29 12:06:50 +01:00
Sebastian Dröge a44b564f59 rtsp-stream: Fix some minor memory leaks 2014-12-16 16:46:15 +01:00
Sebastian Dröge 8ae3566591 rtsp-media: Some minor cleanup 2014-12-16 16:46:06 +01:00
Sebastian Dröge 06bfc0697b rtsp-stream: Fix compiler warnings
rtsp-stream.c:1351:3: error: non-void function 'gst_rtsp_stream_get_retransmission_time' should return a value [-Wreturn-type]
  g_return_if_fail (GST_IS_RTSP_STREAM (stream));
  ^

rtsp-stream.c:1384:3: error: non-void function 'gst_rtsp_stream_get_retransmission_pt' should return a value [-Wreturn-type]
  g_return_if_fail (GST_IS_RTSP_STREAM (stream));
  ^
2014-12-16 16:42:13 +01:00
Matthew Waters 4f40781fff media: implement ssrc-multiplexed retransmission support
based off RFC 4588 and the server-rtpaux example in -good
2014-12-16 16:41:08 +01:00
Göran Jönsson 058698c9cf rtsp: Ref transports in hash table.
Also ref streams for transports.
This solves a crash when reciving a rtcp after teardown but before
client finalize.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740845
2014-12-02 16:29:24 +01:00
Wim Taymans bd8b2d3fb9 client: refactor cleanup of cached media 2014-11-07 12:48:53 +01:00
Linus Svensson 088eee6590 client: Configure transport after creating session media
The default implementation of configure_client_transport() in
rtsp-client uses the session media when it chooses channels for
interleaved traffic.

https://bugzilla.gnome.org/show_bug.cgi?id=739112
2014-11-07 12:42:48 +01:00
Linus Svensson a455181aff client: Stop caching media in client when doing setup
If the media has been managed by a session media, it should not be
cached in the client any longer. The GstRTSPSessionMedia object is now
responsible for unpreparing the GstRTSPMedia object using
gst_rtsp_media_unprepare(). Unprepare the media when finalizing the
session media.

https://bugzilla.gnome.org/show_bug.cgi?id=739112
2014-11-07 12:34:23 +01:00
Aleix Conchillo Flaqué 7c267928ff rtsp-stream: unref srtp decoder when leaving bin
https://bugzilla.gnome.org/show_bug.cgi?id=739481
2014-11-01 11:26:14 +00:00
Aleix Conchillo Flaqué ef9dc6c9e4 rtsp-client: mikey memory leaks
https://bugzilla.gnome.org/show_bug.cgi?id=739383
2014-10-30 10:34:56 +00:00
Vincent Penquerc'h f803be2dc8 rtsp-media: deactivate media when shutting down from paused
This was only done when going directly from playing.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=737829
2014-10-21 11:52:27 +02:00
Aleix Conchillo Flaqué 0aad92531d rtsp-client: add stream transport to context
We add the stream transport to the context so we can get the configured
client stream transport in the setup request signal.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=738905
2014-10-21 11:44:40 +02:00
Aleix Conchillo Flaqué 966065a018 stream: release lock even not all transports have been removed
We don't want to keep the lock even we return FALSE because not all the
transports have been removed. This could lead into a deadlock.

https://bugzilla.gnome.org/show_bug.cgi?id=737797
2014-10-21 10:08:44 +02:00
Olivier Crête dde6a89928 rtsp-sdp: Rename clock-base and seqnum-base to timestamp-offset and seqnum-offset
These were renamed in GstRTPBasePayload in 1.0
2014-10-10 18:43:00 -04:00
Aleix Conchillo Flaqué 6c0c90c9d2 client: set session media to NULL without the lock
We need to set session medias to NULL without the client lock otherwise
we can end up in a deadlock if another thread is waiting for the lock
and media unprepare is also waiting for that thread to end.

https://bugzilla.gnome.org/show_bug.cgi?id=737690
2014-10-01 10:31:04 +01:00
Sebastian Dröge 1badcd83c3 rtsp-media: Set state to UNPREPARING in all cases 2014-09-30 23:22:45 +03:00
Ognyan Tonchev d48e022c13 media: set state to unpreparing when unprepare is initiated
https://bugzilla.gnome.org/show_bug.cgi?id=737675
2014-09-30 23:15:29 +03:00
Sebastian Rasmussen 404a80e38a rtsp-client: Remove backlog limit while processings requests
If the backlog limit is kept two cases of deadlocks may be
encountered when streaming over TCP. Without the backlog
limit this deadlocks can not happen, at the expence of
memory usage.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=737631
2014-09-30 12:22:49 +02:00
Ognyan Tonchev 17f5785638 rtsp-client: do not free main context before rtsp watch
https://bugzilla.gnome.org/show_bug.cgi?id=737110
2014-09-24 10:42:16 +03:00
Branko Subasic 2218510cae rtsp-*: Treat sending packets to clients as keepalive
As long as gst-rtsp-server can successfully send RTP/RTCP data to
clients then the client must be reading. This change makes the server
timeout the connection if the client stops reading.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=736647
2014-09-24 10:37:59 +03:00
Branko Subasic 733ef1162b rtsp-client: Allow backlog to grow while expiring session
Allow the send backlog in the RTSP watch to grow to unlimited size while
attempting to bring the media pipeline to NULL due to a session
expiring.  Without this change the appsink element cannot change state
because it is blocked while rendering data in the new_sample callback.
This callback will block until it has successfully put the data into the
send backlog. There is a chance that the send backlog is full at this
point which means that the callback may block for a long time, possibly
forever. Therefore the media pipeline may also be prevented from
changing state for a long time.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=736647
2014-09-24 10:37:49 +03:00
Edward Hervey 980553547d rtsp-client: Make old compilers happy
rtsp-client.c:2553:50: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

Just in case that guint8 doesn't fit in a pointer. Just in case ...
2014-09-22 09:30:39 +02:00
Göran Jönsson 23b9d8fbb0 client: raise the backlog limits before pausing
We need to raise the backlog limits before pausing the pipeline or else
the appsink might be blocking in the render method in wait_backlog() and
we would deadlock waiting for paused.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=736322
2014-09-16 11:41:52 +02:00
Göran Jönsson ebd9be59fe client: make define for the WATCH_BACKLOG
See https://bugzilla.gnome.org/show_bug.cgi?id=736322
2014-09-16 11:29:38 +02:00
Wim Taymans 0292be09ea client: simplify session transport handling
link/unlink of the transport in a session was done to keep track of all
TCP transports and to send RTP/RTCP data to the streams. We can simplify
that by putting all the TCP transports in a hashtable indexed with the
channel number.

We also don't need to link/unlink the transports when we pause/resume
the streams. The same effect is already achieved when we pause/play the
media. Indeed, when we pause the media, the transport is removed from
the media and the callbacks will not be called anymore.

See https://bugzilla.gnome.org/show_bug.cgi?id=736041
2014-09-16 10:46:13 +02:00
Wim Taymans ea5d4cfc7e stream-transport: make method to handle received data
Make a method to handle the data received on a channel. It sends the
data to the stream of the transport on the RTP or RTCP pads based on
the channel number.
2014-09-16 10:45:20 +02:00
Srimanta Panda 376488d8c7 rtsp-media: Make sure that sequence numbers are monotonic after pause
The sequence number is not monotonic for RTP packets after pause. The
reason is basepayloader generates a randon sequence number when the
pipeline goes from ready to pause. With this fix generation of sequence
number will be monotonic when going from pause to play request.

https://bugzilla.gnome.org/show_bug.cgi?id=736017
2014-09-12 17:29:30 +03:00
Göran Jönsson 09bf2025f8 rtsp-client: Protect saved clients watch with a mutex
Fixes a crash when close() is called while merging clients
in handle_tunnel(). In that case close() would destroy the
watch while it is still being used in handle_tunnel().

https://bugzilla.gnome.org/show_bug.cgi?id=735570
2014-09-04 10:35:56 +03:00
Sebastian Dröge 1b47b6d9b0 rtsp-stream: Remove the multicast group udp sources when removing from the bin 2014-08-25 10:39:04 +03:00
Sebastian Dröge 6ba5ca447f rtsp-media: Query position and stop time only on the RTP parts of the pipeline
The RTCP parts, in specific the RTCP udpsinks, are not flushed when
seeking and will always continue counting the time. This leads to
the NPT after a backwards seek to be something completely different
to the actual seek position.

https://bugzilla.gnome.org/show_bug.cgi?id=732644
2014-08-12 10:54:12 +03:00
Arun Raghavan e297dd1fee signals: Fix copy-pasto in target-state signal offset 2014-08-04 14:16:26 +05:30
Sebastian Dröge 3159b374b9 rtsp-stream: Listen on the multicast group for RTP/RTCP packets
When a UDP multicast transport is used it is expected that the server listens
for RTP and RTCP packets on the multicast group with the corresponding port.
Without this we will never get RTCP packets from clients in multicast mode.

https://bugzilla.gnome.org/show_bug.cgi?id=732238
2014-07-22 14:26:49 +02:00
Hyunjun Ko a8e604355c media: correct misspelled words in description
https://bugzilla.gnome.org/show_bug.cgi?id=733244
2014-07-16 12:50:48 +01:00
Wim Taymans ecde0051db server: implement client REMOVE filter 2014-07-10 17:10:06 +02:00
Wim Taymans ced406cc28 client: expose _close() method
Expose a previously internal close method to close the client
connection.
2014-07-10 17:05:13 +02:00
Wim Taymans 301585b30f session-pool: signal session-removed outside of the lock
Release the lock before emiting the session-removed signal.
2014-07-10 12:20:15 +02:00
Wim Taymans 945c93fde0 filter: Release lock in filter functions
Release the object lock before calling the filter functions. We need to
keep a cookie to detect when the list changed during the filter
callback. We also keep a hashtable to make sure we only call the filter
function once for each object in case of concurrent modification.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732950
2014-07-10 11:36:55 +02:00
Ognyan Tonchev 6543082d2b client: check if watch is set in handle_teardown()
The unit tests run without a watch
2014-07-09 16:17:00 +02:00
Ognyan Tonchev e0bc97e40c client: keep ref to client for the session removed handler
This extra ref will be dropped when all client sessions have been
removed. A session is removed when a client sends teardown, closes its
endpoint of the TCP connection or the sessions expires.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732226
2014-07-09 16:16:50 +02:00
Wim Taymans 5aec4af1b9 client: manage media in session as a last step
Once we manage a media in a session, we can't unmanage it anymore
without destroying it. Therefore, first check everything before we
manage the media, otherwise if something is wrong we have no way to
unmanage the media.
If we created a new session and something went wrong, remove the session
again. Fixes a leak in the unit test.
2014-07-08 14:46:13 +02:00
Wim Taymans 99f670d8bc rtsp: fix for MIKEY api change 2014-07-02 16:04:53 +02:00
Wim Taymans 72a57e792f client: free watch context only once
The watch context is freed when the source is destroyed. Avoids
a CRITICAL when we try to unref the context twice.
2014-07-01 16:12:13 +02:00
Wim Taymans 517bb78ae3 client: fix build 2014-07-01 15:02:15 +02:00
Wim Taymans 5e2afcefdd client: protect sessions with lock
Protect the list of sessions with the lock.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732226
2014-07-01 14:41:14 +02:00
Wim Taymans fe081e7301 Client: keep a ref to the session
Don't just keep a weak ref to the session objects but use a hard ref. We
will be notified when a session is removed from the pool (expired) with
the new session-removed signal.
Don't automatically close the RTSP connection when all the sessions of
a client are removed, a client can continue to operate and it can create
a new session if it wants. If you want to remove the client from the
server, you have to use gst_rtsp_server_client_filter() now.

Based on patch from Ognyan Tonchev <ognyan.tonchev at axis.com>

See https://bugzilla.gnome.org/show_bug.cgi?id=732226
2014-07-01 12:28:41 +02:00
Wim Taymans 964ca3c988 session-pool: add session-removed signal
Add a signal to be notified when a session is removed from the pool.
2014-06-30 15:14:34 +02:00
Evan Nemerson 41d1ef7ed3 Make rtsp-server.h a single-include header, use it for G-I
https://bugzilla.gnome.org/show_bug.cgi?id=732411
2014-06-30 09:45:11 +02:00
Wim Taymans db95746f6b stream: crypto can be NULL 2014-06-27 16:55:07 +02:00
Evan Nemerson cecc2cb4ff introspection: add missing allow-none annotations
https://bugzilla.gnome.org/show_bug.cgi?id=730952
2014-06-26 19:08:56 +02:00
Evan Nemerson 34e6ac3b9f introspection: add (nullable) annotations to return values
https://bugzilla.gnome.org/show_bug.cgi?id=730952
2014-06-26 19:08:16 +02:00
Evan Nemerson d08b46f4b7 gi: improve annotations
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=730953
2014-06-24 09:48:45 +02:00
Wim Taymans 661f4d928f signals: use generic marshal function
Use the generic C marshal function.
Use more explicit type instead of G_TYPE_POINTER
2014-06-24 09:43:44 +02:00
Wim Taymans aa44c03439 context: add type macro 2014-06-24 09:42:47 +02:00
Wim Taymans d676c56888 sdp: hide key length defines
They don't have a namespace.
2014-06-24 09:34:50 +02:00
Aleix Conchillo Flaqué 32432b5c61 mikey: add different key length parameters
Add encryption and authentication key length parameters to MIKEY. For
the encoders, the key lengths are obtained from the cipher and auth
algorithms set in the caps. For the decoders, they are obtained while
parsing the key management from the client.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=730472
2014-06-19 16:06:27 +02:00
Ognyan Tonchev f2b1aa8c81 client: ref the context until rtsp watch is alive
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=731569
2014-06-18 15:23:15 +02:00
Ognyan Tonchev 9715252588 client: Destroy the rtsp watch after connection close 2014-06-18 15:21:23 +02:00