platform/upstream/gstreamer.git
19 months agowebrtc/datachannel: handle error messages from appsrc/sink
Matthew Waters [Thu, 10 Nov 2022 03:31:43 +0000 (14:31 +1100)]
webrtc/datachannel: handle error messages from appsrc/sink

Fixes a possible race where closing a data channel may produce e.g.
not-linked errors.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3381>

19 months agosctpdec: fix stream reset (src pad removal) if no data is ever received
Matthew Waters [Thu, 10 Nov 2022 03:22:30 +0000 (14:22 +1100)]
sctpdec: fix stream reset (src pad removal) if no data is ever received

If we don't receive any data from usrsctp, then there will be no src pad
for the stream id and the stream reset will fail to remove the relevant
src pad.  Workaround by first attempting to add the relevant src pad, then
almost immediately removing it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3381>

19 months agotest: Correct the test suite name of the h264 and h265 bitwriter.
He Junyan [Tue, 19 Jul 2022 09:42:12 +0000 (17:42 +0800)]
test: Correct the test suite name of the h264 and h265 bitwriter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3384>

19 months agovideocrop, videobox: Simplify navigation event handling and support touch events
Colin Kinloch [Mon, 10 Oct 2022 18:58:12 +0000 (19:58 +0100)]
videocrop, videobox: Simplify navigation event handling and support touch events

Signed-off-by: Colin Kinloch <colin.kinloch@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3053>

19 months agova: Fix vapostproc navigation event co-ordinate mapping
Colin Kinloch [Fri, 23 Sep 2022 18:29:31 +0000 (19:29 +0100)]
va: Fix vapostproc navigation event co-ordinate mapping

Signed-off-by: Colin Kinloch <colin.kinloch@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3053>

19 months agovaapi: Use gst_video_orientation_from_tag to parse orientation
Colin Kinloch [Tue, 20 Sep 2022 16:39:39 +0000 (17:39 +0100)]
vaapi: Use gst_video_orientation_from_tag to parse orientation

Signed-off-by: Colin Kinloch <colin.kinloch@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3053>

19 months agovideoflip: Use gst_video_orientation_from_tag to parse orientation
Colin Kinloch [Mon, 19 Sep 2022 17:06:44 +0000 (18:06 +0100)]
videoflip: Use gst_video_orientation_from_tag to parse orientation

Signed-off-by: Colin Kinloch <colin.kinloch@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3053>

19 months agova: Use gst_video_orientation_from_tag to parse orientation
Colin Kinloch [Mon, 19 Sep 2022 17:05:28 +0000 (18:05 +0100)]
va: Use gst_video_orientation_from_tag to parse orientation

Signed-off-by: Colin Kinloch <colin.kinloch@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3053>

19 months agomsdkvpp: delete the macros to make video memory work on Windows
Tong Wu [Wed, 7 Sep 2022 08:26:22 +0000 (16:26 +0800)]
msdkvpp: delete the macros to make video memory work on Windows

Since gst_msdk_import_to_msdk_surface has been implemented for d3d11, we
delete the macros to make it work on Windows.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3231>

19 months agomsdkvpp: modify the way of copying system memory to msdk surface
Tong Wu [Wed, 7 Sep 2022 07:29:37 +0000 (15:29 +0800)]
msdkvpp: modify the way of copying system memory to msdk surface

Replace video_copy with memcpy to fix the issue when the sizes of the
src frame and dst frame don't match. Moreover, for Windows, you have to
do the copy first and call gst_msdk_import_to_msdk_surface later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3231>

19 months agomsdkvpp: add d3d11 support during negotiation
Tong Wu [Wed, 7 Sep 2022 02:55:57 +0000 (10:55 +0800)]
msdkvpp: add d3d11 support during negotiation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3231>

19 months agomsdkvpp: add d3d11 video memory to sink and src caps
Tong Wu [Fri, 2 Sep 2022 08:03:09 +0000 (16:03 +0800)]
msdkvpp: add d3d11 video memory to sink and src caps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3231>

19 months agomsdkvpp: delete use_sinkpad_va and use_srcpad_va
Tong Wu [Wed, 7 Sep 2022 02:44:16 +0000 (10:44 +0800)]
msdkvpp: delete use_sinkpad_va and use_srcpad_va

This two variables are no longer useful. Delete them for now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3231>

19 months agomsdkenc: modify the way of copying system memory to msdk surface
Tong Wu [Fri, 26 Aug 2022 08:19:33 +0000 (16:19 +0800)]
msdkenc: modify the way of copying system memory to msdk surface

