platform/upstream/gstreamer.git
3 years agod3d11window: Remove hack related to color space selection
Seungha Yang [Thu, 9 Dec 2021 10:55:04 +0000 (19:55 +0900)]
d3d11window: Remove hack related to color space selection

Use input GstVideoColorPrimaries without any special case handling
otherwise rendered image color would be very wrong.

The hack was added to work around an issue that some Intel driver
couldn't handle wide color gamut image without HDR10 metadata, specifically PQ image.
But device capability can be checked via a method added in
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1723
so there's no issue now.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1175
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1430>

3 years agod3d11window: Fix typo in debug message
Seungha Yang [Thu, 9 Dec 2021 10:51:04 +0000 (19:51 +0900)]
d3d11window: Fix typo in debug message

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

3 years agoelementfactory: Annotate create_full and make_full to take arrays
Corentin Noël [Wed, 8 Dec 2021 11:27:04 +0000 (12:27 +0100)]
elementfactory: Annotate create_full and make_full to take arrays

We need the array annotation for it to be usable from the introspection side.

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

3 years agocodecs: h264decoder: Fix return value type
Benjamin Gaignard [Wed, 8 Dec 2021 10:08:30 +0000 (11:08 +0100)]
codecs: h264decoder: Fix return value type

Return value should be GstFlowReturn not gboolean

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

3 years agocodecs: h265decoder: Fix return value if klass->new_picture isn't set
Benjamin Gaignard [Tue, 7 Dec 2021 16:09:11 +0000 (17:09 +0100)]
codecs: h265decoder: Fix return value if klass->new_picture isn't set

If klass->new_picture isn't set we need to initialize
ret with GST_FLOW_OK to avoid unwanted error case

Fixes: 5b405d15858b ("codecs: h265decoder: Use GstFlowReturn everywhere")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1426>

3 years agogstnetclockclient: signal lost sync if remote time resets
Danny Smith [Wed, 25 Apr 2018 12:30:51 +0000 (14:30 +0200)]
gstnetclockclient: signal lost sync if remote time resets

When detecting the remote time has been reset which may occur if remote
device providing the clock server has been power reset, then clock is
no longer synced. Setting clock state will trigger a signal to client
informing on sync lost making it possibility to take appropriate action.

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

3 years agowpevideosrc: Use basesrc event vfunc
Philippe Normand [Mon, 6 Dec 2021 16:47:14 +0000 (16:47 +0000)]
wpevideosrc: Use basesrc event vfunc

Allows for basic default handling from the base class.

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

3 years agoci: run fedora amd64 docker jobs on packet runners
Tim-Philipp Müller [Mon, 6 Dec 2021 14:02:00 +0000 (14:02 +0000)]
ci: run fedora amd64 docker jobs on packet runners

Which have much better network connectivity to fdo gitlab.

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

3 years agojpegdec: only allow conversions from RGB
Guillaume Desmottes [Mon, 6 Dec 2021 14:37:06 +0000 (15:37 +0100)]
jpegdec: only allow conversions from RGB

libjpeg-turbo only supports converting from RGB to other RGB formats.
Fix runtime error when trying to convert from a YUV format for example.

Fix #916

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

3 years agoteletextdec: fix minor string leak
Tim-Philipp Müller [Fri, 3 Dec 2021 13:24:25 +0000 (13:24 +0000)]
teletextdec: fix minor string leak

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

3 years agoci: fedora-docker: Cache media files
Nicolas Dufresne [Thu, 2 Dec 2021 22:57:09 +0000 (17:57 -0500)]
ci: fedora-docker: Cache media files

As of now all integration tests endup fetching 600MB of media every run. This
will increase the docker side, but this is to the traceof that the docker
image will quickly be cached on all runners.

Fixes #841

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

3 years agoristsink: set properties on children early
Marc Leeman [Thu, 2 Dec 2021 14:52:06 +0000 (15:52 +0100)]
ristsink: set properties on children early

The properties on the udpsink/udpsrc elements need to be set before
there is any state change. If not, in a network without default gateway,
udpsink tries to bind an a NULL interface and fails.

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

3 years agov4l2codecs: mpeg2: Fix selected sizeimage
Nicolas Dufresne [Fri, 3 Dec 2021 12:53:54 +0000 (07:53 -0500)]
v4l2codecs: mpeg2: Fix selected sizeimage

Due to a copy paste bug, the bitdepth was never set and that was leading
to requesting sizeimage of 0. Previously that worked since the driver
would in that case pick a size for us. But now the we bumped the minimum
to 4KB, the driver happily allocate 4KB of bitstream which lead to
decoding error.

