Commit graph

1715 commits

Author SHA1 Message Date
Seungha Yang eba4e7e989 tests: nvenc: Add test caps negotiation with interlace-mode field 2019-08-06 15:03:22 +00:00
Sebastian Dröge 28b0be4036 rtptransceiver: Remove direction setter and vfunc and replace it by a property
It was changed from a function to a property in the latest WebRTC spec.
2019-08-06 12:22:21 +00:00
Yeongjin Jeong dae6e7964c tests: x265enc: Add tiny resolution encoding check
Add the tiny picture encoding test case allowed in x265
2019-07-31 18:13:31 +09:00
Yeongjin Jeong 8f2c53f6f5 x265enc: Specify max CU size depending on input resolution
x265 does not allow user to configure a picture size smaller than
at least one CU size, and maxCUSize must be 16, 32, or 64.
Therefore, the CU size must be set according to the input resolution,
and the input resolution can not be less than 16.
2019-07-31 18:13:28 +09:00
Ederson de Souza f9a16731d1 avtp: CVF - Do not infinite loop trying to fragment zero sized NAL unit
Zero sized NAL-units should not happen, but if they do, do not infinite
loop. Added also a unit test for this case.
2019-07-30 11:34:31 -07:00
Seungha Yang 367e742e5d nvcodec: Drop system installed cuda.h dependency
... and add our stub cuda header.

Newly introduced stub cuda.h file is defining minimal types in order to
build nvcodec plugin without system installed CUDA toolkit dependency.
This will make cross-compile possible.
2019-07-23 16:32:31 +09:00
Seungha Yang c18fda03d9 nvdec,nvenc: Port to dynamic library loading
... and put them into new nvcodec plugin.

* nvcodec plugin
Now each nvenc and nvdec element is moved to be a part of nvcodec plugin
for better interoperability.
Additionally, cuda runtime API header dependencies
(i.e., cuda_runtime_api.h and cuda_gl_interop.h) are removed.
Note that cuda runtime APIs have prefix "cuda". Since 1.16 release with
Windows support, only "cuda.h" and "cudaGL.h" dependent symbols have
been used except for some defined types. However, those types could be
replaced with other types which were defined by "cuda.h".

* dynamic library loading
CUDA library will be opened with g_module_open() instead of build-time linking.
On Windows, nvcuda.dll is installed to system path by CUDA Toolkit
installer, and on *nix, user should ensure that libcuda.so.1 can be
loadable (i.e., via LD_LIBRARY_PATH or default dlopen path)
Therefore, NVIDIA_VIDEO_CODEC_SDK_PATH env build time dependency for Windows
is removed.
2019-07-08 10:37:46 +00:00
Matthew Waters 8bad9d5d8a tests/vulkan: fix copyright name 2019-07-05 16:20:29 +10:00
Matthew Waters 58f203844d vulkan/window: add property for the parent display 2019-07-05 16:20:05 +10:00
Matthew Waters fda9b57dbe vulkan/device: add property for the parent instance 2019-07-05 16:13:13 +10:00
Jan Schmidt 15f149a990 tests: Add h264parser SEI checks
Add some tests around SEI parsing.
2019-07-05 00:17:59 +10:00
Ederson de Souza a6fc6558eb tests: Add AVTP CVF depayloader tests
In these tests, some specially crafted buffers are sent to the
depayloader, simulating some scenarios and checking what comes out from
it.
2019-07-03 09:59:35 -07:00
Ederson de Souza b34acc0c8c tests: Add AVTP CVF payloader tests
In these tests, some specially crafted buffers are sent to the
payloader, simulating some scenarios and checking what comes out from
it.
2019-07-03 09:59:35 -07:00
Andre Guedes c427fd1aec tests: Add AVTP source tests
This patch adds test cases for the AVTP source element. For now, only
properties get() and set() are covered.
2019-07-03 09:59:35 -07:00
Andre Guedes e0deddbcf6 tests: Add AVTP sink tests
This patch adds test cases for the AVTP sink element. For now, only
properties get() and set() are covered.
2019-07-03 09:59:35 -07:00
Andre Guedes 82b6b0faa7 tests: Add AAF depayloader tests
This patch adds test cases for the AAF depayloader element covering the
basic functionalities.
2019-07-03 09:59:35 -07:00
Andre Guedes e09470fac8 tests: Add AAF payloader tests
This patch adds the infrastructure to test AVTP plugin elements. It also
adds a test case to check avtpaafpay element basic functionality. The
test consists in setting the element sink caps and properties, and
verifying if the output buffer is set as expected.
2019-07-03 09:59:35 -07:00
Matthew Waters 3c164f4de2 tests/vkcolorconvert: remove extra instance/device creation
It's unnecessary.
2019-06-24 16:23:29 +10:00
Matthew Waters 0cb416db11 vkbuffermemory: report requested size of the memory
Rather than using Vulkan's much larger aligned sizes. Fixes multi-planer
video with the GstVideoFrame API.
2019-06-20 01:41:56 +10:00
Matthew Waters 5363b30f6c vulkan: add a color conversion element
Currently converts between all 4-component RGBA/RGBx formats.
2019-06-20 01:41:56 +10:00
Seungha Yang 7b8d198712 tests: hls: Add a test case for EXT-X-MAP tag
https://bugzilla.gnome.org/show_bug.cgi?id=776928
2019-06-18 07:14:28 +00:00
Seungha Yang e779160434 tests: Enable hls m3u8 unit test with meson build 2019-06-18 07:14:28 +00:00
Seungha Yang 4e6e6ad0f9 tests: insertbin: Don't use duplicated variable name
../subprojects/gst-plugins-bad/tests/check/libs/insertbin.c(46): warning C4273:
  'mutex': ...