Replace video_copy with memcpy to fix the issue when the sizes of the
src frame and dst frame don't match. Moreover, for Windows, you have to
do the copy first and call gst_msdk_import_to_msdk_surface later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3231>

19 months agomsdkallocator_d3d: add d3d11 video memory and import it to msdk surface
Tong Wu [Mon, 17 Oct 2022 09:01:18 +0000 (17:01 +0800)]
msdkallocator_d3d: add d3d11 video memory and import it to msdk surface

This patch introduces d3d11 texture and index to GstMsdkMemoryID and
implements gst_msdk_import_to_msdk_surface in order to wrap the surface
to mfxMemId.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3231>

19 months agomsdkallocator_d3d: implement GetHDL callback function
Tong Wu [Fri, 26 Aug 2022 06:13:36 +0000 (14:13 +0800)]
msdkallocator_d3d: implement GetHDL callback function

During encoding process, oneVPL runtime will call GetHDL callback function.
This patch implements this function for the use of msdk.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3231>

19 months agomsdkallocator: add a parameter to function gst_msdk_import_to_msdk_surface
Tong Wu [Mon, 17 Oct 2022 08:48:15 +0000 (16:48 +0800)]
msdkallocator: add a parameter to function gst_msdk_import_to_msdk_surface

Add a flags parameter to function gst_msdk_import_to_msdk_surface and
move the function declaration to gstmsdkallcator.h to prepare for adding
Windows implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3231>

19 months agomsdkenc: add d3d11 pool during negotiation
Tong Wu [Fri, 19 Aug 2022 05:51:11 +0000 (13:51 +0800)]
msdkenc: add d3d11 pool during negotiation

This patch adds Windows specific set_format and propose_allocation
functions to enable creating d3d11 pools during negotiation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3231>

19 months agomsdkenc: add D3D11 caps for msdkenc
Tong Wu [Fri, 19 Aug 2022 05:40:05 +0000 (13:40 +0800)]
msdkenc: add D3D11 caps for msdkenc

This patch adds D3D11 feature to sink factory for msdkenc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3231>

19 months agoMSDK: Introduce d3d11 device to MSDK context
Tong Wu [Sat, 7 May 2022 09:10:34 +0000 (17:10 +0800)]
MSDK: Introduce d3d11 device to MSDK context

Currently MSDK context does not support d3d11va. Now introduce d3d11va
device to MSDK context, making it able to create msdk session with d3d11
device and to easily share with upstream and donwstream.

Add environment variable to enable user to choose GPU device in multi-GPU
environment. This variable is only valid when there's no context
returned by upstream or downstream. Otherwise it will use the device
that created by upstream or downstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3231>

19 months agoMSDK: Add gst d3d11 lib into MSDK's dependency
Tong Wu [Sat, 7 May 2022 08:28:50 +0000 (16:28 +0800)]
MSDK: Add gst d3d11 lib into MSDK's dependency

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3231>

19 months agovafilter: Log out processed surfaces for debug.
Víctor Manuel Jáquez Leal [Wed, 9 Nov 2022 13:59:41 +0000 (14:59 +0100)]
vafilter: Log out processed surfaces for debug.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3373>

19 months agovadeinterlace, vapostproc: Drop output buffer if process failed.
Víctor Manuel Jáquez Leal [Wed, 9 Nov 2022 13:53:30 +0000 (14:53 +0100)]
vadeinterlace, vapostproc: Drop output buffer if process failed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3373>

19 months agodebugutils: videocodectestsink: add support for more formats
Daniel [Mon, 7 Nov 2022 19:32:50 +0000 (16:32 -0300)]
debugutils: videocodectestsink: add support for more formats

Add support for more formats so as to run the libvpx high bit depth test suite.
This means the files under CONFIG_VP9_HIGHBITDEPTH

This also allows running the yuv444p 8bit file in the regular 8 bit vp9 suite.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3356>

19 months agogstplay: fix segmentation fault caused by subtitle info update
Elliot Chen [Thu, 10 Nov 2022 07:07:20 +0000 (15:07 +0800)]
gstplay: fix segmentation fault caused by subtitle info update

For subtitle stream played by subrui, gstplay will update subtitle
information before select the stream by using playbin3. Need check
the subtitle_sid value to avoid segmentation fault.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3383>

19 months agogst-rtsp-server: compile example for onvif backchannel testing
Christian Wick [Thu, 10 Nov 2022 08:00:32 +0000 (08:00 +0000)]
gst-rtsp-server: compile example for onvif backchannel testing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3363>