As MPEG2 have a fixed bitdeph of 8, use a define instead of the run-time
variable.

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

3 years agov4l2codecs: vp9: Drop frames on non-keyframe format change
Nicolas Dufresne [Wed, 1 Dec 2021 17:16:40 +0000 (12:16 -0500)]
v4l2codecs: vp9: Drop frames on non-keyframe format change

V4L2 does not yet support this feature, this will skip over the
transition portion up to the next keyframe.

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

3 years agov4l2codecs: Fix renegotiation
Nicolas Dufresne [Wed, 1 Dec 2021 14:51:57 +0000 (09:51 -0500)]
v4l2codecs: Fix renegotiation

If we hold the last reference to the allocator, leaving the device
streaming will cause an EBUSY error when trying to free the allocate
buffers.

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

3 years agod3d11vp9dec: Drop frames on non-keyframe format change
Seungha Yang [Thu, 2 Dec 2021 07:26:08 +0000 (16:26 +0900)]
d3d11vp9dec: Drop frames on non-keyframe format change

... in case of NVIDIA GPU

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

3 years agonvvp9sldec: Drop frames on non-keyframe format change
Seungha Yang [Thu, 2 Dec 2021 07:04:21 +0000 (16:04 +0900)]
nvvp9sldec: Drop frames on non-keyframe format change

NVDEC doesn't seem to be able to handle the case

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

3 years agocodecs: vp9: Drop frames on non-keyframe format change
Seungha Yang [Thu, 2 Dec 2021 07:03:14 +0000 (16:03 +0900)]
codecs: vp9: Drop frames on non-keyframe format change

... if subclass does not support the case

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

3 years agocodecs: vp9: Also consider render_width/height
Nicolas Dufresne [Wed, 1 Dec 2021 17:10:42 +0000 (12:10 -0500)]
codecs: vp9: Also consider render_width/height

Also emits new_sequence if on keyframe and the render_width/height have
change. The subclass can always optimize this if the frame resolution
didn't change, the output caps needs to reflect this though.

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

3 years agortpsink: set properties on children early
Marc Leeman [Tue, 30 Nov 2021 09:24:37 +0000 (10:24 +0100)]
rtpsink: set properties on children early

The properties on the udpsink/udpsrc elements need to be set before
there is any state change. If not, in a network without default gateway,
udpsink tries to bind an a NULL interface and fails.

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

3 years agovaapidecodebin: Misc enhancements.
Víctor Manuel Jáquez Leal [Wed, 1 Dec 2021 14:36:44 +0000 (15:36 +0100)]
vaapidecodebin: Misc enhancements.

- Use GST_WARNING rather than g_critical

- Replace gst_ghost_pad_new_from_template() with
  gst_ghost_pad_new() to avoid using the template.

- Declare extern variable

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

3 years agovaapidecode: Autogenerate caps template.
Víctor Manuel Jáquez Leal [Wed, 1 Dec 2021 11:26:11 +0000 (12:26 +0100)]
vaapidecode: Autogenerate caps template.

vaapidecode is used in vaapidecodebin and it exposes all the
theoretically supported caps, but that slows down autoplug. With this
autplug is negotiated faster, giving more option to decodebin to select
other decoder.

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

3 years agov4l2codecs: vp9: Remove uneeded picture data
Nicolas Dufresne [Tue, 30 Nov 2021 19:48:03 +0000 (14:48 -0500)]
v4l2codecs: vp9: Remove uneeded picture data

The GstV4l2Request now holds a reference on the picture buffer and is
recounted already. This effectively removes usage of GRefCount which is only
available in GLib 2.58, while we support 2.56.

Fixes #910

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

3 years agov4l2codecs: decoder: Add method to get the pic_buf
Nicolas Dufresne [Tue, 30 Nov 2021 22:05:22 +0000 (17:05 -0500)]
v4l2codecs: decoder: Add method to get the pic_buf

This helper will be needed for VP9 frame duplication.

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

3 years agov4l2codecs: vp9: Add missing error checks in decide_allocation
Nicolas Dufresne [Tue, 30 Nov 2021 21:08:18 +0000 (16:08 -0500)]
v4l2codecs: vp9: Add missing error checks in decide_allocation

This could otherwise lead to crash.

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

3 years agoci: Avoid fetching tags for build jobs
Jordan Petridis [Tue, 30 Nov 2021 14:45:07 +0000 (16:45 +0200)]
ci: Avoid fetching tags for build jobs

