Commit graph

1918 commits

Author SHA1 Message Date
U. Artie Eoff
48474d3cf7 tests: skip cc tests if plugin is disabled
Skip the closedcaption element tests if the
closedcaption option is disabled at compile
time (i.e. -Dclosedcaption=disabled).

v2: rename pangocairo_dep to avoid conflict
with later definition in ext/ttml/meson.build
as suggested by @tpm.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1388>
2021-09-15 10:04:14 -07:00
U. Artie Eoff
8b1634930f tests: skip aes test if elements not built
In ext/aes/meson.build, the aes_dep will return
not-found if -Daes=disabled, regardless of whether
openssl is found or not.  Thus, we don't need a
separate check for the option.  This will also
ensure that aes_dep is always defined and we can
use it in the tests/check/meson.build unit.

Fixes #1660

v2: handle -Daes=disabled, too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2522>
2021-09-14 23:15:44 -07:00
Alex Ashley
fd1e75900d dashdemux: copy ContentProtection element including xml namespaces
Commit bc09d8cc changed gstmpdparser to put the entire
<ContentProtection> element in the "value" field, so that DRMs
other than PlayReady could make use of the data inside this
element.

However, the data in the "value" field does not include any
XML namespace declarations that are used within the element. This
causes problems for a namespace aware XML parser that wants to
make use of this data.

This commit modifies the way the XML is converted to a string
so that XML namespaces are preserved in the output.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2487>
2021-08-27 10:47:06 +00:00
Aaron Boxer
5cf4dc2b82 aes: add aes encryption and decryption elements
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1505>
2021-08-25 21:16:09 -04:00
Víctor Manuel Jáquez Leal
5c5083586d example: va: Add skin tone enhancement.
If camera is used as input stream and skin tone parameter is available
in vapostproc, and no random changes are enabled, the skin tone will
be enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2470>
2021-08-18 14:51:01 +02:00
Víctor Manuel Jáquez Leal
e9395bbcd1 examples: va: Add random cropping.
And remove unused caps filter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2443>
2021-08-18 09:00:55 +00:00
Tim-Philipp Müller
a561b1bd86 Use g_memdup2() where available and add fallback for older GLib versions
g_memdup() is deprecated since GLib 2.68 and we want to avoid
deprecation warnings with recent versions of GLib.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2280>
2021-08-05 20:51:00 +05:30
Seungha Yang
554855f87f d3d11: Disable packed and subsampled YUV formats
Direct3D11 sampler doesn't support them very well, and conversion
outputs usually result in poor visual quality with our shader code.
Should disable support for such formats for now

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2344>
2021-07-29 22:33:30 +09:00
Seungha Yang
26fe552707 tests: Enable closedcaption test on Windows
... if closedcaption plugin is available

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2411>
2021-07-15 17:25:37 +00:00
Philippe Normand
bc09d8cc66 dash: Store entire ContentProtection node in protection event data
Some manifests use the ContentProtection node to store additional information
such as the license server url. Our MPD parser used to process the
ContentProtection node, extracting Playready PSSH boxes. However for other DRM
systems, only the `value` attribute was passed down to the protection event, so
for example, Widevine data was not parsed at all and "Widevine" was passed to
the event, which is not very useful for decryptors that require a PSSH init
data.

Parsing should now be done by decryptors which will receive the entire
ContentProtection XML node as a string. This gives more "freedom" to the
decryptor which can then detect and parse custom nodes as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2400>
2021-07-15 13:05:54 +00:00
Seungha Yang
051b5de39e tests: wasapi2: Add more device reuse cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2402>
2021-07-13 03:36:37 +09:00
Jakub Janků
d83881d43a tests: wasapi: check PLAYING -> READY -> PLAYING
Such sequence of state changes is valid and no error should happen.
At the moment, the test fails. Following patches aim to fix it.

Partially based on the code in tests/check/elements/wasapi2.c

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2096>
2021-07-12 13:47:06 +02:00
Matthew Waters
8fd2c68968 ccconverter: fix framerate caps negotiation from non-cdp to cdp
We can only convert from non-cdp to cdp within the confines of valid cdp
framerates.  The existing caps negotiation code was allowing any
framerate to convert to a cdp output which is incorrect and would hit an
assertion later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2372>
2021-07-02 10:22:31 +03:00
Sebastian Dröge
dcc49f846b webrtcbin: Add a test for setting codec preferences as part of "on-new-transceiver" when setting the remote offer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2310>
2021-06-25 09:45:24 +00:00
Sebastian Dröge
348d4229e7 webrtc: Use fail_unless_equals_string() for string assertions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2310>
2021-06-25 09:45:24 +00:00
Olivier Crête
71052f0321 webrtcbin test: Fix race in new test
Pull a buffer from a sink to make sure that the caps are already
set before trying to update them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2348>
2021-06-24 09:41:09 +00:00
Seungha Yang
7c94b9c4b0 d3d11: Add support for GRAY and more YUV formats
By this commit, following formats will be newly supported by d3d11 elements