19 months agortspsrc: Introduce new action signal `push-backchannel-sample` with correct ownership...
Christian Wick [Wed, 9 Nov 2022 12:04:08 +0000 (12:04 +0000)]
rtspsrc: Introduce new action signal `push-backchannel-sample` with correct ownership semantics

Signals are not supposed to take ownership of their arguments but only
borrow them for the scope of the signal emission.

The old action signal `push-backchannel-buffer` is now marked deprecated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3363>

19 months agogssink: add 'content-type' property
Guillaume Desmottes [Wed, 9 Nov 2022 13:16:23 +0000 (14:16 +0100)]
gssink: add 'content-type' property

Useful when one wants to upload a video as `video/mp4` instead of
'video/quicktime` for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3371>

19 months agocccombiner: initial implementation of using CCBuffer helper
Matthew Waters [Wed, 1 Jun 2022 11:24:41 +0000 (21:24 +1000)]
cccombiner: initial implementation of using CCBuffer helper

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>

19 months agoclosedcaption: move CC buffering to helper object
Matthew Waters [Wed, 1 Jun 2022 07:47:55 +0000 (17:47 +1000)]
closedcaption: move CC buffering to helper object

Move most of the interesting code from ccconverter to this new helper
object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>

19 months agoclosedcaption: move cdp->cc_data into shared location
Matthew Waters [Mon, 30 May 2022 11:39:13 +0000 (21:39 +1000)]
closedcaption: move cdp->cc_data into shared location

So it can be used by both ccconverter and cccombiner

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>

19 months agoclosedcaption: move cc_data->cdp to shared file
Matthew Waters [Fri, 13 May 2022 05:19:43 +0000 (15:19 +1000)]
closedcaption: move cc_data->cdp to shared file

Used by both ccconverter and cccombiner

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>

19 months agoccconverter: avoid different indent versions indenting !! differently.
Matthew Waters [Thu, 12 May 2022 03:22:00 +0000 (13:22 +1000)]
ccconverter: avoid different indent versions indenting !! differently.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>

19 months agoclosedcaption: move cdp framerate table to common file
Matthew Waters [Thu, 12 May 2022 03:19:58 +0000 (13:19 +1000)]
closedcaption: move cdp framerate table to common file

shared by both cccombiner and ccconverter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>

19 months agocccombiner: don't assume a single cea608 data packet per buffer
Matthew Waters [Thu, 12 May 2022 03:15:19 +0000 (13:15 +1000)]
cccombiner: don't assume a single cea608 data packet per buffer

e.g. 24fps can have up to 3 and would include either two field0 or
field1 cea608 data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>

19 months agoccconverter: drop data when overflow on extracting cea608 from cc_data
Matthew Waters [Fri, 6 May 2022 04:00:38 +0000 (14:00 +1000)]
ccconverter: drop data when overflow on extracting cea608 from cc_data

If the buffer overflows, then drop rather than causing a failure and
fropping the output buffer indefinitely.  This may have caused downstream to
be waiting for data the will never arrive.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>

19 months agoccconverter: fix framerate passthrough with malformed input
Matthew Waters [Thu, 5 May 2022 08:27:50 +0000 (18:27 +1000)]
ccconverter: fix framerate passthrough with malformed input

If an input is malformed (only produces cea608 field 1 cc_data) then
when in passthrough we would effectively be dropping every second cea608
on output as we would not store any unused cea608 data.

Fix by having all code paths go through the framerate conversion code
which will store and retrieve any relevant data across buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3211>

19 months agoamfcodec: Fix typos
Seungha Yang [Wed, 9 Nov 2022 20:54:18 +0000 (05:54 +0900)]
amfcodec: Fix typos

Fixing typo surfrace -> surface

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3378>

19 months agomfvideosrc: Return S_OK from ISampleGrabberCB callback
Seungha Yang [Wed, 9 Nov 2022 21:03:45 +0000 (06:03 +0900)]
mfvideosrc: Return S_OK from ISampleGrabberCB callback

The Microsoft's ISampleGrabber implementation seems to be ignoring
the HRESULT return value from the callback though,
S_OK is the right HRESULT code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3379>

19 months agogstgl: Fix handling of padded tile formats
Nicolas Dufresne [Tue, 8 Nov 2022 17:47:10 +0000 (17:47 +0000)]
gstgl: Fix handling of padded tile formats

When a tile format is padded and imported as DMABuf, the stride
contains the information about the actual width and height in
number of tiles. This information is needed by the detiling shader
in order accuratly calculate the location of pixels. To fix that,
we also copy the offset and strides into the otuput format and
the converter will ensure that the shader is recompiled whenever
the stride changes.

