Commit graph

80 commits

Author SHA1 Message Date
Seungha Yang
f62ecc1625 tests: Add CUDA filter unit tests
Adding a test for buffer meta and colorspace conversion

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1633>
2020-10-16 15:56:49 +00:00
Seungha Yang
2b152eae69 videoparsers: Add vp9parse element
Adding vp9parse element to parse various stream information such as
resolution, profile, and so on. If upstream does not provide resolution and/or
profile, this would be useful for decodebin pipeline for autoplugging
suitable decoder element depending on template caps of each decoder element.

In addition, vp9parse element supports unpacking superframe into
single frame for decoders. The vp9 superframe is a frame which consists
of multiple frames (or superframe with one frame is allowed) followed by superframe
index block. Then unpacked each frame will be considered as normal frame
by decoder. The decision for unpacking will be done by downstream element's
"alignment" caps field, which can be "super-frame" or "frame".
If downstream specifies the "alignment" as "frame",
then vp9parse element will split an incoming superframe into single frames
and the superframe index (located at the end of the superframe) data
will be discarded by vp9parse element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1041>
2020-09-10 14:56:52 +00:00
Matthew Waters
aad7ed31e1 vulkan/instance: add vulkan API version selection and checking
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1341>
2020-06-21 09:30:29 +00:00
Seungha Yang
57c8ad1dbc tests: wasapi2: Add unit test for reusing wasapisrc
Test state change between playing and null and playing again

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1264>
2020-06-08 03:10:05 +00:00
Tim-Philipp Müller
690f8d30ac tests: fix meson test env setup to make sure we use the right gst-plugin-scanner
If core is built as a subproject (e.g. as in gst-build), make sure to use
the gst-plugin-scanner from the built subproject. Without this, gstreamer
might accidentally use the gst-plugin-scanner from the install prefix if
that exists, which in turn might drag in gst library versions we didn't
mean to drag in. Those gst library versions might then be older than
what our current build needs, and might cause our newly-built plugins
to get blacklisted in the test registry because they rely on a symbol
that the wrongly-pulled in gst lib doesn't have.

This should fix running of unit tests in gst-build when invoking
meson test or ninja test from outside the devenv for the case where
there is an older or different-version gst-plugin-scanner installed
in the install prefix.

In case no gst-plugin-scanner is installed in the install prefix, this
will fix "GStreamer-WARNING: External plugin loader failed. This most
likely means that the plugin loader helper binary was not found or
could not be run. You might need to set the GST_PLUGIN_SCANNER
environment variable if your setup is unusual." warnings when running
the unit tests.

In the case where we find GStreamer core via pkg-config we use
a newly-added pkg-config var "pluginscannerdir" to get the right
directory. This has the benefit of working transparently for both
installed and uninstalled pkg-config files/setups.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1302>
2020-05-27 15:17:12 +01:00
Stéphane Cerveau
298e22e217 tests: fix nalutils file name
The filename was too long causing issues with ccache

Fix https://gitlab.freedesktop.org/gstreamer/gst-build/-/issues/97

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1281>
2020-05-19 15:39:50 +02:00
Jan Alexander Steffens (heftig)
055de3cdff mpegtsdemux: tests: Add simple tests for tsparse and tsdemux
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1274>
2020-05-18 14:11:40 +00:00
Matthew Waters
ddc7563ac9 tests/ccconverter: test the time codes are successfully passed through
Where time codes are not stored in the caption data themselves

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1116>
2020-05-11 12:30:31 +00:00
Matthew Waters
a2b0c81900 tests: add libnice to the plugin loading whitelist
Allows webrtcbin to actually unit test some negotiation scenarios.
Without this, only two of the possible 33 tests are being executed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1240>
2020-05-06 02:53:27 +00:00
Georg Ottinger
13d55627f0 libs: parser: Adds AV1 parser.
This is the first version of AV1 parser implementation in GStreamer.

A test file is also provied with several test cases. It contains a
test sequence taken from the aom testdata set, with one key and one
inter-frame. The same test sequence has been reencoded to annexb.

testdata is taken from aom testdata (and reencoded for annexb) as well
as handcrafted testcases. Once reference testdata is available, the
testing could be imporved aswell.

Co-author: He Junyan <junyan.he@hotmail.com>
Co-author: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/785>
2020-05-01 19:55:41 +00:00
Vedang Patel
2510052d12 tests: add tests for functions in gstavtpcrfutil.c
This adds tests for the helper functions in ext/avtp/gstavtpcrfutils.c
2020-04-30 23:31:25 +00:00
Vedang Patel
4b6a290beb tests: Add the tests for CRF Checker element
This adds tests to ensure the avtpcrfchecker element validates and drops the
packets which do not match the CRF Synchronization criteria.
2020-04-30 23:31:25 +00:00
Vedang Patel
da810db63d tests: Add tests for GstAvtpCrfBase base class.
This adds tests which test the functions which do not call any external
syscalls and the properties.
2020-04-30 23:31:25 +00:00
Vedang Patel
551258b2c4 tests: Add tests for CRF Synchronizer element
This adds tests to validate whether the avtpcrfsync element applies the
adjustment correctly.