* Y444_{8, 12, 16}LE formats:
  Similar to other planar formats. Such Y444 variants are not supported
  by Direct3D11 natively, but we can simply map each plane by
  using R8 and/or R16 texture.
* P012_LE:
  It is not different from P016_LE, but defining P012 and P016 separately
  for more explicit signalling. Note that DXVA uses P016 texture
  for 12bits encoded bitstreams.
* GRAY:
  This format is required for some codecs (e.g., AV1) if monochrome
  is supported
* 4:2:0 planar 12bits (I420_12LE) and 4:2:2 planar 8, 10, 12bits
  formats (Y42B, I422_10LE, and I422_12LE)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2346>
2021-06-23 15:35:36 +00:00
Víctor Manuel Jáquez Leal
046e92c503 tests: msdkh264dec: Run test only if factory is available.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2336>
2021-06-21 06:30:07 +00:00
Thibault Saunier
f29e75d1da wpe: Make wpesrc!video pad an always pad
There should always be a `video` pad no matter what.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2273>
2021-06-08 03:15:05 +00:00
Seungha Yang
74f81a1a13 d3d11: Add support for YV12 and NV21 formats
Handle UV swapped 4:2:0 8bits formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2290>
2021-06-03 17:00:49 +00:00
Nicolas Dufresne
a01883013a test: camerabin: Fix buffer size calculation
We were assunming that GStreamer size for RGB (24bit packed) data was width x
height x 3, but GStreamer defaults to specific alignment. Use GstVideoInfo API
in order to obtain the buffer size.

This fixes failure seen when trying to merge: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/998
which make us negoaite 1x1 instead of 16x16 in this test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2297>
2021-06-02 11:26:41 -04:00
Tim-Philipp Müller
8e04651b8b Use gst_buffer_new_memdup()
Update for function rename in core.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/827

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2281>
2021-05-24 19:05:27 +01:00
Tim-Philipp Müller
0151276d7f Use new gst_buffer_new_copy()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2279>
2021-05-23 17:20:16 +01:00
Philippe Normand
f4bc5c6c65 wpe: Implement audio support
The wpesrc bin now exposes "sometimes" audio src pads, one for every PCM audio
stream created by WPEWebKit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2252>
2021-05-19 13:41:15 +00:00
He Junyan
c335f00d62 examples: va: Update the VA examples because of the new va lib.
Because we introduce the new va lib, the va examples need to include
new header files and add more library linkage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2196>
2021-05-18 12:15:36 +02:00
Olivier Crête
8b595e7c8b webrtc test: Print content of error GstMessage
Makes it easier to interpret the result of the CI!

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 16:37:31 -04:00
Olivier Crête
78d2d6cf6f webrtcbin tests: Add test for intersection src pad caps
This checks that the codec preferences are intersected also with what
the src pad can handle.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 16:37:31 -04:00
Olivier Crête
cc556452ce webrtc test: Add explicit test clock
This way the test clock is not linked to the multiple harnesses

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
2aa7efedd3 webrtc test: Add test for codec preferences negotiation
Validate that it does the intersection with the caps from
the sink pad and rejects the offer creation otherwise.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
70befc0b21 webrtcbin: Implement caps queries on sinkpad based on codec preferences
Also includes a unit test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Olivier Crête
6a3a62abae webrtcbin tests: Use properties to access the inside of the transceiver object
This will allow hiding the insides from unsafe application access.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2183>
2021-05-13 15:05:00 -04:00
Johan Sternerup
caefc3a831 webrtcbin: Add unit test for closing of data channels
Add test for verifying that the data channel "close" action signal
triggers an SCTP_RESET_STREAMS request that is propagated to the other
side and eventually leads to both sides closing properly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2186>
2021-05-12 03:02:27 +00:00
François Laignel
ad3d7d34cc Use gst_element_request_pad_simple...
Instead of the deprecated gst_element_get_request_pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2180>
2021-05-05 06:17:14 +00:00
Doug Nazar
be2996c48e tests/netsim: Set src caps before creating buffers
GstHarness requires the source pad caps to be set before
buffer allocations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2179>
2021-04-21 09:05:44 +00:00
Seungha Yang
817544860d d3d11: Add support for BGRx and RGBx formats
For such formats, we can re-use existing BGRA/RGBA implementations
but ignoring alpha channel

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2174>
2021-04-21 05:45:59 +00:00
Olivier Crête
bc817f340c webrtcbin test: Don't fail if data channel is created
In tests that voluntarily create a data channel.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2168>
2021-04-21 03:21:55 +00:00
Doug Nazar
edbf0a6622 tests/avtp: increase timeout of test_depayloader_fragmented_big
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2160>
2021-04-14 07:05:13 +00:00
Doug Nazar
6faff99596 check: fix dash_mpdparser_check_mpd_client_set_methods test.
Setting guint64 valist properties without type specifier fails
on 32bit archs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2161>
2021-04-14 06:35:25 +00:00
Doug Nazar
63b5ae0ffe line21enc: fix remove-caption-meta property test
It's possible for the same address to be allocated to the decoded
metadata. Switch test to actual detect if it was removed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2159>
2021-04-13 16:34:15 -04:00
Doug Nazar
a1535a4dc3 tests: fix shm test deadlock
Stopping the consumer first would occasionally allow the producer
to fill the shm segment causing it to block in send() and unable
to be stopped.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2158>
2021-04-13 11:59:35 +00:00
Doug Nazar
a930b62afc check: Fix test dash_mpdparser_xlink_period
Test used http://404/ERROR/XML.period as an invalid url. Curl now
interprets that as an 32bit int and tries an actual connect which
timesout. Use .invalid as an IANA reserved domain for invalid DNS.