Avoid fetching tags since we don't need them for builds.
Only caveat might be what happens when a pipeline from
a tag is triggered

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

3 years agoci: Looks like we where not triggering pipelines for tags
Jordan Petridis [Tue, 30 Nov 2021 14:58:59 +0000 (16:58 +0200)]
ci: Looks like we where not triggering pipelines for tags

Oops.

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

3 years agoci: Set GIT_DEPTH variable
Jordan Petridis [Tue, 30 Nov 2021 14:29:18 +0000 (16:29 +0200)]
ci: Set GIT_DEPTH variable

This switches gitlab-runner to using shallow clones

related #841

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

3 years agobasesink: Add missing annotations
Corentin Noël [Fri, 26 Nov 2021 09:13:08 +0000 (10:13 +0100)]
basesink: Add missing annotations

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

3 years agopushsrc: Add missing annotations
Corentin Noël [Fri, 26 Nov 2021 09:12:50 +0000 (10:12 +0100)]
pushsrc: Add missing annotations

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

3 years agobitwriter: Add missing annotations
Corentin Noël [Fri, 26 Nov 2021 09:12:32 +0000 (10:12 +0100)]
bitwriter: Add missing annotations

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

3 years agobaseparse: Add missing annotations
Corentin Noël [Fri, 26 Nov 2021 09:11:53 +0000 (10:11 +0100)]
baseparse: Add missing annotations

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

3 years agov4l2codecs: h264: Fix typo in comment
Nicolas Dufresne [Wed, 24 Nov 2021 16:17:22 +0000 (11:17 -0500)]
v4l2codecs: h264: Fix typo in comment

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

3 years agov4l2codecs: h264: Properly set pic_num/frame_num
Nicolas Dufresne [Wed, 24 Nov 2021 16:17:40 +0000 (11:17 -0500)]
v4l2codecs: h264: Properly set pic_num/frame_num

The V4L2 uAPI uses pic_num for both PicNum and ShortTermPicNum. It also
doe the same for both FrameNum and LongTermFrameIdx. This change does
not change the fluster score, but fixed a visual corruption noticed
with some third party streams.

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

3 years agova: Use a lock to protect the surface copy by using vpp.
He Junyan [Tue, 23 Nov 2021 08:35:16 +0000 (16:35 +0800)]
va: Use a lock to protect the surface copy by using vpp.

 If we use vpp to do the surface copy, its operation is not atomic.
 We need to maintain the filter's context unchanged during the whole
 copy progress.

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

3 years agova: Use the GstVaSurfaceCopy of the allocator atomically.
He Junyan [Tue, 23 Nov 2021 13:10:55 +0000 (21:10 +0800)]
va: Use the GstVaSurfaceCopy of the allocator atomically.

The mem_copy() of the allocator can be called simultaneously from
different threads. We should use atomic pointer operations to create
and use the GstVaSurfaceCopy of the allocator.

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

3 years agova: DMA allocator: Set the copied memory properly when popped from pool.
He Junyan [Mon, 22 Nov 2021 08:07:27 +0000 (16:07 +0800)]
va: DMA allocator: Set the copied memory properly when popped from pool.

The current code does not set the copied memory correctly when it is popped
from the surface cache pool.
1. We forget to ref the allocator, which causes the allocator to be freed
   unexpected, and we get a crash later because of the memory violation.
2. We forget to add ref_mems_count, which causes the surface leak because
   the surface can not be pushed back to the cache pool again.

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

3 years agov4l2codecs: gstv4l2decoder: set minimum sizeimage
Daniel Almeida [Thu, 22 Apr 2021 19:29:20 +0000 (16:29 -0300)]
v4l2codecs: gstv4l2decoder: set minimum sizeimage

Set minimum sizeimage such that there is enough space for any overhead
introduced by the codec.

Notably fix a vp9 issue in which a small image would not have a
bitstream buffer large enough to accomodate it.

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

3 years agov4l2codecs: gstv4l2codecsvp9dec: implement a render delay
Daniel Almeida [Wed, 7 Apr 2021 19:15:32 +0000 (16:15 -0300)]
v4l2codecs: gstv4l2codecsvp9dec: implement a render delay

The v4l2 backend support delayed output for performance reasons.
It is then possible to use render delays to queue multiple requests
simultaneously, thus increasing performance.

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

3 years agov4l2codecs: vp9dec: Implement VP9 v4l2 decoder
Daniel Almeida [Tue, 30 Mar 2021 16:30:46 +0000 (13:30 -0300)]
v4l2codecs: vp9dec: Implement VP9 v4l2 decoder

