Commit graph

2286 commits

Author SHA1 Message Date
Philippe Normand 4bf62c788c webrtc: nice: WeakRef access fixes
The GstWebRTCNiceStream::ice property getter already hands-off a full reference,
so there is no need to call g_weak_ref_get() in call sites.

Fixes #1350

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2819>
2022-08-01 13:13:16 +00:00
Philippe Normand 3bdf3455a0 webrtc: ice: Fix GstWebRTCICE parent class
It is a GstObject, not a GObject.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2819>
2022-08-01 13:13:16 +00:00
Philippe Normand 10eaae1243 dtls: Properly name encoder/decoder logging categories
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2820>
2022-08-01 09:02:03 +00:00
Philippe Normand 7c3f73ec2e dtls: Make agent and connection GstObjects
Facilitates debug logs interpretation of GST_DEBUG_OBJECT() calls.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2820>
2022-08-01 09:02:03 +00:00
Nirbheek Chauhan 1de859ec55 meson: Update ogg.wrap from wrapdb
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2814>
2022-07-31 16:29:04 +05:30
Nirbheek Chauhan 19ebcd3955 build: Fix some compiler warnings by upgrading wraps
03d9f144cb

2913e72d85

c945c99fba

There's one more pygobject warning that will be fixed with this:

https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/210

Also bump the image versions to regen them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2814>
2022-07-31 16:28:25 +05:30
Nirbheek Chauhan b2d22c0f00 meson: Don't pass -Werror to vendored code
Do it the correct way with libusrsctp -- override the option so that
it's done in a compiler-agnostic and future-proof way.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2494>
2022-07-30 11:27:12 +00:00
Nirbheek Chauhan 5da9f62313 rtsp+rtmp: Forward warning added to tls-validation-flags to our users
With the 2.72 release, glib-networking developers have decided that
TLS certificate validation cannot be implemented correctly by them, so
they've deprecated it.

In a nutshell: a cert can have several validation errors, but there
are no guarantees that the TLS backend will return all those errors,
and things are made even more complicated by the fact that the list of
errors might refer to certs that are added for backwards-compat and
won't actually be used by the TLS library.

Our best option is to ignore the deprecation and pass the warning onto
users so they can make an appropriate security decision regarding
this.

We can't deprecate the tls-validation-flags property because it is
very useful when connecting to RTSP cameras that will never get
updates to fix certificate errors.

Relevant upstream merge requests / issues:

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

https://gitlab.gnome.org/GNOME/glib-networking/-/issues/179

https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/193

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2494>
2022-07-30 11:27:12 +00:00
Nirbheek Chauhan 11ecda9d73 dtls: Disable OpenSSL 3.0 deprecation warnings for now
Fedora 36 ships with OpenSSL 3.0, which deprecates all low-level APIs,
so this code needs to be rewritten. There is no easy fix in the
porting guide, and it recommends disabling the warnings if you can't
use the high-level API.

https://wiki.openssl.org/index.php/OpenSSL_3.0#Upgrading_to_OpenSSL_3.0_from_OpenSSL_1.1.1

Here's the replacement API:

https://www.openssl.org/docs/man3.0/man7/migration_guide.html#Deprecated-low-level-object-creation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2494>
2022-07-30 11:27:12 +00:00
Nirbheek Chauhan db28c81ee3 harfbuzz.wrap: Fix wrap type, and remove unnecessary patch
Forgot to change the wrap type in e0014ef4fe which broke the
subproject. Wasn't noticed by CI because the subproject cache wasn't
regenerated.

The accompanied patch was included in 2.8.2, so it is not needed. It
was originally needed with 2.8.1

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2812>
2022-07-29 19:56:11 +00:00
Tim-Philipp Müller 5966905930 subprojects: fix pango wrap diff file location
Must match the version of the pango wrap.

Fixes ci windows docker image rebuild issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2812>
2022-07-29 19:56:11 +00:00
Mark Nauwelaerts b5707e2371 videobox: avoid dropping caps fields for passthrough caps transform
Fixes potential negotiation failure in case downstream element
is a bit picky regarding the fields in question.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2786>
2022-07-29 18:44:13 +00:00
Seungha Yang ea47a82e9e compositor: Update plugins cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1486>
2022-07-29 13:29:39 +00:00
Seungha Yang 648739012a compositor: Warn when inputs are SDR/HDR mixed
Let user know that the result of mixed SDR/HDR is not guaranteed
to be a good visual quality.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1486>
2022-07-29 13:29:39 +00:00
Seungha Yang 56d47f641f compositor: Add support for all formats
For formats which we don't have fast-path implementation, compositor
will convert it to common unpack formats (AYUV, ARGB, AYUV64 and ARGB64)
then blending will happen using the intermediate formats.
Finally blended image will be converted back to the selected output format
if required.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1486>
2022-07-29 13:29:39 +00:00
Seungha Yang 22a4543c5f compositor: Add support for Y444 high bitdepth formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1486>
2022-07-29 13:29:39 +00:00
Seungha Yang 3cab0a9c08 compositor: Add support for I420/I422 high bitdepth formats
Implementation for {I420,I422}_{10,12}_{LE,BE} formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1486>
2022-07-29 13:29:39 +00:00
Seungha Yang 64eb4b8d62 compositor: Calculate background color only once
... instead of do that per fill_color() call in case of RGB format.
Moreover, respect selected GstVideoColorRange

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1486>
2022-07-29 13:29:39 +00:00
Seungha Yang 8fee6bf785 wasapi2: Fix initial mute/volume setting
Fix up volume/mute change flag setting

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2809>
2022-07-29 02:37:29 +09:00
Matthew Waters 598f2ab73f rtspconnection: protect cancellable by a mutex
It is entirely possible for the cancellable to be cancelled (and freed)
in gst_rtsp_connection_flush() while there may be an ongoing read/write
operation.

