Commit graph

1218 commits

Author SHA1 Message Date
Jan Schmidt
b04856f0cf examples: Add a simple example of network synch for live streams.
An example server and client that works for synchronising live streams
only - as it can't support pause/play.
2015-03-03 11:53:16 +11: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
a56404a45a tests: rtspserver: rename shadowed variable
We have two different 'sink' variables here,
rename one of them for clarity.
2015-02-08 18:05:50 +00:00
Tim-Philipp Müller
57c21c8f9e rtsp-client: fix awkward if clause 2015-02-08 12:08:36 +00:00
Tim-Philipp Müller
6dbffce319 examples: test-uri: improve uri argument handling and accept file names
Print an error if the argument passed is not a URI and can't
be converted into one, or no arguments have been provided.
2015-02-06 19:34:17 +00:00
Tim-Philipp Müller
a862d632b7 examples: test-uri: don't remove mount point after 10 seconds
It's very irritating when trying to test stuff repeatedly
and serves no real purpose other than showing that it can
be done.
2015-02-06 19:16:32 +00:00
Tim-Philipp Müller
5377dd2b78 examples: add new test-record to .gitignore 2015-02-06 10:02:32 +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
Sebastian Dröge
aa1feab874 test-record: Set latency for playback-style example to 2s instead of 200ms 2015-02-06 09:42:50 +01:00
Tim-Philipp Müller
6e5b156b0d tests: add some unit tests for ANNOUNCE and RECORD
https://bugzilla.gnome.org/show_bug.cgi?id=743175
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
18d3244fd0 test-record: Use GOptionContext to parse the server port and take the pipeline from the commandline 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
634abb9906 examples: Don't call gst_init() and gst_get_option_group()
The latter calls the former at the appropriate time.
2015-01-17 10:30:21 +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
Stefan Sauer
d535cd8cbb Automatic update of common submodule
From f2c6b95 to bc76a8b
2015-01-12 16:14:12 +01:00
Tim-Philipp Müller
e2b31dd9b4 Fix 'make check' from top-level directory 2014-12-31 13:04:57 +00:00
Nirbheek Chauhan
e0d3807cbb examples: Add command-line parsing and take a 'port' argument
This allows users to run multiple servers on different ports for testing.

Only done for examples that actually take arguments and hence are capable of
outputting different streams for each instance on each port.

https://bugzilla.gnome.org/show_bug.cgi?id=742115
2014-12-30 16:04:14 +00: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
fc6811697c Automatic update of common submodule
From ef1ffdc to f2c6b95
2014-12-18 10:56:44 +01:00
Sebastian Rasmussen
b6e4587afd configure: add --disable-examples switch
https://bugzilla.gnome.org/show_bug.cgi?id=741678
2014-12-18 09:36:51 +00:00
Matthew Waters
fa4d8db7ea examples: add a retransmisison example implementing RFC4588
Currently only SSRC-multiplexed rtx streams are supported
2014-12-16 16:46:34 +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
Edward Hervey
6ba01ef0ef Automatic update of common submodule
From 7bb2bce to ef1ffdc
2014-11-27 17:13:05 +01:00
Wim Taymans
bd8b2d3fb9 client: refactor cleanup of cached media 2014-11-07 12:48:53 +01:00
Linus Svensson
1a004c5d46 tests: Remove FIXME
The session leak is now fixed, lets remove those FIXME comments.
2014-11-07 12:42:48 +01:00
Linus Svensson
d1ea01d4c6 tests: Test to setup two sessions on one connection
https://bugzilla.gnome.org/show_bug.cgi?id=739112
2014-11-07 12:42:48 +01:00