Implement a v4l2 based vp9 decoder element based on the preexisting vp8
v4l2 decoder.

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

3 years agov4l2codecs: update to the new uAPI
Daniel Almeida [Wed, 14 Jul 2021 19:21:59 +0000 (16:21 -0300)]
v4l2codecs: update to the new uAPI

The new VP9 stateless API is in its way to be destaged. Update our
headers to match.

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

3 years agocodecs: gstvp9decoder: copy frame->system_frame_number into picture
Daniel Almeida [Thu, 8 Apr 2021 13:40:03 +0000 (10:40 -0300)]
codecs: gstvp9decoder: copy frame->system_frame_number into picture

A comment in gstvp9picture.h states that picture->system_frame_number
should get its value from frame->system_frame_number, but in fact
it was never copied at all.

Fix it.

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

3 years agocodecs: gstvp9{decoder|statefulparser}: optionally parse compressed headers
Daniel Almeida [Thu, 8 Apr 2021 13:38:55 +0000 (10:38 -0300)]
codecs: gstvp9{decoder|statefulparser}: optionally parse compressed headers

Rework gstvp9{decoder|statefulparser} to optionally parse compressed headers.
The information in these headers might be needed for accelerators
downstream, so optionally parse them if downstream requests it.

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

3 years agov4l2: handle 0x0 sizes gracefully
Wim Taymans [Mon, 29 Nov 2021 14:35:36 +0000 (15:35 +0100)]
v4l2: handle 0x0 sizes gracefully

Also ignore 0x0 sizes in the fallback case and assume the size can be
anything between 1x1 and MAXxMAX.

This fixes the case where a width=0, height=0 caps are created. Whith
this patch the caps will contain width=[1,MAX], height=[1,MAX].

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

3 years agowebrtcbin: deduplicate extmaps
Mathieu Duponchelle [Tue, 23 Nov 2021 19:12:06 +0000 (20:12 +0100)]
webrtcbin: deduplicate extmaps

When an extmap is defined twice for the same ID, firefox complains and
errors out (chrome is smart enough to accept strict duplicates).

To work around this, we deduplicate extmap attributes, and also error
out when a different extmap is defined for the same ID.

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

3 years agocodecs: mpeg2decoder: drain() only when significant sequence changes.
He Junyan [Tue, 23 Nov 2021 05:30:17 +0000 (13:30 +0800)]
codecs: mpeg2decoder: drain() only when significant sequence changes.

There are a lot of info in the mpeg2's sequence(also including ext
display_ext and scalable_ext). We need to notify the subclass about
its change, but not all the changes should trigger a drain(), which
may change the output picture order. For example, the matrix changes
in sequence header does not change the decoder context and so no need
to trigger a drain().

Fixes: #899
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1375>

3 years agoopenjpegenc: Fix build warning
Seungha Yang [Tue, 23 Nov 2021 14:52:18 +0000 (23:52 +0900)]
openjpegenc: Fix build warning

Compiling C object subprojects/gst-plugins-bad/ext/openjpeg/gstopenjpeg.dll.p/gstopenjpegenc.c.obj
../subprojects/gst-plugins-bad/ext/openjpeg/gstopenjpegenc.c(416):
  warning C4133: '=': incompatible types - from 'GstFlowReturn (__cdecl *)(GstVideoEncoder *,GstVideoCodecFrame *)' to
  'gboolean (__cdecl *)(GstVideoEncoder *,GstVideoCodecFrame *)'

../subprojects/gst-plugins-bad/ext/openjpeg/gstopenjpegenc.c(418):
  warning C4133: '=': incompatible types - from 'GstFlowReturn (__cdecl *)(GstVideoEncoder *,GstVideoCodecFrame *)' to
  'gboolean (__cdecl *)(GstVideoEncoder *,GstVideoCodecFrame *)'

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

3 years agortpfunnel: fix extmap handling on accept-caps
Mathieu Duponchelle [Tue, 23 Nov 2021 19:54:57 +0000 (20:54 +0100)]
rtpfunnel: fix extmap handling on accept-caps

Follow-up on 97d83056b315c56834eaa6776ae4c6a0848b5ef9, only check
for intersection with the current srccaps when checking if a sinkpad
can accept caps.

I must have been lucky in my firefox testing then, and always entered
the code path with audio getting negotiated first, thus not failing
the is_subset check when srccaps had been negotiated as
application/x-rtp, and an accept-caps query was made for the video
caps with a defined extmap.

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