Nothing prevents gst_rtsp_connection_flush() from waiting for the
outstanding read/writes.

This could lead to a crash like (where cancellable has been freed
within gst_rtsp_connection_flush()):

 #0  0x00007ffff4351096 in g_output_stream_writev (stream=stream@entry=0x7fff30002950, vectors=vectors@entry=0x7ffe2c6afa80, n_vectors=n_vectors@entry=3, bytes_written=bytes_written@entry=0x7ffe2c6af950,  cancellable=cancellable@entry=0x7fff300288a0, error=error@entry=0x7ffe2c6af958) at ../subprojects/glib/gio/goutputstream.c:377
 #1  0x00007ffff44b2c38 in writev_bytes (stream=0x7fff30002950, vectors=vectors@entry=0x7ffe2c6afa80, n_vectors=n_vectors@entry=3, bytes_written=bytes_written@entry=0x7ffe2c6afb90, block=block@entry=1, cancellable=0x7fff300288a0) at ../subprojects/gst-plugins-base/gst-libs/gst/rtsp/gstrtspconnection.c:1320
 #2  0x00007ffff44b583e in gst_rtsp_connection_send_messages_usec (conn=0x7fff30001370, messages=messages@entry=0x7ffe2c6afcc0, n_messages=n_messages@entry=1, timeout=timeout@entry=3000000) at ../subprojects/gst-plugins-base/gst-libs/gst/rtsp/gstrtspconnection.c:2056
 #3  0x00007ffff44d2669 in gst_rtsp_client_sink_connection_send_messages (sink=0x7fffac0192c0, timeout=3000000, n_messages=1, messages=0x7ffe2c6afcc0, conninfo=0x7fffac019610) at ../subprojects/gst-rtsp-server/gst/rtsp-sink/gstrtspclientsink.c:1929
 #4  gst_rtsp_client_sink_try_send (sink=sink@entry=0x7fffac0192c0, conninfo=conninfo@entry=0x7fffac019610, requests=requests@entry=0x7ffe2c6afcc0, n_requests=n_requests@entry=1, response=response@entry=0x0, code=code@entry=0x0) at ../subprojects/gst-rtsp-server/gst/rtsp-sink/gstrtspclientsink.c:2845
 #5  0x00007ffff44d3077 in do_send_data (buffer=0x7fff38075c60, channel=<optimized out>, context=0x7fffac042640) at ../subprojects/gst-rtsp-server/gst/rtsp-sink/gstrtspclientsink.c:3896
 #6  0x00007ffff4281cc6 in gst_rtsp_stream_transport_send_rtp (trans=trans@entry=0x7fff20061f80, buffer=<optimized out>) at ../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream-transport.c:632
 #7  0x00007ffff4278e9b in push_data (stream=0x7fff40019bf0, is_rtp=<optimized out>, buffer_list=0x0, buffer=<optimized out>, trans=0x7fff20061f80) at ../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream.c:2586
 #8  check_transport_backlog (stream=0x7fff40019bf0, trans=0x7fff20061f80) at ../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream.c:2645
 #9  0x00007ffff42793b3 in send_tcp_message (idx=<optimized out>, stream=0x7fff40019bf0) at ../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream.c:2741
 #10 send_func (stream=0x7fff40019bf0) at ../subprojects/gst-rtsp-server/gst/rtsp-server/rtsp-stream.c:2776
 #11 0x00007ffff7d59fad in g_thread_proxy (data=0x7fffbc062920) at ../subprojects/glib/glib/gthread.c:827
 #12 0x00007ffff7a8ce2d in start_thread () from /lib64/libc.so.6
 #13 0x00007ffff7b12620 in clone3 () from /lib64/libc.so.6

Fix by adding a cancellable lock and returning an extra reference used
across all read/write operations.  gst_rtsp_connection_flush() can free
the in-use cancellable and it will no longer affect any in progress
read/write.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2799>
2022-07-28 10:32:15 +00:00
Philippe Normand 53800b308b GST_CHECK_VERSION: Fix unexpected "git = next version" assumption
1.21.0.1 should not satisfy a check for 1.22.0.

If someone needs more control they should do a feature check for
the symbol in the headers or lib.

Based on a similar patch by Tim-Philipp Müller for libnice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2501>
2022-07-28 08:52:13 +00:00
Adrian Fiergolski 8e6872a36e videoflip: Fix caps negotiation when method is selected
The caps negotiation should respect the selected method to the test pipeline below works properly.
gst-launch-1.0 videotestsrc ! video/x-raw,width=320,height=600 ! videoflip method=clockwise ! video/x-raw,width=600,height=320 ! fakesink

Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2803>
2022-07-28 00:00:47 +00:00
U. Artie Eoff 76cc5f88c5 vaapi: h265dec: avoid possible NULL deref
Check "pi" before attempting to dereference it.

Captured by static analysis.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2801>
2022-07-27 08:45:45 -04:00
Eric Knapp d11a0d04ec va: h264enc: Make AUD the first NAL unit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2796>
2022-07-27 06:46:21 +00:00
U. Artie Eoff e3e98da727 meson: webrtc: ensure definition of libgstwebrtcnice_dep
... and skip if it's disabled.

Fixes #1344

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2797>
2022-07-26 17:39:52 -04:00
Nicolas Dufresne 3d63b8c326 vaapi: h264dec: Remove dead code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2795>
2022-07-26 21:09:08 +00:00
Nicolas Dufresne 04e0154fb5 vaapi: h265dec: Refresh our sps/pps copy
The decoder uses a copy of the SPS/PPS. Since
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2575
the SPS/PPS is updated when the slice header is parsed. As a side
effect, the H265 decoder was using an partially filled copy.

