Commit graph

139 commits

Author SHA1 Message Date
Tim-Philipp Müller
54a8c6bddf rtsp-token: add some API to set fields from bindings
The existing functions are all vararg-based and as such
not usable from bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=787073
2018-01-18 22:37:57 +00:00
Tim-Philipp Müller
4e048f7b8a tests: fix indentation
Fix and "fix".
2018-01-13 15:02:48 +00:00
Tim-Philipp Müller
d0a4ddc2bb tests: rtspserver: fix another ref leak
Even if this didn't show up in valgrind.
2018-01-13 14:58:55 +00:00
Tim-Philipp Müller
9238b7e19a tests: rtspclientsink: fix leak 2018-01-13 14:58:00 +00:00
Branko Subasic
3d860913c6 test: rtspserver: plug memory leak in test_no_session_timeout
In test_no_session_timeout, unref the rtsp session object when the
test is done.

https://bugzilla.gnome.org/show_bug.cgi?id=792127
2018-01-13 14:18:47 +00:00
Patricia Muscalu
abeb896232 check/media: Add seekability test case: not all streams are active
Media contains two streams but only one is complete and prepared
for playing.

https://bugzilla.gnome.org/show_bug.cgi?id=790674
2017-11-27 07:58:42 +01:00
Edward Hervey
bad6f5690a check: Add seekability testing on medias
Make sure that once GstRTSPMedia are prepared they returned
the expected seekability results

https://bugzilla.gnome.org/show_bug.cgi?id=790674
2017-11-25 07:54:29 +01:00
Patricia Muscalu
de930f2e4d check/media: Fix thread pool leak.
Change-Id: I0f92b1caca0ee518ae64a7dacfbd28a214c3eea1

https://bugzilla.gnome.org/show_bug.cgi?id=790674
2017-11-24 10:52:36 +01:00
Edward Hervey
90ca7f8b31 check/media: Check that prepared media can provide a SDP
Whenever a RTSPMedia is prepared, it should be able to provide a SDP
2017-11-22 12:24:38 +01:00
Edward Hervey
2386e91c36 rtsp-media: Handle multiple dynamic elements
If we have more than one dynamic payloader in the pipeline, we need
to wait until the *last* one emits 'no-more-pads' before switching
to PREPARED.

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

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

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

https://bugzilla.gnome.org/show_bug.cgi?id=785058
2017-11-15 17:20:33 +02:00
Thibault Saunier
fe8a9bc6d5 meson: Fix building tests and activate them again 2017-06-07 15:36:12 -04:00
Thibault Saunier
c9e1346842 meson: Do not use path separator in test names
Avoiding warnings like:

    WARNING: Target "elements/audioamplify" has a path separator in its name.
2017-06-07 12:55:41 -04:00
Patricia Muscalu
f47e6ab9f6 rtsp-stream: fixed segmenation fault in _get_server_port()
Calling function gst_rtsp_stream_get_server_port() results in
segmenation fault in the RTP/RTSP/TCP case.
Port that the server will use to receive RTCP makes only
sense in the UDP case, however the function should handle
the TCP case in a nicer way.

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

https://bugzilla.gnome.org/show_bug.cgi?id=776343
2016-12-22 14:21:54 +02:00
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
Tim-Philipp Müller
7508442292 tests: try to avoid using the same ports in different tests
Causes problems with client multicast tests otherwise if
tests are run in parallel.

https://bugzilla.gnome.org/show_bug.cgi?id=773640
2016-10-31 12:05:25 +00:00
Tim-Philipp Müller
fd6beb871a tests: client: use fail_unless_equals_foo() for better failure reporting 2016-10-28 17:50:59 +01:00
Sebastian Dröge
958f4a47ec tests: Fix compilation 2016-09-05 13:40:59 +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
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
Josep Torra
e9cab27226 build: silence error about pthread for 'make check' in osx
Fixes "clang: error: argument unused during compilation: '-pthread'"
2016-08-26 21:56:13 +02:00
Jake Foytik
fe5f8077c1 rtsp-stream: Fix crash on cleanup with shared media and multiple udpsrc
- Unicast udpsrcs are now managed in a hash table. This allows for proper cleanup in with shared streams and fixes a memory leak.
 - Unicast udpsrcs are now properly cleaned up when shared connections exit. See the update_transport() function.
 - Create unit test for shared media.