3 years agotutorials: Fix typos
Krystian Wojtas [Tue, 23 Nov 2021 18:56:27 +0000 (19:56 +0100)]
tutorials: Fix typos

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

3 years agogssink: add metadata property
Guillaume Desmottes [Tue, 23 Nov 2021 08:28:57 +0000 (09:28 +0100)]
gssink: add metadata property

This property can be used to set metadata on the storage object.

Similar API has been added to the S3 sink already, see
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/613

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

3 years agobasesrc: Add annotation to virtual methods with (out) parameters
Corentin Noël [Tue, 23 Nov 2021 07:08:36 +0000 (08:08 +0100)]
basesrc: Add annotation to virtual methods with (out) parameters

This allows to actually use these virtual methods from the GObject introspection.

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

3 years agod3d11: Update comments
Seungha Yang [Mon, 22 Nov 2021 15:25:07 +0000 (00:25 +0900)]
d3d11: Update comments

Remove copy & paste mistake (this is not GstGL) and add more
description.

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

3 years agovapostproc, vadeinterlace: don't transform caps if no intersection.
Víctor Manuel Jáquez Leal [Fri, 19 Nov 2021 14:13:28 +0000 (15:13 +0100)]
vapostproc, vadeinterlace: don't transform caps if no intersection.

If caps to transform don't intersect with those supported by the VA
filter (VAEntrypointVideoProc) then return them as is, because only
pass-through mode is the only possibility.

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

3 years agovapostproc: Append featured caps rather than merge.
Víctor Manuel Jáquez Leal [Tue, 16 Nov 2021 09:40:03 +0000 (10:40 +0100)]
vapostproc: Append featured caps rather than merge.

So it would be possible to honor upstream preference.

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

3 years agovapostproc: Remove dead code.
Víctor Manuel Jáquez Leal [Mon, 25 Oct 2021 17:22:05 +0000 (19:22 +0200)]
vapostproc: Remove dead code.

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

3 years agova: filter: Validate input parameter in internal function.
Víctor Manuel Jáquez Leal [Mon, 25 Oct 2021 17:22:19 +0000 (19:22 +0200)]
va: filter: Validate input parameter in internal function.

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

3 years agova: allocator: log drm modifier
Víctor Manuel Jáquez Leal [Mon, 15 Nov 2021 09:15:38 +0000 (10:15 +0100)]
va: allocator: log drm modifier

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

3 years agova: vpp: Fix the memory leak in fixate_caps().
He Junyan [Mon, 22 Nov 2021 09:34:22 +0000 (17:34 +0800)]
va: vpp: Fix the memory leak in fixate_caps().

For the BaseTransform class, the function of fixate_caps(), takes
the ownership of "othercaps". So we should clear it in our subclass.

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

3 years agoid3v2mux: Map GST_TAG_MUSICBRAINZ_RELEASETRACKID
Jean Felder [Fri, 12 Nov 2021 12:54:59 +0000 (13:54 +0100)]
id3v2mux: Map GST_TAG_MUSICBRAINZ_RELEASETRACKID

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

3 years agoid3v2mux: Map GST_TAG_MUSICBRAINZ_RELEASEGROUPID
Jean Felder [Fri, 12 Nov 2021 12:51:56 +0000 (13:51 +0100)]
id3v2mux: Map GST_TAG_MUSICBRAINZ_RELEASEGROUPID

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

3 years agoci: fix minor comment typo
Marc-André Lureau [Mon, 22 Nov 2021 08:46:15 +0000 (12:46 +0400)]
ci: fix minor comment typo

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1371>

3 years agoplayer: Ensure the GstPlay is created before the wrapped renderer
Philippe Normand [Sat, 13 Nov 2021 12:22:36 +0000 (12:22 +0000)]
player: Ensure the GstPlay is created before the wrapped renderer

The GstPlayerWrappedVideoRenderer implicitely depends on GstPlay.

Fixes #878

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

3 years agoplay: Allow runtime configuration of video-renderer
Philippe Normand [Sat, 13 Nov 2021 12:17:23 +0000 (12:17 +0000)]
play: Allow runtime configuration of video-renderer

This is a requirement for GstPlayer when using the default overlay interface
provided by the pipeline. The GstPlayerWrappedVideoRenderer requires a valid
pipeline, but that's available only after the GstPlay thread has successfully
started.

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