curl -v http://404/ERROR/XML.period
*   Trying 0.0.1.148:80...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2157>
2021-04-13 10:17:47 +00:00
Olivier Crête
474c4bf08f webrtcbin test: Wait for set-local-desc & set-remote-desc to continue
To avoid racing betwen the SDPs being set and the next step of the
test, let's wait for setting the SDP both locally and remotely to succeed.
of the test

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 18:37:27 -04:00
Olivier Crête
4a48e291ff webrtcbin test: Add for the case where a second m-line is renegotiated
This is for the case where there answerer forces a specific media type
for a m-line, but he origin offer only has the other media type. In this
case, we will create a second transceiver on receiving the offer and add
the desired media type using renegotiation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 18:37:27 -04:00
Olivier Crête
2bd647e999 webrtc test: Verify that forcing different kinds on peers fails
If the offer contains an audio kind and a video kind, forcing them both
at m-line zero will fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 18:37:27 -04:00
Olivier Crête
8df5b9f974 webrtc tests: Verify that create-offer is rejected when needed
Verify that it gets rejected if a m-line at index 1 is requested but
there is no m-line 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 18:37:27 -04:00
Olivier Crête
913d308e22 webrtcbin test: Add test for various cases where get_request_pad is meant to fail
This should ensure that the recently added code works.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 17:55:07 -04:00
Olivier Crête
5971a96109 webrtcbin: Try to match an existing transceiver on pad request
This should avoid creating extra transceivers that are duplicated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 17:55:07 -04:00
Olivier Crête
d49e664c84 webrtcbin test: Test adding a stream to a stream+datachannel
This use-case was previously broken by the expectation of having
a 1-1 match between the pad id and the m-line index

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2104>
2021-04-12 17:55:07 -04:00
Sebastian Dröge
ffa4d84e54 h2645parser: Catch overflows in AVC/HEVC NAL unit length calculations
Offset and size are stored as 32 bit guint and might overflow when
adding the nal_length_size, so let's avoid that.

For the size this would happen if the AVC/HEVC NAL unit size happens to
be stored in 4 bytes and is 4294967292 or higher, which is likely
corrupted data anyway.

For the offset this is something for the caller of these functions to
take care of but is unlikely to happen as it would require parsing on a
>4GB buffer.

Allowing these overflows causes all kinds of follow-up bugs in the
h2645parse elements, ranging from infinite loops and memory leaks to
potential memory corruptions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2103>
2021-03-24 09:22:48 +00:00
Matthew Waters
640a65bf96 gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2098>
2021-03-22 14:34:36 +11:00