Also, the infrastructure to include additional source files while compiling
is added. This change is exactly the same as the one in gst-plugins-good.
2020-04-30 23:31:25 +00:00
Olivier Crête
1342e4ba43 rist: Add test for rtp ext code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1153>
2020-04-30 18:31:31 +00:00
Seungha Yang
c19d21f464 tests: mfvideosrc: Add unit test
Simple test for reuse scenario

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/760>
2020-04-28 14:37:31 +00:00
Seungha Yang
f94157c949 nalutils: Introduce NAL writer helper methods
Add helper methods for writing h264 and h265 NAL
2020-03-30 07:59:10 +00:00
Yeongjin Jeong
c8df00a423 tests: vp9parser: Add test parsing superframe 2020-03-02 01:55:33 +09:00
Nirbheek Chauhan
1c0f75bc90 tests: Fix minor bugs in usage of config.h 2020-01-14 09:23:03 +05:30
Stéphane Cerveau
e8fb7fc046 zxing: initial plugin revision
Status:
- scan QR code with low resolution
- Scan barcode with high resolution
2020-01-07 17:24:50 +00:00
Stéphane Cerveau
f22e516639 test: add h265parse test 2020-01-07 08:55:28 +00:00
Seungha Yang
85233eb968 tests: Add simple d3d11colorconvert unit test 2019-12-28 05:43:44 +00:00
Yeongjin Jeong
663aeb2131 svthevcenc: Add new SVT-HEVC encoder element
The SVT-HEVC (Scalable Video Technology[0] for HEVC) Encoder is an
open source video coding technology[1] that is highly optimized for
Intel Xeon Scalable processors and Intel Xeon D processors.

[0] https://01.org/svt
[1] https://github.com/OpenVisualCloud/SVT-HEVC
2019-12-20 15:43:55 +00:00
Matthew Waters
a7c2aa473f vulkan/image: don't rely on weak-ref notifies for views
Weak refs don't quite work here correctly as there is always a race with
taking the lock between find_view() and remove_view().  If find_view()
returns a view that is going to removed by remove_view() then we have an
interesting situation.

In theory, the number and type of views for an image are relatively
constant and should not change one they've been set up which means that
it is actually practical to perform pool-like reference counting here
where the image holds a pool of different views that it can give out
as necessary.
2019-11-28 23:27:21 +00:00
Jan Schmidt
24cfd608c6 switchbin: Add a basic unit-test
Test the basic function of a switchbin - that it correctly
selects between 2 processing paths based on caps
2019-11-13 10:15:32 +00:00
Ederson de Souza
fe8e2a001c debugutils: clockselect, a pipeline that enables clock selection
Sometimes, one wants to force a clock on some pipelines - for instance,
when testing TSN related pipelines, one usually uses GstPtpClock or
CLOCK_REALTIME (assuming system realtime clock is in sync with network
one). Until now, one needs to write an application for that - not
difficult, but quite boring if one just wants to test something. This
patch presents a new element to help that: clockselect.

clockselect is a pipeline with two properties to select a clock. One
property, "clock-id", enables one to choose between "monotonic",
"realtime", "ptp" or "default" clock - where default keeps pipeline
behaviour of choosing a clock based on its elements. The other property,
"ptp-domain" gives one the choice of which PTP domain should be used.

Some very simple tests also added for this new element.
2019-11-06 08:58:53 -08:00
Aaron Boxer
8ca7f75c01 jpeg2000parse: add unit test 2019-11-05 21:21:51 +00:00
Matthew Waters
82e86573b8 vulkan: implement command buffer reuse
Using a similar design for reference counting as
GstBuffer/GstBufferPool.
2019-09-19 02:01:35 +00:00
Matthew Waters
2af2402880 vulkan: add device provider implementation 2019-09-17 13:02:44 +10:00
Seungha Yang
a572bddd2f tests: nvdec: Add test runtime downstream reconfigure
Add test case for output format change
2019-08-30 01:19:17 +09: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
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
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
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
e779160434 tests: Enable hls m3u8 unit test with meson build 2019-06-18 07:14:28 +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
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
Seungha Yang
231c76b0ce tests: Add nvenc unit test 2019-03-10 13:58:38 +09:00
Mathieu Duponchelle
156865541f closedcaption: add line21 encoder
This element acts as a counterpart of line21encoder.

Also adds a simple test validating each element using the
other.
2019-03-06 11:29:20 +01:00
Alex Ashley
d2d912f34a tests: curlhttpsrc: add unit tests
Based upon the souphttpsrc tests, add unit tests for the curlhttpsrc
element. The souphttpsrc tests are able to use an HTTP server that
is provided as part of the soup library. This does not exist in the
curl library, therefore these tests provide a very simple HTTP server
using the GIO library.

These curlhttpsrc tests contain one new test that does not come from
the souphttpsrc tests. The test_multiple_http_requests test tries to
reproduce the way in which GstAdaptiveDemux makes use of URI source
elements. GstAdaptiveDemux creates a bin with the httpsrc element
and a queue element and sets the locked state of that bin to TRUE,
so that it does not follow the state transitions of its parent. It
then moves this bin to the PLAYING state to start each download and
back to READY when the download completes.
2019-02-19 17:55:12 +00:00
Nirbheek Chauhan
572a283b4a meson: orc-test is not required
This is especially never available on iOS.
2019-01-31 15:29:24 +05:30
Seungha Yang
a9c61e467a meson: Add support orc fallback
Allow fallback to orc subproject if any, and add missing orc version check.
Additionally 'dependencies' keyword is removed from find_library,
because it's invalid keyword for find_library.
2019-01-30 19:55:05 +09:00