3 years agomeson: Disable symlink to gst modules
Seungha Yang [Tue, 28 Sep 2021 16:30:46 +0000 (01:30 +0900)]
meson: Disable symlink to gst modules

Symlink to directory usually makes IDE be confused,
and also any git command to the symlink would not work.
Disable the symlink since we don't see any advantage of the use case
at the moment.

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

3 years agova: decoder: Also ref the display when duplicating pictures.
He Junyan [Fri, 19 Nov 2021 11:02:20 +0000 (19:02 +0800)]
va: decoder: Also ref the display when duplicating pictures.

The _destroy_buffers() will check the display handle using the
g_return_val_if_fail. we should not generate the invalid pointer
warning.

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

3 years agodocs: Update doc cache for Windows specific plugins
Seungha Yang [Wed, 17 Nov 2021 13:51:00 +0000 (22:51 +0900)]
docs: Update doc cache for Windows specific plugins

Updating doc cache for d3d11, mediafoundation and wasapi2 plugins

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

3 years agowasapi2: Fix typo in doc
Seungha Yang [Wed, 17 Nov 2021 15:16:41 +0000 (00:16 +0900)]
wasapi2: Fix typo in doc

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

3 years agomediafoundation: Skip doc for non-default encoder elements
Seungha Yang [Wed, 17 Nov 2021 13:46:17 +0000 (22:46 +0900)]
mediafoundation: Skip doc for non-default encoder elements

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

3 years agod3d11: Stop doc for non-default decoder and deinterlacer elements
Seungha Yang [Thu, 21 Oct 2021 10:41:15 +0000 (19:41 +0900)]
d3d11: Stop doc for non-default decoder and deinterlacer elements

Just skip doc for non-default decoder/deinterlacer elements
since there are multiple element in case that system has
multiple GPUs.

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

3 years agogst: Add APIs to allow documentation for element to be skipped
Seungha Yang [Thu, 21 Oct 2021 10:04:43 +0000 (19:04 +0900)]
gst: Add APIs to allow documentation for element to be skipped

Dynamically registered elements (hardware element in most cases)
may or may not be available on a system and properties may be different
per system.
This new API will make documentation skipping possible in programmable way.

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

3 years agod3d11: Fix deadlock while doing unprepare
Wonchul Lee [Fri, 19 Nov 2021 04:27:54 +0000 (13:27 +0900)]
d3d11: Fix deadlock while doing unprepare

ShowWindow() could be blocked while doing gst_d3d11_window_win32_unprepare
when external window handle provided to d3d11videosink in multi-threaded
environment.
The condition that issue happened is, UI thread is waiting for a
background thread that changes d3d11videosink state to NULL, and the
background thread would try to send a window message to the queue.
The queue is already occupied by the UI thread, so the background
thread will be blocked.

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

3 years agotcp: fix build on Solaris
Thomas Klausner [Thu, 18 Nov 2021 23:09:03 +0000 (00:09 +0100)]
tcp: fix build on Solaris

Add missing header.

From Claes Nästén via http://gnats.netbsd.org/56509

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

3 years agoshout2: Add compatibility for libshout >= 2.4.2
Tobias Reineke [Thu, 18 Nov 2021 16:27:17 +0000 (16:27 +0000)]
shout2: Add compatibility for libshout >= 2.4.2

In libshout >=2.4.2 shout_open() can return SHOUTERR_RETRY in addition
to SHOUTERR_BUSY.

The nonblocking example in libshout fixes the problem in a similar
way, as mentioned by the author in this issue:
https://gitlab.xiph.org/xiph/icecast-libshout/-/issues/2316

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/848

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

3 years agovaapi: libs: Use unsized arrays as parameters.
Víctor Manuel Jáquez Leal [Tue, 16 Nov 2021 16:18:28 +0000 (17:18 +0100)]
vaapi: libs: Use unsized arrays as parameters.

Instead of defining a sized array for function signature, use it
unsized (a pointer alias, basically). In this way clang warning is
silenced:

warning: ‘fill_profiles’ accessing 64 bytes in a region of size 12 [-Wstringop-overflow=]

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

3 years agovaapi: meson: Fail if static build.
Víctor Manuel Jáquez Leal [Tue, 16 Nov 2021 16:21:52 +0000 (17:21 +0100)]
vaapi: meson: Fail if static build.

And initialize the plugin array.

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

3 years agoenv: Fix deprecations from python 3.10
Thibault Saunier [Wed, 17 Nov 2021 02:39:43 +0000 (23:39 -0300)]
env: Fix deprecations from python 3.10