Fixes: 5ae05bb42a ("codecparsers: Defering computation of pps and sps fields")
Fixes: #1343
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2795>
2022-07-26 21:09:08 +00:00
fduncanh 197b72f32a v4l2object.c: add support for Apple's full-range bt709 colorspace variant
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2793>
2022-07-26 15:14:41 +00:00
yatinmaan 2c1e61ea16 webrtc: Split WebRTCICE into base classes and implementation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2398>
2022-07-26 13:51:11 +00:00
Elliot Chen e0564b04c6 v4l2: fix the critical log when unreference the buffer with no data
In the trick mode, driver may queue a valid buffer follow by an
empty buffer which has no valid data to indicate EOS.For the empty
buffer whose memory is multi-plane, need to resize it before
unreference it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2731>
2022-07-25 16:44:05 +08:00
Seungha Yang cf94045dbf qsvencoder: Add support for D3D11 shared texture
Although input texture belongs to the other d3d11 device,
we can do GPU copy when its physical device is identical.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2790>
2022-07-23 16:53:14 +00:00
Seungha Yang 6fff608f27 d3d11: Port to GstD3D11Fence
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2790>
2022-07-23 16:53:14 +00:00
Seungha Yang ba259111d5 d3d11: Implement fence abstraction
Depending on device feature level, d3d11 runtime can support
ID3D11Fence which is equivalent to ID3D12Fence.
Waiting using fence has performance-wise benefit over pulling
ID3D11Query status. If ID3D11Fence is not supported by device,
then ID3D11Query will be used instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2790>
2022-07-23 16:53:14 +00:00
Tim-Philipp Müller ccb5d52be5 audiointerleave: fix property docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2785>
2022-07-23 16:03:43 +00:00
Jan Schmidt 202c3bc4b1 video: Fix scaling in 4x horizontal co-sited chroma
4x downscaling of chroma with co-sited chroma has never worked
it seems.

Fixes incorrect videotestsrc output and videoconvert conversions
to Y41B, YUV9, YVU9 and IYU9 with co-sited chroma.

e.g.
gst-launch-1.0 videotestsrc ! video/x-raw,format=Y41B,width=1280,height=720 ! \
  videoconvert ! autovideosink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2789>
2022-07-23 09:28:32 +00:00
Benjamin Gaignard 8ec0dca73b codecs: h265: Make sure that sps is processed just before decoding
It may happens that bitstream doesn't provided SPS in decoding order
(like in VPSSPSPPS_A_MainConcept_1 conformance test file).
To be sure that the decoder got the correct SPS parameters process
SPS just before start decoding the frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2575>
2022-07-22 16:13:47 -04:00
Sebastian Fricke 5019be9fdb codecs: h265: Fix typos
Fix multiple typos in warning and info messages.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2575>
2022-07-22 16:13:47 -04:00
Benjamin Gaignard a275e1e029 videoparsers: h265: Be less restrictive between PPS and SPS parsing order
Allow to parse PPS to be parser even if SPS hasn't been parsered before.
This help to parse VPSSPSPPS_A_MainConcept_1 conformance test

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2575>
2022-07-22 16:13:47 -04:00
Benjamin Gaignard 5ae05bb42a codecparsers: Defering computation of pps and sps fields
While possible defer computataion of pps and sps fields until
slice parsing since it may happens that bitstreams don't encoded
them in expected order.
A example weird ordered bitstreams is VPSSPSPPS_A_MainConcept_1
conformance test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2575>
2022-07-22 16:13:47 -04:00
Nicolas Dufresne 316b182a86 v4l2codecs: h264: Reset the number of slices on picture start
This way, if we aborted a frame in the middle, we don't endup thinking
there is multiple slices to send.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
2022-07-22 10:21:03 -04:00
Nicolas Dufresne c2144ec586 v4l2codecs: h264: Fix initialization of the slice array
The function g_array_sized_new() leaves the len to 0, but the slice
implementation assumes it would be set to 4. Sending multiple slices is
not yet support for H.264 as no driver needed it yet, but if that code
was to be used it would have overflowed as the array would never grow as
multiple 0 by 2 always results in 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
2022-07-22 10:21:03 -04:00
Nicolas Dufresne a707d984ae v4l2codecs: h264: Rename count variable to num_controls
This is the counter for the used control slot. The term num_controls was
introduced in the HEVC decoder and felt like a better choice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
2022-07-22 10:21:02 -04:00
Nicolas Dufresne a2b219c7e1 v4l2codecs: hevc: Add an API check
This adds an API check and bump recommended base kernel version to 5.20.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
2022-07-22 10:21:02 -04:00
Benjamin Gaignard 0eb7028570 v4l2codecs: Add v4l2 stateless H265 decoder
Add v4l2 stateless H265 decoder.