The "mutex" was declared in gstcheck.h already
2019-06-18 06:32:14 +00:00
Tim-Philipp Müller 4ff14c0e74 Remove VDPAU plugin
It's been replaced by NVENC/NVDEC and even NVIDIA doesn't
support VDPAU any longer and hasn't for quite some time.

The plugin has been unmaintained and unsupported for a very
long time, and given the track record over the last 10 years
it seems highly unlikely anyone is going to make it work well,
not to mention adding plumbing for proper zero-copy or
gst-gl integration.

Closes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/828
2019-06-06 18:45:09 +01:00
Matthew Waters e2eea3b3ee tests/vulkan: allow instance creation failures
Usually means that there is no vulkan implementation available.

We skip tests in that case
2019-06-04 09:03:44 +00:00
Matthew Waters 32bde87551 test/vulkan: add simple memory test 2019-06-04 09:03:44 +00:00
Marc Leeman 3ef737605a rtpmanagerbad: add RTP streaming elements
This is a re-implementation of the RTP elements that are submitted in
2013 to handle RTP streams. The elements handle a correct connection
for the bi-directional use of the RTCP sockets.

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

The rtpsink and rtpsrc elements add an URI interface so that streams
can be decoded with decodebin using the rtp:// interface.

The code can be used as follows

```
gst-launch-1.0 videotestsrc ! x264enc ! rtph264pay config-interval=3 ! rtpsink uri=rtp://239.1.1.1:1234

gst-launch-1.0 videotestsrc ! x264enc ! rtph264pay config-interval=1 ! rtpsink uri=rtp://239.1.2.3:5000
gst-launch-1.0 rtpsrc uri=rtp://239.1.2.3:5000?encoding-name=H264 ! rtph264depay ! avdec_h264 ! videoconvert ! xvimagesink

gst-launch-1.0 videotestsrc ! avenc_mpeg4 ! rtpmp4vpay config-interval=1 ! rtpsink uri=rtp://239.1.2.3:5000
gst-launch-1.0 rtpsrc uri=rtp://239.1.2.3:5000?encoding-name=MP4V-ES ! rtpmp4vdepay ! avdec_mpeg4 ! videoconvert ! xvimagesink
```