This fixes video corruptions observed when decoding on MT8195
with videos that aren't not aligned to 64bytes in width.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3365>

19 months agochildproxy: Fix documentation
Edward Hervey [Wed, 9 Nov 2022 08:28:37 +0000 (09:28 +0100)]
childproxy: Fix documentation

Warning: Gst: gst_child_proxy_get_child_by_name_recurse: unknown parameter
'parent' in documentation comment, should be 'child_proxy'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3370>

19 months agovaapi: Add new dmabuf mem type when building caps
Mengkejiergeli Ba [Fri, 29 Oct 2021 07:08:38 +0000 (15:08 +0800)]
vaapi: Add new dmabuf mem type when building caps

Media-driver will return dmabuf mem type GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF2
on the latest platform like Gen12. To enable build caps using dmabuf, need to
add the check for this type at gst_vaapi_build_caps_from_format.

This patch is a portion from Junyan.He@intel.com
https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/393

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1287>

19 months agovaapipostproc: Enable to use DMABuf mem at sink and src pad
Mengkejiergeli Ba [Fri, 29 Oct 2021 06:31:14 +0000 (14:31 +0800)]
vaapipostproc: Enable to use DMABuf mem at sink and src pad

Enable DMABuf mem at both sink and src pad for vaapipostproc caps which
helps to apply DMABuf for more generic use cases: such as "! vaapih264dec !
video/x-raw(memory:DMABuf) ! vaapipostproc ! video/x-raw (memory:DMABuf)
! vaapih265enc"  . Or other mem converions like from DMABuf to VASurface
through vaapipostproc.

This patch is a portion from Junyan.He@intel.com
https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/393

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1287>

19 months agod3d11screencapturesrc: Specify PAR 1/1 to template caps
Seungha Yang [Tue, 8 Nov 2022 10:26:39 +0000 (19:26 +0900)]
d3d11screencapturesrc: Specify PAR 1/1 to template caps

... otherwise PAR can be wrongly signalled during the negotiation

Fixing below pipeline when desktop resolution is not 640x480
gst-launch-1.0.exe \
  d3d11screencapturesrc ! videoscale !
  video/x-raw,width=640,height=480,pixel-aspect-ratio=1/1 ! d3d11videosink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3360>

19 months agotests: examples: va: Add encoders dynamic reconfiguration.
Víctor Manuel Jáquez Leal [Sun, 22 May 2022 10:02:15 +0000 (12:02 +0200)]
tests: examples: va: Add encoders dynamic reconfiguration.

Take the QSV encoder test and used it for VA.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2466>

19 months agova: caps: Fix raw caps for H264 encoding.
Víctor Manuel Jáquez Leal [Sat, 5 Nov 2022 14:12:28 +0000 (15:12 +0100)]
va: caps: Fix raw caps for H264 encoding.

Mesa gallium and Intel i965 ill reports unsupported video formats.

This commit reverts ecb12a05 and adds a deeper workaround, since
ecb12a05 only fix the template caps, but not when renegotation
happens.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2466>

19 months agovabaseenc: Log out the flow error name.
Víctor Manuel Jáquez Leal [Fri, 21 Oct 2022 08:56:59 +0000 (10:56 +0200)]
vabaseenc: Log out the flow error name.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2466>

19 months agovah264enc: Enable parameters change while running.
Víctor Manuel Jáquez Leal [Thu, 20 Oct 2022 09:20:18 +0000 (11:20 +0200)]
vah264enc: Enable parameters change while running.

1. Removes the verification if the internal encoder is not opened
   yet to allow the property setting.

2. And toggles on the base class' reconf flag for each property
   variable that can be modified at run time.

3. Mark those modifiable properties as mutable while playing.

Currently the run-time modifiable properties are:

qpi, qpp, qpb, bitrate, target percentage, target usage and rate control

Other properties can be enabled too, but they need testing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2466>

19 months agovabaseenc: Enable encoder reconfiguration.
Víctor Manuel Jáquez Leal [Thu, 20 Oct 2022 09:13:19 +0000 (11:13 +0200)]
vabaseenc: Enable encoder reconfiguration.

Adds an internal function reset() which drains the internal queues and
calls the reconfig() vmethod.

This reset() method is called inconditionally at set_format() and in
handle_frame() if the instance's reconf flag is enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2466>

19 months agovah264enc: Avoid reopen encoder or renegotiate.
Víctor Manuel Jáquez Leal [Tue, 20 Sep 2022 18:55:18 +0000 (20:55 +0200)]
vah264enc: Avoid reopen encoder or renegotiate.