Co-authored-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Co-authored-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
2022-07-22 10:21:02 -04:00
Benjamin Gaignard 70941696ed v4l2codecs: Increase minimum payload size
Fluster MAXBINS_{A-C}_TI_5 HEVC tests files require to store
a payload larger than usual given their resolutions.
Increase the minimum payload size to handle them correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
2022-07-22 10:21:02 -04:00
Nicolas Dufresne f1c98e2c9e v4l2codecs: Align v4l2 headers with HEVC final uAPI
HEVC uAPI have landed for kernel 5.10.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
2022-07-22 10:21:02 -04:00
Nicolas Dufresne 74a811e718 codecparsers: h265: Introduce long_term_ref_pic_set_size
This is the size of the `if( long_term_ref_pics_present_flag )` inside
slice_segment_header( ) syntax. This size in bit, and after de-emulation
is needed by some HW.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1079>
2022-07-22 10:21:02 -04:00
Sebastian Dröge 0aad12fbce audiobuffersplit: Actually store number of samples to drop in gapless mode
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2780>
2022-07-22 08:01:45 +00:00
Sebastian Dröge fad0a72eca audiobuffersplit: Use input running time for comparison instead of the currently tracked running time
Otherwise gapless mode would do completely wrong calculations on
discontinuities and cause input/output to drift slowly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2780>
2022-07-22 08:01:45 +00:00
Sebastian Dröge 0485c354d2 audiobuffersplit: Combine two if expressions to reduce indentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2780>
2022-07-22 08:01:45 +00:00
Seungha Yang 0cadd10474 videoaggregator: Don't force upstream alpha format
"video/x-raw,format=RGBA ! some-video-filter ! video/x-raw,format=NV12"
is a very common case and therefore such erroring at baseclass
does not seem to be a desired behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2703>
2022-07-21 21:34:06 +00:00
Seungha Yang ac6577e2a9 d3d11compositor: Add support for crop meta
GstD3D11Converter supports cropping already. Cropping is just
a matter of setting source rectangle area to converter,
from d3d11 point of view

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2782>
2022-07-22 05:07:23 +09:00
Seungha Yang aa0b7f3284 examples: d3d11: Add GstD3D11Converter example
An example to demonstrate color space conversion, rescale and flip/rotation
using GstD3D11Converter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2767>
2022-07-22 00:27:24 +09:00
Seungha Yang 1c3fac818d d3d11: Move GstD3D11Converter to gst-libs
The object is equivalent to GstVideoConverter but for D3D11.
Application can use this object directly for various conversions,
such as color space conversion, rescale, crop and flip/rotation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2767>
2022-07-22 00:08:51 +09:00
Seungha Yang 32eeadb4a5 d3d11: Define enum and flags types manually
gnome.mkenums_simple() doesn't work well for GstD3D11, seems to
be confused by numeric representation of D3D11, must be a bug
in GLib or so. Just don't rely on the incomplete automagic.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2767>
2022-07-22 00:07:52 +09:00
Seungha Yang 879eb9412b d3d11: Run gst-indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2767>
2022-07-22 00:07:52 +09:00
Jordan Petridis 3a20a4564f openmpt: update from now deprecated api
https://lib.openmpt.org/doc/classopenmpt_1_1module.html#ab2695af0baa274054f5687741fa7c05b

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2721>
2022-07-21 07:52:37 +00:00
Fan F He 6fe35ad59d msdkenc: Enable LowDelayBrc and MaxFrameSize for I/P frame
Enable these features for accurate bitrate control.
Feature introduction of LowDelayBRC, MaxFrameSizeI and MaxFrameSizeP could be found here:
https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md

Signed-off-by: Fan F He <fan.f.he@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2742>
2022-07-20 07:10:19 +00:00
Seungha Yang ee289a65ce d3d11converter: Use GstStructure to set initialization options
Runtime updatable options are exposed via object properties
but there are a few options which should be known at initialization
time. Use GstStructure to signal it and to be easily extensible

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2776>
2022-07-20 07:05:51 +09:00
Seungha Yang d3d8820359 d3d11converter: Use primaries and transfer function compare methods
Different enum values could be functionally equal, then we don't need
to do full conversion.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2776>
2022-07-20 07:05:51 +09:00
Seungha Yang 16f4567a50 d3d11format: Move DXGI color space mapping method to gst-libs
Expose color space mapping method to public so that application
can configure GstCaps or GstVideoInfo using DXGI color space

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2776>
2022-07-20 07:05:46 +09:00
Seungha Yang 43052fabb5 gststructure: Add gst_structure_get_flags method
We don't prevent setting G_TYPE_FLAGS on GstStructure
but no helper method for getting the value.
Add a method similar to gst_structure_get_enum()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2770>
2022-07-19 20:54:31 +09:00
Sebastian Dröge 205034dea9 aggregator: Reset EOS flag after receiving a stream-start event
And also don't assert that there are no buffers queued up when handling
an EOS event. The pad's streaming thread might've already received a new
stream-start event and queued up a buffer in the meantime.

This still leaves a race condition where the srcpad task sees all pads
in EOS state and finishes the stream, while shortly afterwards a pad
might receive a stream-start event again, but this doesn't seem to be
solveable with the current aggregator design.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2769>
2022-07-18 15:46:21 +03:00
Seungha Yang 687f9feac6 d3d11convert: Use new colorimetry compare function
Avoid conversion if both are functionally identical

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2765>
2022-07-18 08:56:45 +00:00
Seungha Yang 953257782d video-converter: Use primaries compare function
Avoid conversion if both color primaries are functionally equal

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2765>
2022-07-18 08:56:45 +00:00
Seungha Yang 2ed64cad6a video-color: Add primaries and colorimetry compare functions
SMPTE 170M and 240M use the same RGB and white point coordinates
and therefore both primaries can be considered functionally
equivalent.
Also, some transfer functions have different name but equal
gamma functions. Adding another colorimetry compare function
to deal with thoes cases at once

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2765>
2022-07-18 08:56:45 +00:00
Sebastian Dröge 1728f8b72a qt: Fix another instance of Qt/GStreamer both defining GLsync differently
In file included from ../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:87,
                 from ../gst-plugins-good-1.20.3/ext/qt/qtglrenderer.cc:14:
../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/glprototypes/gstgl_compat.h:40:18: error: conflicting declaration 'typedef void* GLsync'
   40 | typedef gpointer GLsync;
      |                  ^~~~~~
In file included from ../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/QtGui/qopengl.h:127,
                 from ../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/QtQuick/qsggeometry.h:44,
                 from ../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/QtQuick/qsgnode.h:43,
                 from ../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/QtQuick/qsgrendererinterface.h:43,
                 from ../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/QtQuick/qquickwindow.h:44,
                 from ../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/QtQuick/QQuickWindow:1,
                 from ../gst-plugins-good-1.20.3/ext/qt/qtglrenderer.cc:6:
../gstreamer1.0-plugins-good/1.20.3-r0/recipe-sysroot/usr/include/QtGui/qopengles2ext.h:24:26: note: previous declaration as 'typedef struct __GLsync* GLsync'
   24 | typedef struct __GLsync *GLsync;
      |                          ^~~~~~

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2763>
2022-07-18 07:45:22 +00:00
Seungha Yang 35994eb5c9 d3d11testsrc: Fix SMPTE pattern rendering
It was wrong vertex shader code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2766>
2022-07-17 23:59:04 +09:00
Nirbheek Chauhan 41bf3f6c1b osxaudio: Fix deprecation in macOS 12.0
kAudioObjectPropertyElementMaster has been renamed to
kAudioObjectPropertyElementMain

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2761>
2022-07-16 06:16:17 +00:00
Nirbheek Chauhan e0014ef4fe meson: Fix compile failures on macOS in harfbuzz and pango
These patches are taken from upstream, and they fix compile failures
with latest clang. These can be dropped when upgrading these wraps.

This is currently causing a warning because we do not require the
version of meson that ships with this feature: 0.63.0. The version has
not been bumped because older Meson versions gracefully ignore the
wrap field, this fix is optional and only needed on macOS, and 0.63.0
is a very new release with a bug that partially breaks this feature:

https://github.com/mesonbuild/meson/pull/10602

We can consider bumping the requirement once 0.63.1 is released.

Also switch from git to tarballs, no reason to use git here anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2761>
2022-07-16 06:16:17 +00:00
Nirbheek Chauhan 2d890e6fd6 meson: Update some wraps, remove unused wraps
These wraps have point releases on the wrapdb, so update them.

Remove pcre.wrap since it is pulled in automatically by glib and not
used by gstreamer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2761>
2022-07-16 06:16:17 +00:00
Nirbheek Chauhan 61743ec1ae meson: Fix warning about check kwarg
This place was missed when we fixed this everywhere else.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2761>
2022-07-16 06:16:17 +00:00
Piotr Brzeziński 6bf15124e7 applemedia: Add HEVC support to vtenc and vtdec
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2754>
2022-07-16 05:20:56 +00:00
Seungha Yang 1dd29a2564 d3d11: Move HLSL compiler to gst-libs
We should move this functionality to gst-libs so that GstD3D11Converter
can be moved to gst-libs.
Another advantage is that applications can call our
HLSL compiler wrapper method without any worry about OS version
dependent system installed HLSL library.
Note that there are multiple HLSL compiler library versions
on Windows and system installed one would be OS version dependent.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2760>
2022-07-15 06:31:51 +09:00
Matthew Waters 390518a296 glimagesink: only allow setting the GL display/context if it is a valid value
Otherwise, when setting the external application context, then the
display may be cleared and then not used and the asharing mechanism does
not work anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2750>
2022-07-13 01:20:00 +00:00
Thibault Saunier 073df3d820 webrtcbin: Add a signal to plug bandwidth estimator elements
We need GStreamer elements to do the bandwidth estimation as this way
they can also control the pacing of the transmission flow as specified
 in the [GCC] algorithm for example.

Bandwidth estimator element are placed right before the "RTPSession" as
an "rtp-aux-sender" element. This way they can use the "Transport-wide
Congestion Control" RTCP feedback messages through the "RTPTwcc" custom
events that are sent by the rtpsession.

Applications are responsible to react to the bandwidth estimator element
and set the encoder target bitrate etc... which means that we can not
pass an estimator as an element factory, so a signal as been chosen
instead.

[GCC]: https://datatracker.ietf.org/doc/html/draft-ietf-rmcat-gcc-02

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2562>
2022-07-12 20:40:55 +00:00
Corentin Damman f95ca93d25 tracers: leaks: fix object-refings.class flags
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2749>
2022-07-12 12:29:38 +00:00
Sebastian Dröge 47ac79d7b8 devicemonitor: Use a sync bus handler for the provider to avoid accumulating all messages until the provider is stopped
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/981

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2741>
2022-07-12 11:57:02 +00:00
Jan Schmidt ab459f0528 splitmuxsink: Fix memory leak
Fix a leak of the buffer info struct when reaching
EOS without data on the reference input.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2751>
2022-07-12 11:22:33 +00:00
Bruce Liang ebd8bd8f13 rtsp-client: Fix url for generating key in media factory
The mount point at / can be accessed by both the URL forms rtsp://<IP>:<PORT> and rtsp://<IP>:<PORT>/.
To make media factory generating the same key for both the URL forms, the url sent to gst_rtsp_media_factory_construct() needs to be normalized first.
This commit creates a new GstRTSPUrl as the normalized url to send to gst_rtsp_media_factory_construct().

Fixes:https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1297

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2681>
2022-07-12 10:01:35 +00:00
Jan Schmidt 3511be9a05 glupload: Add raw caps to sink pad when needed.
When checking if the current upload method can support
the requested caps filter in _transform_caps(),
make sure the sink pad reports raw caps.

Fixes #1311

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2725>
2022-07-12 09:30:46 +00:00
Jan Schmidt f8541b05aa gstglupload: Remove raw caps from individual methods
Raw memory upload should always be the least preferred input
caps, only added by the raw memory uploader as the last thing
in the caps.