rtpmanagerbad: add pkg-config
rtpmanagerbad: Rtp should be uppercase
rtpmanagerbad: add G_OS_WIN32 for shielding unix headers
rtpmanagerbad: remove Since from documentation
rtpmanagerbad: rename lib name from nrtp to rtpmanagerbad
rtpmanagerbad: sync meson.build with other modules
rtpmanagerbad: add Makefile.am
rtpmanagerbad: use GstElement to count pads
rtpmanagerbad: use gst_bin_set_suppressed_flags
rtpmanagerbad: check element creation
rtpmanagerbad: post message when trying to access missing rtpbin
rtpmanagerbad: return FALSE with g_return tests
rtpmanagerbad: use gsocket multicast check
rtpmanagerbad: use gst_caps_new_empty_simple iso gst_caps_from_string
rtpmanagerbad: sync with gstrtppayloads.h
rtpmanagerbad: correct media type X-GST
rtpmanagerbad: test if a compatible pad was found
rtpmanagerbad: remove evil copy of GstRTPPayloadInfo
rtpmanagerbad: add gio_dep to meson
rtpmanagerbad: revert to old glib boilerplate

GStreamer 1.16 does not yet support the newer GLib templates, so revert.

rtpmanagerbad: return GST_STATE_CHANGE_NO_PREROLL for live sources

for live sources, NO_PREROLL should be returned for PLAYING->PAUSED and
READY->PAUSED transitions.

rtpmanagerbad: use GstElement pad counting
rtpmanagerbad: just use template name to request pad
rtpmanagerbad: remove commented code
rtpmanagerbad: use funnel to send multiple streams on one socket
rtpmanagerbad: avoid beaches

beaches should only be used during the summer, so rewrite the code to
return explicitly and avoid beaches during the winter.

rtpmanagerbad: add copyright to test code
rtpmanagerbad: g_free is NULL safe
rtpmanagerbad: do not trace rtpbin
rtpmanagerbad: return NULL explitly
rtpmanagerbad: warn when data port is not even

According to RFC 3550, RTP data should be sent on even ports, while RTCP
is sent on the following odd port.

rtpmanagerbad: document port allocation in rtpsink/src
rtpmanagerbad: improve uri description
rtpmanagerbad: add comment re-use socket
rtpmanagerbad: rename gst_object_set_properties_from_uri_query
rtpmanagerbad: loan prop/val setter from rist
rtpmanagerbad: rtpsrc: fix unitialised pointer
rtpmanagerbad: fix silly typo
rtpmanagerbad: test for empty key/value
rtpmanagerbad: rtpsrc: deprecate ssrc collision to INFO
rtpmanagerbad: sync debug with rist
rtpmanagerbad: small strings allocated on stack
rtpmanagerbad: correct rename
rtpmanagerbad: add locking on prop setters/getters

Locking is added because the URI allows to access the properties too.

rtpmanagerbad: allow for RTCP through NAT
rtpmanagerbad: move gio to header file
rtpmanagerbad: free small strings too
rtpmanagerbad: ttl_mc for ttl on dynudpsink
rtpmanagerbad: add comments on the URI registered
rtpmanagerbad: correct macro after file rename
rtpmanagerbad: code style
rtpmanagerbad: handle wrong URIs in setter
rtpmanagerbad: nit URI notation correction

In an URI, the first key/value pair should not have an ampersand, the
parser did not die though.
2019-06-03 20:08:23 +00:00
Alex Ashley 015566daec tests/dash_mpd: take account of Period start in expected timestamps
The start of each segment is relative to the Period start, minus
the presentation time offset.

As specified in section 5.3.9.6 of the MPEG DASH specification:
	The value of the @t attribute minus the value of the
	@presentationTimeOffset specifies the MPD start time of
	the first Segment in the series.

Several tests use a Period@start value of 10 seconds, which either
needs to be taken into account when calculating expected timestamps
or have that attribute removed.

This commit uses a mix of updating the timestamps and removing the
start attribute, so that both the case of its presence and absence
is tested.
2019-06-01 21:25:33 +00:00
Alex Ashley a11f7ed924 dashdemux: include both Period start and presentationTimeOffset in segment start
The start of each segment is relative to the Period start, minus
the presentation time offset.

As specified in section 5.3.9.6 of the MPEG DASH specification:
    The value of the @t attribute minus the value of the
    @presentationTimeOffset specifies the MPD start time of
    the first Segment in the series.

dashdemux was not taking account of presentationTimeOffset and in
some methods was not taking into account the Period start time.
This commit modifies the segment->start value to always be
relative to the MPD start time (zero for VOD,
availabilityStartTime for live streams). This makes all uses of
the segment list consistent.

