Commit graph

903 commits

Author SHA1 Message Date
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
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