If parameters remain similar enough to avoid either encoder reopening
or downstream renegotiation, avoid it.

This is going to be useful for dynamic parameters setting.

To check if the stream parameters changed, so the internal encoder has
to be closed and opened again, are required two steps:

1. If input caps, profile, chroma or rate control mode have changed.
2. If any of the calculated variables and element properties have
   changed.

Later on, only if the output caps also changed, the pipeline
is renegotiated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2466>

19 months agovaencoder: Add gst_va_encoder_get_reconstruct_pool_config()
Víctor Manuel Jáquez Leal [Tue, 20 Sep 2022 17:11:35 +0000 (19:11 +0200)]
vaencoder: Add gst_va_encoder_get_reconstruct_pool_config()

This method will return the caps configured in the reconstruct buffer
pool, and its maxium number of buffers to allocate.

The caps are needed later to know if the internal encoder has to be
reopened if the stream properties change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2466>

19 months agodirectshow: Demote rank of device provider to GST_RANK_NONE
Seungha Yang [Mon, 7 Nov 2022 18:43:02 +0000 (03:43 +0900)]
directshow: Demote rank of device provider to GST_RANK_NONE

Current directshow plugin seems to be unstable and unmaintained
for many many years.

See
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3323
and
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1828

Disable this device provider by default to avoid any side-effect
of this plugin

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3355>

19 months agovah264enc: Fix properties documentation.
Victor Manuel Jaquez Leal [Tue, 8 Nov 2022 10:43:19 +0000 (11:43 +0100)]
vah264enc: Fix properties documentation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3361>

19 months agova: Document device-path property.
Victor Manuel Jaquez Leal [Tue, 8 Nov 2022 10:36:12 +0000 (11:36 +0100)]
va: Document device-path property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3361>

19 months agova: Reenable plugin cache.
Victor Manuel Jaquez Leal [Tue, 8 Nov 2022 09:37:10 +0000 (10:37 +0100)]
va: Reenable plugin cache.

This basically a revert of commit 9bb560e7

Also it adds vaav1dec.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3361>

19 months agovavp8dec, vampeg2dec: Fix type name.
Victor Manuel Jaquez Leal [Tue, 8 Nov 2022 10:34:20 +0000 (11:34 +0100)]
vavp8dec, vampeg2dec: Fix type name.

The camel case name is wrong when registering the type.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3361>

19 months agoci: sprinkle some date -R to easier see how long build steps take
Tim-Philipp Müller [Mon, 7 Nov 2022 18:38:07 +0000 (18:38 +0000)]
ci: sprinkle some date -R to easier see how long build steps take

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3354>

19 months agoci: use 8 parallel jobs for the integration test suite
Tim-Philipp Müller [Mon, 7 Nov 2022 18:29:52 +0000 (18:29 +0000)]
ci: use 8 parallel jobs for the integration test suite

The runners have a lower core count than the previous
generation so the integration tests run much slower
overall than the used to, so fix that by running more
in parallel again. The build time is measured in seconds
and much faster than it used to be, so should still be
a reasonable trade-off, and means re-tried jobs will
complete faster.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3354>

19 months agovideoconvert, videoscaleconvert: fix element description
Talha Khan [Tue, 8 Nov 2022 14:42:58 +0000 (22:42 +0800)]
videoconvert, videoscaleconvert: fix element description

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3362>

19 months agoallocator: Switch `allow-none` annotations to `nullable` / `optional`
Sebastian Dröge [Tue, 8 Nov 2022 15:45:37 +0000 (17:45 +0200)]
allocator: Switch `allow-none` annotations to `nullable` / `optional`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3364>

19 months agoallocator: Copy allocator name in gst_allocator_register()
Sebastian Dröge [Tue, 8 Nov 2022 15:44:54 +0000 (17:44 +0200)]
allocator: Copy allocator name in gst_allocator_register()

The parameter is not marked as `transfer full` and stays around in the
hash table, so we will have to copy it ourselves.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3364>

19 months agotracers: latency: document the 'reported' flag
Guillaume Desmottes [Tue, 8 Nov 2022 07:56:47 +0000 (08:56 +0100)]
tracers: latency: document the 'reported' flag

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3359>

19 months agovacaps: Sort raw caps according their efficiency.
Víctor Manuel Jáquez Leal [Wed, 26 Oct 2022 16:05:32 +0000 (18:05 +0200)]
vacaps: Sort raw caps according their efficiency.

Caps negotiations considers template caps order. This patch sets the
correct order according the feture caps: VAMemory, DMABuf and
SystemMemory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3349>