Fixes #841
2019-06-01 21:25:33 +00:00
Mathieu Duponchelle 1d90a0afc5 tests: add example for injecting MPEG-TS sections 2019-05-30 13:53:05 +00:00
Matthew Waters 62cc5e51d1 tests/webrtc: wait until the SDP has been set before continuing
If we renegotiate, then it is currently possible for an added stream to
be added to webrtcbin before the SDP is complete.  This causes an
internal inconsistency as there is a 'pending sink transceiver' without
a corresponding media section in the sdp.  It also does not have an
associated transport stream and will fail in _connect_input_stream().
2019-05-30 21:33:09 +10:00
Matthew Waters 979daea7f2 tests/webrtc: fix racy test with a prenegotiated data channel
If both data channels become ready simultaneously, then the two integer
read-add-update cycles can execute concurrently and only ever increment
once instead of the required twice.  Use an atomic add instead.
2019-05-30 21:33:09 +10:00
Matthew Waters 177aa22bcd webrtc: Initial support for stream addition/removal
Limitations:
- No transport changes at all (ICE, DTLS)
- Codec changes are untested and probably don't work
- Stream removal doesn't remove transports (i.e. non-bundled transports
  will stay around until webrtcbin is shutdown)
- Unified Plan SDP only. No Plan-B support.
2019-05-30 21:33:09 +10:00
Matthew Waters 015cb75f66 tests/webrtc: a couple of debug/error string fixes 2019-05-30 21:33:09 +10:00
Matthew Waters be35735989 tests/webrtc: rewrite bundle checks for separate validate_sdp passes
Improves reusability
2019-05-30 21:33:09 +10:00
Matthew Waters 2bb1fde47c tests/webrtc: add helper for getting the offer/answer element 2019-05-30 21:33:09 +10:00
Matthew Waters b48e2947bf tests/webrtc: only check audio/video for direction attributes 2019-05-30 21:33:09 +10:00
Matthew Waters bd92b2f7c4 webrtc: fix answer creation with multiple streams and similar caps 2019-05-30 21:26:46 +10:00
Matthew Waters ebb9c3c298 tests/webrtc: factor out sdp validation into a single function 2019-05-30 21:26:46 +10:00
Matthew Waters eb79f95bf8 tests/webrtc: validate number of sdp media using validate_sdp 2019-05-30 21:26:46 +10:00
Matthew Waters 7e1cdbfd4d tests/webrtc: allow multiple validation functions 2019-05-30 21:26:46 +10:00
Matthew Waters 120a40cf25 tests/webrtc: test that duplicate negotiations succeed 2019-05-30 21:26:46 +10:00
Mathieu Duponchelle a1cadd11b8 mpegtsmux: aggregator port 2019-05-19 19:40:48 +00:00
Nirbheek Chauhan 8388a031ab meson: Remove redundant env set operation
This is immediately overriden 4 lines later, and starting with Meso
0.50.1 this will lead to a noisy warning.
2019-04-13 11:34:22 +05:30
Tim-Philipp Müller a94f4064cb tests: h264parse: add minimal unit test for closed caption SEI parsing 2019-04-08 19:21:34 +01:00
Seungha Yang 231c76b0ce tests: Add nvenc unit test 2019-03-10 13:58:38 +09:00
Tim-Philipp Müller 6dad8b7c78 closedcaption: fix leak in line21 decoder
Destroy old decoder instance when shutting down the
element, and also in case the input format changes.

Fix harness/pipeline leak in unit test.
2019-03-08 01:18:39 +00:00
Tim-Philipp Müller 2ab238a4d0 tests: fix bus leak in hls_demux testSeek unit test
We add the signal watch in testSeekPreTestCallback so
remove it in testSeekPostTestCallback and not deep inside
some if clause in some other callback somewhere.
2019-03-08 01:18:39 +00:00
Tim-Philipp Müller 5b68e12d01 .gitignore more things 2019-03-08 01:17:40 +00:00
Mathieu Duponchelle 55abe39d76 line21: fix tests build with autotools 2019-03-06 15:17:24 +01:00