https://bugzilla.gnome.org/show_bug.cgi?id=764744
2016-04-29 11:49:14 +03:00
Patricia Muscalu
422d3a3002 stream tests: added new tests
Test a case when the address pool only contains multicast addresses
and the client is requesting unicast udp.
Added tests for multicast ports allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=757488
2016-03-05 10:08:40 +02:00
Jan Schmidt
b96e4e16a7 rtspsink: Fix some leaks in rtspclientsink and the unit test.
https://bugzilla.gnome.org/show_bug.cgi?id=762525
2016-02-24 02:12:08 +11:00
Patricia Muscalu
a6367c5971 tests: unit test fixes
Removed port allocation test from the media suite.
The port allocation failure is now in the stream suite.
rtspserver:
Make sure that the media is suspended after the DESCRIBE request
before reconfiguring the UDP sinks.
rtspclientsink:
In the RECORD case we have to set async property to false
for the appsink element in the test in order to make sure
that the media pipeline doesn't hang in start_preroll().

https://bugzilla.gnome.org/show_bug.cgi?id=757488
2016-02-23 17:05:15 +02:00
Thiago Santos
3328461738 tests: extend the AM_TESTS_ENVIRONMENT from check.mak
To get the CK_DEFAULT_TIMEOUT defined for all tests

Also removes a 120 seconds timeout that was set as default
explicitly in this module

https://bugzilla.gnome.org/show_bug.cgi?id=761472
2016-02-05 20:03:01 -03: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
9e92a0307c rtsp-client: Report RECORD and ANNOUNCE as supported in the OPTIONS 2015-11-17 01:12:28 +11:00
David Svensson Fors
2178a7c871 rtspserver: Add udp-mcast transport SETUP test
Refactor utility functions in the test file so they can handle
more than UDP and TCP as lower transport.

https://bugzilla.gnome.org/show_bug.cgi?id=756969
2015-10-22 19:31:59 +03:00
Francisco Velazquez
418e1fe090 media-test: Removing unnecessary assertion
https://bugzilla.gnome.org/show_bug.cgi?id=753385
2015-08-13 18:48:51 -04:00
Nicolas Dufresne
3667e71b2f media-test: Test for multiple dynamic payload
https://bugzilla.gnome.org/show_bug.cgi?id=753385
2015-08-08 11:13:58 -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
Tim-Philipp Müller
550348738c tests: Use AM_TESTS_ENVIRONMENT
Needed by the new automake test runner and the
current version of the common submodule.
2015-05-27 17:04:41 +01:00
Tim-Philipp Müller
753f8a8ac9 tests: define GST_CHECK_TEST_ENVIRONMENT_BEACON
Make sure the test environment is set up.

https://bugzilla.gnome.org//show_bug.cgi?id=747624
2015-04-23 17:27:40 +01:00
Tim-Philipp Müller
896767b041 Fix double semicolons 2015-03-10 09:39:22 +00: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
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
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
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
Linus Svensson
df5850f966 tests: Test setup with tcp transport
https://bugzilla.gnome.org/show_bug.cgi?id=739112
2014-11-07 12:42:48 +01:00
Branko Subasic
2745e6f654 tests: Extend unit test timeout to accomodate for valgrind
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=736647
2014-09-24 10:38:08 +03:00
Ognyan Tonchev
bfd498585a client tests: send teardown to cleanup session 2014-07-09 16:17:00 +02:00
Ognyan Tonchev
f78886e7cb server tests: send teardown to cleanup session 2014-07-09 16:17:00 +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
Ognyan Tonchev
fc06329e87 stream tests: Make sure we get right multicast address from stream
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=731577
2014-06-18 15:26:27 +02:00
Wim Taymans
b8165dbd60 tests: add and remove pads only once
In this test we simulate a dynamic pad by watching the caps event.
Because of renegotiation in the base payloader now, this caps is sent
multiple times but we can only deal with 1 invocation, use a variable to
only 'add and remove' the pad once.
2014-05-09 15:13:54 +02:00
Tim-Philipp Müller
aec1b42c4e tests: add unit test for correct handling of Require headers
https://bugzilla.gnome.org/show_bug.cgi?id=729426
2014-05-09 13:55:27 +01:00