Caps negotiation should still choose raw data when it needs to,
and other upload methods that can accept raw data buffers will still do so.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2725>
2022-07-12 09:30:46 +00:00
Mathieu Duponchelle 56ec817bf4 videoaggregator: always convert when user provides converter-config
The `converter-config` property may be used to perform cropping,
conversion should always be performed when the user set the property
to a non-NULL value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2746>
2022-07-12 08:03:08 +00:00
Sebastian Dröge eb0746ba97 rtpjitterbuffer: Fix calculation of RFC7273 RTP time period start
This has to be based directly on the current estimated clock time and
has to allow for negative period starts.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2655>
2022-07-11 15:33:42 +00:00
Seungha Yang 5386a426f3 h265decoder: Report latency
Similar to that of h264decoder

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2726>
2022-07-11 11:59:02 +00:00
Andoni Morales Alastruey 94e1ddad43 glwindow_cocoa: fix a leak of the GstNSView
This leak is also causing a leak of the GstGLCAOpenGLLayer
which leaks the GstGLWrappedContext and the GstGLDisplay

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2736>
2022-07-11 11:25:54 +00:00
Andoni Morales Alastruey 7db2a3cf11 gl: Fix leak of the whole CGL context
This was leaking the CGL context and several resources
allocated in the context, around 70MB for a 1080p clip

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2736>
2022-07-11 11:25:54 +00:00
He Junyan 8e2bbfed13 va: baseenc: Do not use codec frame structure again after finish_frame().
In _push_out_one_buffer(), we use codec frame structure again for error handling
after we already call finish_frame(), which is a latent segment fault.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2739>
2022-07-11 10:12:29 +00:00
He Junyan 27c33f0161 va: baseenc: Do not clear the codec frame twice when error.
The current manner will clear the input codec frame twice if we fail
to push the output data, which will trigger an assert.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2739>
2022-07-11 10:12:29 +00:00
Jordan Petridis 3385ea3481 fluiddec: Remove workaround for version 1.1.9
We require >= 2.1 version since the previous commit

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2718>
2022-07-09 14:19:11 +00:00
Jordan Petridis 2fa6ec8733 fluidsynth: update from now deprecated api
fluid_synth_set_chorus_on and fluid_synth_set_reverb_on were
deprecated in favor of new funtions where you can also specify
the fx_group the effect would apply.

The behavior of the set_* variants was to apply to all groups
so we pass -1 to the new functions as per documentation.

https://www.fluidsynth.org/api/group__chorus__effect.html#ga3c48310eecdca9cd338799d19f19c32d

and

https://www.fluidsynth.org/api/group__reverb__effect.html#gacb7917564c988cf54f2e35189b509c8e

and the introduction of the change:

https://github.com/FluidSynth/fluidsynth/pull/673

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2718>
2022-07-09 14:19:11 +00:00
Marc Leeman 18f2f83b4a base: lookup RGB format without alpha
librfb requests a colour space for depth 32 and bpp 32 with alpha set to
0x0, treat this the same as depth 24 with bpp 32.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2627>
2022-07-09 12:06:58 +00:00
Seungha Yang b09ca8635f d3d11: Use scoped device lock
Make code simpler and more deadlock-free

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2728>
2022-07-09 03:36:17 +09:00
Jan Alexander Steffens (heftig) dfea5070df gstinfo: Parse "NONE" as a valid level name
This allows using `NONE` in `GST_DEBUG`,
`gst_debug_set_threshold_from_string`, etc. It was accessible before,
but only via the integer `0`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2734>
2022-07-08 17:07:36 +00:00
Thibault Saunier 7aeb2f6711 python: Fix the audiotestsrc example
Since 830d1595b9 AudioInfo::from_caps has been hidden in python

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2675>
2022-07-08 14:37:14 +00:00
Thibault Saunier fab64c0b3a python: Add a Gst.init_python function to be called from plugins
Plugins know that they will be initialized after Gst was initialized
so they can call the initialization function dedicated for the python
bindings

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2675>
2022-07-08 14:37:14 +00:00
Thibault Saunier 37366ff2f4 python: Do not call gst_init when it is already is_initialized
GStreamer plugins written in python need to call `Gst.init` to ensure
that GStreamer is initialized so when loading a python plugin, we might
be recursively calling `gst_init` which is not a good idea.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/940

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2675>
2022-07-08 14:37:14 +00:00
Seungha Yang 0513e51716 libav: Fix for APNG encoder property registration
The AVClass name of Animated PNG in FFmpeg 5.x is "(A)PNG"
and it will be converted to "-a-png" through
g_ascii_strdown() and g_strcanon(). But GLib disallow leading '-'
character for a GType name. Strip leading '-' to workaround it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2724>
2022-07-08 13:56:35 +00:00
Seungha Yang 02c2485468 qsvencoder: Fix for latency report when B-frame is enabled
QSV runtime will introduce additional delay when B-frame is enabled

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2730>
2022-07-08 13:24:12 +00:00
Seungha Yang 4f90e9b561 qsvencoder: Do not query again if previous call succeeded
Don't need to query multiple times

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2730>
2022-07-08 13:24:12 +00:00
Seungha Yang 6cc6494287 d3d11screencapturesrc: Set colorimetry to caps
Make use of reported DXGI colorspace if possible

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2729>
2022-07-08 21:05:25 +09:00
Seungha Yang 2476678b3c d3d11: Update colorspace map
Map DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 to sRGB colorimetry

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2729>
2022-07-08 20:15:28 +09:00
Seungha Yang 59d92ea62c d3d11: Add an utility method for DXGI colorspace conversion
Add a method for DXGI_COLOR_SPACE_TYPE -> GstVideoColorimetry conversion

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2729>
2022-07-08 20:03:06 +09:00
Seungha Yang f3d51ef235 d3d11: Serialize ensure_element_data() call
It can be called any time from random thread. Thus, multiple
device objects can be created for the same physical device
if the call is not serialized, that's not a scenario we expect.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2727>
2022-07-08 01:35:34 +09:00
Seungha Yang 8aeb8ea58f proxysink: Fix GstProxySrc leak
Clear weak pointer to peer src when disposing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1552>
2022-07-07 05:54:54 +09:00
Seungha Yang 37fdaaf8ff proxysink: Make sure stream-start and caps events are forwarded
There might be a sequence of event and buffer flow:
- Got stream-start/caps/segment events
- Got flush events
- And then buffers with a new segment event

