Commit graph

271 commits

Author SHA1 Message Date
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
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
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
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
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 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
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
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
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
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
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
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
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
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
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
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
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
Sebastian Dröge
a93ed7e5d4 rtsp-media: Use flags to distinguish between PLAY and RECORD media 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
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
Sebastian Dröge
8ae3566591 rtsp-media: Some minor cleanup 2014-12-16 16:46:06 +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
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
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
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
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
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
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
e327af8a26 media: fix confusing comment 2014-06-13 16:46:06 +02:00
Ognyan Tonchev
0fb7922e9b media: Make suspend()/unsuspend() virtual
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=730109
2014-05-15 15:42:18 +02:00
Ognyan Tonchev
7cce8e2dde media: Do not stop thread twice if default_prepare() fails 2014-04-21 12:21:37 +02:00
Ognyan Tonchev
80474e9e5e media: make media_prepare virtual
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=728029
2014-04-12 06:04:13 +02:00
Ognyan Tonchev
da19a3c21a media: stop the thread in more error cases 2014-04-12 05:57:00 +02:00
Ognyan Tonchev
de2a70bb10 media: allow NULL as the thread
Use the default context whan passing a NULL thread.
2014-04-12 05:55:02 +02:00