19 months agoBack to development
Tim-Philipp Müller [Tue, 8 Nov 2022 02:08:08 +0000 (02:08 +0000)]
Back to development

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3358>

19 months agosubprojects: pin gst-plugins-rs for GStreamer 1.21.2 release
Tim-Philipp Müller [Tue, 8 Nov 2022 01:51:20 +0000 (01:51 +0000)]
subprojects: pin gst-plugins-rs for GStreamer 1.21.2 release

19 months agoRelease 1.21.2
Tim-Philipp Müller [Mon, 7 Nov 2022 23:53:59 +0000 (23:53 +0000)]
Release 1.21.2

19 months agoUpdate ChangeLogs for 1.21.2
Tim-Philipp Müller [Mon, 7 Nov 2022 23:53:57 +0000 (23:53 +0000)]
Update ChangeLogs for 1.21.2

19 months agohotdoc: gst-hotdoc-plugins-scanner is not needed for libraries
Xavier Claessens [Mon, 7 Nov 2022 14:27:09 +0000 (09:27 -0500)]
hotdoc: gst-hotdoc-plugins-scanner is not needed for libraries

Meson >= 0.64.0 does not allow any more to add executables into
hotdoc.generate_doc(..., dependencies: ...) and it should not be needed
any way.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3352>

19 months agosrt: Add a property to disable automatic reconnect
Jan Alexander Steffens (heftig) [Tue, 8 Dec 2020 15:55:26 +0000 (16:55 +0100)]
srt: Add a property to disable automatic reconnect

This adds a new boolean property `auto-reconnect`, defaulting to `true`.

Setting it to `false` makes the elements (in caller mode) immediately
report an error to the application instead of trying to reconnect.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3326>

19 months agodiscoverer: Annotate `DiscovererInfo::get_audio_streams()` and others with the concre...
Sebastian Dröge [Mon, 7 Nov 2022 18:31:25 +0000 (20:31 +0200)]
discoverer: Annotate `DiscovererInfo::get_audio_streams()` and others with the concrete stream info type

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3353>

19 months agovabasetransform: Fail if cannot import the input buffer.
Víctor Manuel Jáquez Leal [Wed, 26 Oct 2022 16:04:17 +0000 (18:04 +0200)]
vabasetransform: Fail if cannot import the input buffer.

Otherwise got a buffer double free.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3348>

19 months agomfvideosrc: Add support for DirectShow capture filter
Seungha Yang [Sat, 5 Nov 2022 16:53:46 +0000 (01:53 +0900)]
mfvideosrc: Add support for DirectShow capture filter

Adding DirecShow video capture filter mode, in addition
to existing MediaFoundation and WinRT(UWP) mode, to support
DirectShow only filters (not KS driver compatible)
such as custom virtual camera filters.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3350>

19 months agotests: gstinfo: Test set_threshold_from_string's new reset behavior
Jan Alexander Steffens (heftig) [Tue, 1 Sep 2020 14:01:08 +0000 (16:01 +0200)]
tests: gstinfo: Test set_threshold_from_string's new reset behavior

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/605>

19 months agotests: gstinfo: Make logging tests pass when GST_DEBUG is set
Jan Alexander Steffens (heftig) [Sat, 22 Aug 2020 21:42:40 +0000 (23:42 +0200)]
tests: gstinfo: Make logging tests pass when GST_DEBUG is set

Use gst_debug_set_threshold_from_string's new reset behavior to undo
GST_DEBUG and ensure the logging tests have a known configuration.

`gst_debug_set_threshold_from_string ("LOG", TRUE)` has the same effect
as `gst_debug_set_threshold_from_string ("", TRUE)` followed by
`gst_debug_set_default_threshold (GST_LEVEL_LOG)`.

Don't bother remembering the default log level set when the test
started. It will get reset by the next test, anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/605>

19 months agoinfo: Reset patterns with set_threshold_from_string
Jan Alexander Steffens (heftig) [Sat, 22 Aug 2020 20:41:15 +0000 (22:41 +0200)]
info: Reset patterns with set_threshold_from_string

TLDR: Make `gst_set_threshold_from_string ("", TRUE)` reset *all*
threshold settings, including those set by previous invocations of
`gst_debug_set_threshold_from_string`.

The docs say:

    @reset: %TRUE to clear all previously-set debug levels before setting
        new thresholds

What actually happens is it sets the default threshold to `ERROR`,
leaves the patterns in place and calls
`gst_debug_category_reset_threshold` on each category.