In the above case, stream-start and caps event might not be reached to
peer proxysrc if peer proxysrc is not ready to receive them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1552>
2022-07-07 05:42:21 +09:00
Seungha Yang b233df3537 splitmuxsink: Don't crash on EOS without buffer
Fix a case where upstream pushed EOS without buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2174>
2022-07-05 11:33:35 +00:00
Matthew Waters 6066e913ee webrtc: implement support for asynchronous host resolution
Doesn't block anymore if a mdns host resolution takes multiple seconds
to complete in e.g. stun/turn/ice candidate usage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1961>
2022-07-05 03:20:57 +00:00
Matthew Waters dd4bbb6379 videoconvertscale: ensure writable caps when fixating format
gst_video_convert_scale_get_fixed_format() receives 'othercaps' from
basetransforms' fixate_caps() vmethod which explicitly mentions that
'`othercaps` may not be writable'.

The gst_caps_intersect() call just before may or may not produce new
caps. Particularly in cases like EMPTY or ANY caps on either of the
inputs, only a ref is taken and returned to the caller.

As a result, gst_video_convert_scale_fixate_format() may have attempted
to modify a non-writable caps structure.

Fix by adding a gst_caps_make_writable().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2709>
2022-07-04 19:57:10 +00:00
Thibault Saunier 339f950e79 rtprtx: Fix copying extension headers
There was a typo leading to reading memory from the buffer we were
writing to.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2696>
2022-07-04 19:20:57 +00:00
Seungha Yang e0d1b98827 d3d11converter: Remove convert() method
Expose only single convert_buffer() method. It's safer approach than
passing arbitrary list of SRV/RTV pointers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2713>
2022-07-04 18:46:51 +00:00
Seungha Yang df396b9acd d3d11testsrc: Use convert_buffer() method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2713>
2022-07-04 18:46:51 +00:00
Seungha Yang 7a48843ca6 d3d11: Remove video processor
Processing using ID3D11VideoProcessor was integrated into
GstD3D11Converter and GstD3D11VideoProcessor implementation is
not used anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2713>
2022-07-04 18:46:51 +00:00
Seungha Yang 347ad181be d3d11memory: Update alloc_wrapped() API to avoid staging texture alloc
Add size parameter and use it for CPU accessible memory size
instead of allocating staging texture per API call.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2713>
2022-07-04 18:46:51 +00:00
Ignazio Pillai 76dbe45b83 wasapi: Implement default audio channel mask
Some multichannel capture devices does not provide a channel mask value
which will result in a pipeline failure due to the empty channel mask.

Implemented the same fix used for wasapi2

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1204

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2692>
2022-07-04 08:56:15 +00:00
Matthew Waters b06a97c429 examples/webrtc/signalling: Fix compatibility with Python 3.10
- ssl module requires an explicit TLS_SERVER role
- asyncio throws a deprecation warning when using
  asyncio.get_event_loop().  Remove custom event loop handling entirely
- No need to keep the websocket server in a member variable, can use
  a future to signal exit case along with the async with context manager
  of websockets.serve()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2698>
2022-07-04 03:17:15 +00:00
fduncanh 735723c230 v4l2videodec: replace multiple decoder bug warnings with single one
Achieve this by dropping frames after a drain if the driver failed to so.
This works around RaspberryPi driver issue [1].

[1] https://github.com/raspberrypi/linux/issues/5059#issuecomment-

Fixes #1103

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2518>
2022-07-02 23:56:00 +00:00
Seungha Yang 5f39388ae5 d3d11videosink: Add support for rotation
Adding "rotate-method" property

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1396
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2708>
2022-07-02 20:40:37 +00:00
Seungha Yang 4e75ca0351 d3d11videosink: Protect window with lock at every place
Access to the object should be thread safe to support runtime
property update

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2708>
2022-07-02 20:40:37 +00:00
Seungha Yang 60e6be7068 d3d11convert: Add support for GstVideoOrientationMethod
Add flip/rotation support via GstVideoDirectionInterface

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2708>
2022-07-02 20:40:37 +00:00
Seungha Yang f549575ce8 d3d11converter: Add support for GstVideoOrientationMethod
Shader can handle rotation/flip with other conversions
at once in a single pipeline, and depending on device
capability, videoprocessor may support it too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2708>
2022-07-02 20:40:37 +00:00
Tim-Philipp Müller 90090dc13b tests: udpsink: make test work in environments without IPv6
Part-fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/939

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2659>
2022-07-02 11:57:31 +00:00
Seungha Yang 5eeec16502 d3d11videosink: Use single GstD3D11Converter object
GstD3D11Converter supports videoprocessor and texture upload.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-02 05:40:47 +09:00
Seungha Yang 46a3394581 d3d11memory: Add private method for texture wrapped memory allocation
Unlike public method gst_d3d11_allocator_alloc_wrapped(), newly
added method by this commit will not calculate CPU accessible memory
size, since staging texture must be allocated to calculate the size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-02 05:37:55 +09:00
Seungha Yang 3919491eb2 d3d11: Use library private header in plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-02 05:37:55 +09:00
Seungha Yang 9709bcf3fe d3d11compositor: Use single GstD3D11Converter object
... and remove unnessary videoprocessor/upload/copy code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-02 05:37:55 +09:00
Seungha Yang 993b9b36db d3d11convert: Add border-color property
Use user specified border-color instead of black color

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-02 05:37:55 +09:00
Seungha Yang 6a59dd95e8 d3d11convert: Use single GstD3D11Converter object
... and don't use GstD3D11VideoProcessor. Now GstD3D11Converter will
be able to convert using videoprocessor, and texture upload is also supported by
GstD3D11Converter. All the noisy code can be removed therefore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-02 05:37:55 +09:00
Seungha Yang 91a732fe90 d3d11converter: Add support conversion using videoprocessor
* Add videoprocessor feature to d3d11converter, in order to unifiy
  conversion flow.
* Add convert_buffer() method to support automatic shader/videoprocessor
  selection. The method also supports texture upload if input memory
  cannot be used for conversion (e.g., system memory or so)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-02 05:37:55 +09:00