distutils is now deprecated and strtobool is simple enough for us to just
vendor.

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

3 years agopython: Avoid treating float as int
Thibault Saunier [Wed, 17 Nov 2021 02:36:10 +0000 (23:36 -0300)]
python: Avoid treating float as int

Since python 3.10 implicit conversion to integers using `__int__` as
been completely removed (was deprecated behavior in 3.9) so we need
to cleanly handle it now.

See https://gitlab.gnome.org/GNOME/pitivi/-/issues/2589

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

3 years agovaapipostproc: fix mising metadata when using system
Ung, Teng En [Mon, 15 Nov 2021 08:38:34 +0000 (16:38 +0800)]
vaapipostproc: fix mising metadata when using system

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

3 years agoqmlglsink: fix another resize case
Matthew Waters [Mon, 15 Nov 2021 03:39:14 +0000 (14:39 +1100)]
qmlglsink: fix another resize case

If qt asks us to redraw before we have both set a buffer and caps we
would attempt to use the new caps with the old buffer which could result
in bad things happening.

Only update caps from new_caps once the buffer has actually been set.

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

3 years agowpevideosrc: Fix frame stuttering in GL rendering path
Philippe Normand [Tue, 16 Nov 2021 12:56:38 +0000 (12:56 +0000)]
wpevideosrc: Fix frame stuttering in GL rendering path

Make sure the EGLImage we're rendering to the GL memory stays alive long enough,
until the the GL memory has been destroyed.

This change fixes tearing and black flashes artefacts that were happening
because the EGLImage was sometimes destroyed before the sink actually rendered
the associated texture.

Fixes #889

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

3 years agowpevideosrc: Run through gst-indent
Philippe Normand [Tue, 16 Nov 2021 12:53:35 +0000 (12:53 +0000)]
wpevideosrc: Run through gst-indent

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

3 years agogstinfo: Add gst_debug_log_literal() function
Sebastian Dröge [Tue, 16 Nov 2021 16:05:09 +0000 (18:05 +0200)]
gstinfo: Add gst_debug_log_literal() function

This takes a plain message string and not a format string, and as a
result doesn't have to be passed through vasprintf() and lead to further
unnecessary allocations. It can also contain literal `%` because of
that.

The new function is mostly useful for bindings that would have to pass a
full string to GStreamer anyway and would do formatting themselves with
language-specific functionality.

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

3 years agov4l2: Update fmt if padded height is greater than fmt height
Trung Do [Mon, 1 Nov 2021 03:08:32 +0000 (10:08 +0700)]
v4l2: Update fmt if padded height is greater than fmt height

If padded height is greater, buffer bytesused could be larger than plane length,
and cause VIDIOC_QBUF failure.

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

3 years agouridecodebin3: Nullify current item after all play items are freed.
Víctor Manuel Jáquez Leal [Tue, 16 Nov 2021 12:14:25 +0000 (13:14 +0100)]
uridecodebin3: Nullify current item after all play items are freed.

There's a potential race condition with this sort of pipelines on
certain systems (depends on the processing load):

GST_DEBUG_DUMP_DOT_DIR=/tmp \
gst-launch-1.0 uridecodebin3 uri=file://stream.mp4 ! glupload ! \
glimagesink --gst-debug=*:4

Right after the pipeline passes from PAUSED to READY, bin_to_dot_file
dumps uridecodebin3 properties, but current uri and suburi might be
already freed, causing a potential use-after-freed.

This patch makes NULL the current item right after all the play items
are freed.

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

3 years agogst: Fix license headers and add SPDX
Thibault Saunier [Tue, 16 Nov 2021 01:09:28 +0000 (22:09 -0300)]
gst: Fix license headers and add SPDX

Fixes https://gitlab.freedesktop.org/gstreamer/gst-python/-/issues/57

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

3 years agocaps: fix type of return value if string is null in gst_caps_from_string
Daniel Knobe [Mon, 15 Nov 2021 10:04:25 +0000 (11:04 +0100)]
caps: fix type of return value if string is null in gst_caps_from_string

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

3 years agortpfunnel: don't enforce twcc during upstream negotiation
Mathieu Duponchelle [Tue, 9 Nov 2021 18:41:14 +0000 (19:41 +0100)]
rtpfunnel: don't enforce twcc during upstream negotiation

A previous patch has caused rtpfunnel to output twcc-related
information downstream, however this leaked into upstream
negotiation (through funnel->srccaps), causing payloader to
negotiate twcc caps even when not prompted to do so by the user.