In effect, any category that is matched by a pattern gets reset to that
threshold if the app changed it by directly invoking
`gst_debug_category_set_threshold`. All other categories are reset to
`ERROR`.

In my opinion this parameter currently has little value, as the same
effect can be achieved by including `ERROR` (without a pattern) in the
string, as in `"foo*:WARNING,*bar:INFO,ERROR"`.

What I actually expect it to do is reset *all* threshold settings,
including those set by previous invocations of
`gst_debug_set_threshold_from_string`, starting off with a clean slate
for the patterns provided with the call.

Otherwise there is no API to do this, besides:

  - Painfully removing patterns one-by-one via
    `gst_debug_unset_threshold_for_name` *if* you know what the patterns
    are.
  - Adding a `*:FOO` pattern to affect all categories, which makes the
    default threshold useless and practically leaks all the old
    patterns.

In my opinion this also makes it fit better into the layers of threshold
config, which is:

1. Temporary:
  - `gst_debug_category_set_threshold`
  - `gst_debug_category_reset_threshold`
2. Patterns:
  - `gst_debug_set_threshold_for_name`
  - `gst_debug_unset_threshold_for_name`
  - `gst_debug_set_threshold_from_string`
  - `GST_DEBUG`
3. Default:
  - `gst_debug_set_default_threshold`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/605>

19 months agortmp2: Improve error messages
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 15:23:41 +0000 (16:23 +0100)]
rtmp2: Improve error messages

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

19 months agortmp2/connection: Pass triggering GError in 'error' signal
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 15:04:24 +0000 (16:04 +0100)]
rtmp2/connection: Pass triggering GError in 'error' signal

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

19 months agortmp2/connection: Pass triggering GError to _emit_error
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 15:02:53 +0000 (16:02 +0100)]
rtmp2/connection: Pass triggering GError to _emit_error

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

19 months agortmp2/connection: Discern reasons for cancelling all commands
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 15:01:10 +0000 (16:01 +0100)]
rtmp2/connection: Discern reasons for cancelling all commands

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

19 months agortmp2/connection: Handle EOF like error
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 14:53:13 +0000 (15:53 +0100)]
rtmp2/connection: Handle EOF like error

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

19 months agortmp2/client: Make sure 'salt' is not NULL
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 14:49:22 +0000 (15:49 +0100)]
rtmp2/client: Make sure 'salt' is not NULL

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

19 months agortmp2/client: Make sure 'reason' is not NULL
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 14:46:42 +0000 (15:46 +0100)]
rtmp2/client: Make sure 'reason' is not NULL

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

19 months agortmp2/client: Make sure 'desc' is not NULL
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 15:13:42 +0000 (16:13 +0100)]
rtmp2/client: Make sure 'desc' is not NULL

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

19 months agortmp2/client: Make sure 'code' is not NULL
Jan Alexander Steffens (heftig) [Wed, 1 Dec 2021 15:11:31 +0000 (16:11 +0100)]
rtmp2/client: Make sure 'code' is not NULL

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>

19 months agowebrtcbin: Don't duplicate enum string values
Edward Hervey [Mon, 7 Nov 2022 06:45:53 +0000 (07:45 +0100)]
webrtcbin: Don't duplicate enum string values

Some were leaked when debugging was enabled. Instead just directly use the
static strings as-is.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3347>

19 months agogstpad: Avoid race in (un)setting EOS flag on sinkpads
Edward Hervey [Wed, 21 Sep 2022 08:05:05 +0000 (10:05 +0200)]
gstpad: Avoid race in (un)setting EOS flag on sinkpads

The scenario is the following:

* Thread 1 is pushing an EOS event on a sinkpad
* Thread 2 is pushing a STREAM_START event on the same sinkpad before Thread 1
returns. Note : It starts pushing the event after Thread 1 took the object lock.

There is a potential race between:

* The moment Thread 1 sets the EOS flag once it has finished sending the
event (via store_sticky_event). When it does that it has both the STREAM and
OBJECT lock

* The moment Thread 2 sends the STREAM_START event (Which should release that
EOS status), but removing the EOS flag is only done while holding the OBJECT
lock and not the STREAM_LOCK, which means it could be re-set by Thread 1 before
it then checks again the EOS flag (without the STREAM lock taken).

The EOS flag unsetting by STREAM_START should be done with the STREAM lock
taken, otherwise it will be racy.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3320>

19 months agovideocodectestsink: Add YUV422 support
Nicolas Dufresne [Fri, 4 Nov 2022 18:24:58 +0000 (14:24 -0400)]
videocodectestsink: Add YUV422 support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3331>