Seungha Yang fdbb9041a2 d3d11overlaycompositor: Objectify overlay render implementation
Be consistent with other implementations

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-02 05:37:27 +09:00
Seungha Yang b2d09de899 d3d11: Don't use const pointer to GstDxgiColorSpace
Instead, fill values of passed GstDxgiColorSpace struct

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697>
2022-07-01 19:34:16 +00:00
Tim-Philipp Müller f19f579712 samiparse: clean up some GString usage
There's no need to re-assign the return value of
g_string_append_*() functions and such to the variable
holding the GString. These return values are just for
convenience so function calls can be chained. The actual
GString pointer won't change, it's not a GList after all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2685>
2022-07-01 17:24:52 +00:00
Tim-Philipp Müller 270d23c8e0 samiparse: micro-optimise entity handling
Avoid relocations and hard-code entity string length
in the struct, since we basically get it for free here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2685>
2022-07-01 17:24:52 +00:00
Tim-Philipp Müller 84a3b0ef87 samiparse: fix handling of self-closing tags
We would check the wrong string (rest of line rather than element)
for the / suffix of self-closing tags, which is not only wrong but
also has atrocious performance with certain strings like the garbled
nonsense clusterfuzz feeds us, which might cause discoverer to time
out when processing garbled SAMI files.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47461

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2685>
2022-07-01 17:24:52 +00:00
Jan Schmidt 79d8b435d7 Revert "glupload: Fix caps query with no filter"
This reverts commit 6f9ae5d758.

The _transform_caps() function can't tell the difference
between the caller wanting to know the output caps
for the current method, or all possible output caps. If
it includes caps for all possible methods, glupload can
end up negotiating and sending the wrong output caps
downstream.

Partially reverts !2687
Fixes #1310

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2699>
2022-07-02 00:05:53 +10:00
Sebastian Dröge 2aae64edb9 decklinkvideosink: Pass video frames directly to the Decklink SDK without copying
If the video frame is stored in PBO memory then we need to copy anyway as
it might be stored in CPU-accessible GPU memory that can't be accessed
from the Decklink driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2674>
2022-07-01 08:46:48 +00:00
Vincent Cheah Beng Keat 5ffaf2aa09 msdkmjpegdec: Add support for error report
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2401>
2022-07-01 06:29:30 +00:00
Sebastian Dröge d090e2c343 glvideomixer: Only consider property changes a geometry change if there as an actual change
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2669>
2022-07-01 05:41:57 +03:00
Sebastian Dröge 3a252f3d87 glvideomixer: Add crop-{left,right,top,bottom} pad properties for cropping inputs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2669>
2022-07-01 05:41:57 +03:00
Seungha Yang 30c8dbe032 nvencoder: Add support for dynamic GPU device selection
Adding nvautogpu{h264,h265}enc class which will accept upstream logical
GPU device object (GstCudaContext or GstD3D11Device) instead of
using pre-assigned GPU instance.

If upstream logical GPU device object is not NVENC compatible
(e.g., D3D11 device of non-NVIDIA GPU) or it's system memory,
then user specified "cuda-device-id" or "adapter-luid" property
will be used for GPU device selection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2666>
2022-06-30 12:38:08 +00:00
Seungha Yang bcacfc7ced cuda: Protect gst_cuda_ensure_element_context() with lock
Serialize the order of context setup since it can be called
from multiple threads

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2666>
2022-06-30 12:38:08 +00:00
Seungha Yang ce82c0570e cuda: Add YUY2 and UYVY formats for GL interop
Those formats are not supported conversion formats by CUDA convert/scale elements
but would be useful for GL <-> CUDA interop use case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2691>
2022-06-30 11:17:15 +00:00
Seungha Yang d9f08e17f1 cudadownload: Passthrough in case of CUDA -> SYSTEM
GstCudaMemory supports CPU access via CUDA pinned host memory already
and it would show faster memory transfer performance between
GPU and CPU than copying from/to normal system memory.
If downstream supports video meta, we can passthrough CUDA memory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2690>
2022-06-30 10:45:45 +00:00
Sebastian Dröge a54eddad3a webrtcbin: Reject caps that are not valid for creating an SDP media.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2689>
2022-06-30 09:28:27 +00:00
Sebastian Dröge 3f71a467fc sdpmessage: Don't set SDP medias from caps without media/payload/clock-rate fields
Previously it would've silently failed reading the payload/clock-rate
and instead would've used some random value that happened to be on the
stack.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2689>
2022-06-30 09:28:27 +00:00
Jan Schmidt 6f9ae5d758 glupload: Fix caps query with no filter
If no filter caps are provided with a caps query, always
generate a full set of all caps from all upload methods,
not just the configured one. This is needed to handle
renegotiation when dealing with raw sysmem caps - as the upload
method might accept raw sysmem caps, but only the raw data
uploader adds those to the caps query.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2687>
2022-06-30 08:52:04 +00:00
Jan Schmidt de0e4b8fd6 Revert "glupload: allow system memory for dmabuf in transform_caps"
This reverts commit f3292dc156.

Only the raw data uploader should add sysmem caps to the
actual caps query, because we want them to be at the
lowest priority. If upstream does select to send raw
caps, then the correct upload method will still
be chosen because the accept_caps implementation
will accept them

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2687>
2022-06-30 08:52:04 +00:00
Jan Schmidt 342f02015b gl: Don't use the full transform_caps() method for reconfiguration check
When checking if we need to reconfigure when uploading, check
specifically the output caps of the current method will
result in compatible/incompatible caps, not the full set
of output caps from all upload methods.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2687>
2022-06-30 08:52:04 +00:00
Corentin Damman ae781610c8 cudaformat: add support for planar 4:2:2 YUV formats in CUDA D3D11 interop
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2269>
2022-06-30 07:30:09 +00:00
Corentin Damman 8678fc999a cudamemory: add support for planar 4:2:2 YUV formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2269>
2022-06-30 07:30:09 +00:00