Fix this by only enforcing that upstream sends us application/x-rtp
caps as was the case originally.

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

3 years agortptwcc: complete bufferlist fix
Mathieu Duponchelle [Fri, 29 Oct 2021 23:18:18 +0000 (01:18 +0200)]
rtptwcc: complete bufferlist fix

When dealing with bufferlists, we need to store one "SentPacket"
structure per buffer, not one per buffer list!

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

3 years agoqtdemux: Log cslg_shift that was determined
Sebastian Dröge [Fri, 12 Nov 2021 15:59:22 +0000 (17:59 +0200)]
qtdemux: Log cslg_shift that was determined

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

3 years agoqtdemux: Use a composition time offset of 0 for "no decode samples" for the time...
Sebastian Dröge [Fri, 12 Nov 2021 11:00:56 +0000 (13:00 +0200)]
qtdemux: Use a composition time offset of 0 for "no decode samples" for the time being

This needs codec-specific handling, but using 0 instead of G_MININT32 at
least gives somewhat reasonable behaviour.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/883

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

3 years agoqtdemux: Always check ctts for unreasonably large offsets
Sebastian Dröge [Fri, 12 Nov 2021 10:46:56 +0000 (12:46 +0200)]
qtdemux: Always check ctts for unreasonably large offsets

If this happens then ignore the whole ctts. Previously we only did this
if the PTS/DTS shift was determined from the ctts instead of the cslg.

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

3 years agoqtdemux: Dump composition time offsets in trun as signed integers
Sebastian Dröge [Fri, 12 Nov 2021 10:39:17 +0000 (12:39 +0200)]
qtdemux: Dump composition time offsets in trun as signed integers

Just like we do for ctts without regard of the version of the box.
Huge offsets are interpreted as negative offsets by qtdemux so this
works.

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

3 years agoqtdemux: Add a comment why only positive cslg shifts are considered
Sebastian Dröge [Fri, 12 Nov 2021 09:36:31 +0000 (11:36 +0200)]
qtdemux: Add a comment why only positive cslg shifts are considered

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

3 years agoqtdemux: Only adjust segment.stop by cslg_shift if stop is not -1
Sebastian Dröge [Tue, 2 Nov 2021 16:38:39 +0000 (18:38 +0200)]
qtdemux: Only adjust segment.stop by cslg_shift if stop is not -1

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

3 years agoqtdemux: Handle negative composition offsets in the trun box the same way as for...
Sebastian Dröge [Tue, 2 Nov 2021 16:29:53 +0000 (18:29 +0200)]
qtdemux: Handle negative composition offsets in the trun box the same way as for non-fragmented streams

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

3 years agoqtdemux: Parse ctts version
Sebastian Dröge [Tue, 2 Nov 2021 15:43:17 +0000 (17:43 +0200)]
qtdemux: Parse ctts version

Negative composition time offsets are only allowed with version 1 of the
box, however we parse it as a signed value also for version 0 boxes as
unfortunately there are such files out there and it's unlikely to have
(valid) huge composition offsets.

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

3 years agoqtdemux: Add support for version 1 cslg boxes
Sebastian Dröge [Tue, 2 Nov 2021 15:41:01 +0000 (17:41 +0200)]
qtdemux: Add support for version 1 cslg boxes

They use 64 bit fields instead of 32 bit.

Also parse offset as a signed integer (in both versions) and clamp it to
a positive value as negative values don't really interest us here.

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

3 years agoqtdemux: Don't free cslg data that we don't own on corrupt files
Sebastian Dröge [Tue, 2 Nov 2021 15:54:46 +0000 (17:54 +0200)]
qtdemux: Don't free cslg data that we don't own on corrupt files

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

3 years agoaudio-resampler: Fix segfault when we can't output any frames
Nirbheek Chauhan [Fri, 12 Nov 2021 12:56:58 +0000 (18:26 +0530)]
audio-resampler: Fix segfault when we can't output any frames

Sometimes the resampler has enough space to store all the incoming
samples without outputting anything. When this happens,
gst_audio_resampler_get_out_frames() returns 0.

In that case, the resampler should consume samples and just return.
Otherwise, we get a segfault when gst_audio_resampler_resample() tries
to resample into a NULL 'out' pointer.

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

3 years agomatroska: Ref index table when updating track info
Rafał Dzięgiel [Fri, 7 May 2021 08:44:15 +0000 (10:44 +0200)]
matroska: Ref index table when updating track info

Track index table array was being lost during track info update.
Ref it over to updated info, so it can be used for finding
nearest seek points.

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