19 months agogst-inspect: print doc urls for Rust plugins
Tim-Philipp Müller [Sun, 6 Nov 2022 18:10:44 +0000 (18:10 +0000)]
gst-inspect: print doc urls for Rust plugins

We have documentation for them now after all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3346>

19 months agoqtdemux: use unsigned int types to store result of QT_UINT32
Justin Chadwell [Wed, 2 Sep 2020 09:49:40 +0000 (10:49 +0100)]
qtdemux: use unsigned int types to store result of QT_UINT32

In a few cases throughout qtdemux, the results of QT_UINT32 were being
stored in a signed integer, which could cause subtle bugs in the case of
an integer overflow, even allowing the the result to equal a negative
number!

This patch prevents this by simply storing the results of this function
call properly in an unsigned integer type. Additionally, we fix up the
length checking with stsd parsing to prevent cases of child atoms
exceeding their parent atom sizes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3344>

19 months agod3d11videosink: Always clear back buffer on resize
Seungha Yang [Sat, 5 Nov 2022 12:35:08 +0000 (21:35 +0900)]
d3d11videosink: Always clear back buffer on resize

Swapchain may not need to be resized if the size of backbuffer
is equal to the previous size. Then previously rendered frame will be stay
on the screen. Do clear back buffer whenever resize() is called

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3341>

19 months agosubparse: Fix non-closed tag handling.
Edward Hervey [Sat, 5 Nov 2022 06:34:27 +0000 (07:34 +0100)]
subparse: Fix non-closed tag handling.

Unclear what the goal was, but we could end up reading way past the next_tag.

Instead just move everything from after the end tag ('>') to the next_tag.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3340>

19 months agoavutils: Add missing space in doc
Nicolas Dufresne [Fri, 4 Nov 2022 18:17:39 +0000 (14:17 -0400)]
avutils: Add missing space in doc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3330>

19 months agoavviddec: Initialize std_compliance to default
Nicolas Dufresne [Fri, 4 Nov 2022 18:15:34 +0000 (14:15 -0400)]
avviddec: Initialize std_compliance to default

This was missed in the initial patch.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3330>

19 months agoqsv: Fix encoding error when input memory belongs to other GPU
Seungha Yang [Fri, 4 Nov 2022 15:00:43 +0000 (00:00 +0900)]
qsv: Fix encoding error when input memory belongs to other GPU

Copy frame if VA display of input buffer is different from that
of encoder, like we've been doing on Windows

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3335>

19 months agoidentity: fix "handoff" signal docs
Tim-Philipp Müller [Sat, 5 Nov 2022 00:06:25 +0000 (00:06 +0000)]
identity: fix "handoff" signal docs

The docs list an extra pad argument, which doesn't
match the actual signal function signature. Probably
a copy'n'paste mistake when copying things from fakesink.

Fixes #1546

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3337>

19 months agova: baseenc: Do not import the VA surface from other display.
He Junyan [Fri, 4 Nov 2022 13:52:39 +0000 (21:52 +0800)]
va: baseenc: Do not import the VA surface from other display.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1167
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>

19 months agova: compositor: Do not use allocator and pool from other display.
He Junyan [Fri, 4 Nov 2022 13:26:23 +0000 (21:26 +0800)]
va: compositor: Do not use allocator and pool from other display.

Just like the va decoder, the compositor should not use allocator
and pool from other display. Also, when importing the input buffer,
if it is from other display, we should fallback to memory copy.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1167
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>

19 months agova: basetransform: Do not use allocator and pool from other display.
He Junyan [Fri, 4 Nov 2022 09:12:22 +0000 (17:12 +0800)]
va: basetransform: Do not use allocator and pool from other display.

Just like the va decoder, the vpp and deinterlace should not use allocator
and pool from other display. Also, when importing the input buffer, if it
is from other display, we should fallback to memory copy.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1167
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>

19 months agova: basedec: Do not use allocator and pool from other display.
He Junyan [Fri, 4 Nov 2022 09:08:12 +0000 (17:08 +0800)]
va: basedec: Do not use allocator and pool from other display.

The command line such as:
  gst-launch-1.0 -vf filesrc location=1.264 ! h264parse !
  vah264dec ! varenderD129postproc ! fakesink
The decoder here gets the allocation proposal from the vpp which is
on another GPU device. The allocator and pool belong to other display
and should not be used in the decoder.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1167
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>

19 months agolibs: va: Add API to peek the va buffer's display.
He Junyan [Fri, 4 Nov 2022 12:28:34 +0000 (20:28 +0800)]
libs: va: Add API to peek the va buffer's display.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>