Commit graph

113094 commits

Author SHA1 Message Date
Philippe Normand
ac88851587 validate: launcher: Simplify fakesink handling
Now the function returns either a fakeaudiosink or a fakevideosink, depending on
the media type.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/246>
2021-05-25 10:46:47 +00:00
He Junyan
c4bb5f06c9 va: h265dec: Add current picture into reference list for SCC.
The current picture is not in the DPB, so we need to add it manually
to the reference list when SCC is enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2255>
2021-05-25 12:11:05 +02:00
He Junyan
ceb2df1751 va: h265dec: Set Screen Content extension (SCC) for picture parameters.
We already declare the support of HEVC screen content extension profiles
in the profile mapping list, but we fail to generate the correct VA picture
parameters buffers. This may cause the GPU hang.

We need to fill the buffer of VAPictureParameterBufferHEVCExtension correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2255>
2021-05-25 12:11:05 +02:00
He Junyan
bfbb49144c va: h265dec: Use get_profile_from_sps() to recognize the profile.
The function of gst_h265_get_profile_from_sps() is better than the
function gst_h265_profile_tier_level_get_profile() when we recognize
the profile of the stream, becaue it considers the compatibility.

It is also used by h265parse to recognize the profile. So it is
better to keep the same behaviour with the parse and other decoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2255>
2021-05-25 12:11:05 +02:00
He Junyan
08dc70b6f4 va: h265dec: Set range extension for picture and slice parameters.
We already declare the support of HEVC range extension profiles in
the profile mapping list, but we fail to generate the correct VA
picture and slice parameters buffers. This may cause the GPU hang.

We need to fill the buffer of VAPictureParameterBufferHEVCExtension
and VASliceParameterBufferHEVCExtension correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2255>
2021-05-25 12:11:05 +02:00
Víctor Manuel Jáquez Leal
0edc2f6b98 va: h265dec: Use picture and slide extension parameters.
This is transitional commit to later implement extended and screen
profiles.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2255>
2021-05-25 12:11:05 +02:00
Tim-Philipp Müller
8e04651b8b Use gst_buffer_new_memdup()
Update for function rename in core.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2281>
2021-05-24 19:05:27 +01:00
Tim-Philipp Müller
dd22ec68d2 buffer: rename new gst_buffer_new_copy() to gst_buffer_new_memdup()
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/826

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/827>
2021-05-24 19:01:58 +01:00
Tim-Philipp Müller
a5b30f179b rtsp-stream: use new gst_buffer_new_memdup()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/208>
2021-05-24 18:58:00 +01:00
Seungha Yang
a3c662b2e3 meson: Fix build error caused by missing rtp dep
Missing RTP dep causes build error on Windows
webrtc-sendrecv.c.obj : error LNK2019: unresolved external symbol
  __imp_gst_rtp_header_extension_set_id referenced in function start_pipeline
webrtc-sendrecv.c.obj : error LNK2019: unresolved external symbol
  __imp_gst_rtp_header_extension_create_from_uri referenced in function start_pipeline

... and match required GStreamer to gst-example project version

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/40>
2021-05-25 00:36:29 +09:00
Sebastian Dröge
0b6cd6862e compositor: Consider the converter-config when deciding whether one pad obscures another
If the converter configuration is set to not fill any borders, or if the
border fill color is not full opaque, then the pad has to be handled
as potentially transparent and can't be considered to obscure another
one.

This prevents pads from being wrongly skipped and doing alpha-blending
with uninitialized memory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1172>
2021-05-24 14:28:49 +03:00
Philippe Normand
a0b37e9d1a wpe: Bump wpebackend-fdo version requirement to 1.8
Debian bullseye has this version already, and this allows us to get rid of many
ifdefs. The mouse scroll handling is actually functional now as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2278>
2021-05-23 17:18:20 +00:00
Tim-Philipp Müller
0151276d7f Use new gst_buffer_new_copy()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2279>
2021-05-23 17:20:16 +01:00
Tim-Philipp Müller
80966ed0a3 wavparse: use g_strndup() for copying text data
So we don't rely on NUL terminators inside the data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/994>
2021-05-23 15:20:16 +01:00
Tim-Philipp Müller
5353ff355f wavparse: clean up adtl/note/labl chunk parsing
We were passing the size of the adtl chunk to the note/labl
sub-chunk parsing function, which means we may memdup lots of
data after the chunk string's NUL terminator that doesn't
really belong to it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/994>
2021-05-23 15:19:41 +01:00
Tim-Philipp Müller
3dd8de1d7c wavparse: guard against overflow when comparing chunk sizes
Could be rewritten as lsize > (size - 8) a well, but the
extra check seems clearer. Doesn't look like it was problematic,
lsize wasn't actually used when parsing the sub-chunks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/994>
2021-05-23 15:17:27 +01:00
Tim-Philipp Müller
04fe2233f0 buffer: add gst_buffer_new_copy() convenience function
More convenient and discoverable variant of the fairly widely-used
gst_buffer_new_wrapped(g_memdup(data,size),size).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/826>
2021-05-23 07:32:09 +00:00
Nicolas Dufresne
07fe3289bc doc: Update cache for AV12 pixel format
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1152>
2021-05-21 21:16:24 -04:00
Nicolas Dufresne
0df31ae9d4 video: Update video-orc-dist
This adds the new symbols needed for AV12 support.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1152>
2021-05-21 21:16:24 -04:00
Daniel Almeida
3a3385f35c gl: add support for AV12
AV12 is an internally conceived format that is actually the
combination of NV12 and an alpha plane.

This format is to add to gstreamer's webM transparency support for
vp8 and vp9. To this end, two I420 streams are independently decoded
simultaneously for the actual content and the alpha plane respectively
and these are then combined into A420.

This patch adds GL conversion support so that it is possible to convert
from AV12 to RGBA for the purposes of rendering it on a display.

The reverse conversion is also supplied.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1152>
2021-05-21 21:16:24 -04:00
Daniel Almeida
6760c7fd76 video: add support for AV12
AV12 is an internally conceived format that is actually
the combination of NV12 and an alpha plane.

This format is to add to gstreamer's webM
transparency support for vp8 and vp9. To this end, two
I420 streams are independently decoded simultaneously for
the actual content and the alpha plane respectively
and these are then combined into A420.

Since most hardware decoders output NV12, this patch adds
NV12+A to make the same workflow possible.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1152>
2021-05-21 21:16:24 -04:00
Daniel Almeida
038ba1bffe video: video-orc: remove trailing spaces
Remove unnecessary trailing spaces at the end of some orc functions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1152>
2021-05-21 21:16:24 -04:00
Daniel Almeida
87d97f01f5 doc: update gst_plugins_cache.json
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1152>
2021-05-21 21:06:38 -04:00
Thibault Saunier
712f3d32d4 uriclip: Add an error message when creating a clip failed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/252>
2021-05-21 21:26:19 +00:00
Thibault Saunier
cb4dab37a1 examples: c: Sensibly simplify the simple example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/252>
2021-05-21 21:26:19 +00:00
Thibault Saunier
b24d1918f8 examples: python: Simplify the simple example
We shouldn't show assets usage in the simplest example we have
as it is useful for more advanced use cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/252>
2021-05-21 21:26:19 +00:00
Thibault Saunier
7f17367ce5 tests: Update expectation files with sorted structure fields 2021-05-21 17:11:14 -04:00
Thibault Saunier
4188959a79 tests: Update expectation files with sorted structure fields 2021-05-21 17:10:07 -04:00
Daniel Almeida
4f2189a6e1 doc: update gst_plugins_cache.json
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/991>
2021-05-21 16:42:04 -04:00
Thibault Saunier
d77d5669d4 meson: Fix the name of the sdp_deps variable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1167>
2021-05-21 18:54:22 +00:00
Jakub Adam
fa05f19f14 dxgiscreencapsrc: renegotiate caps on resolution change
When desktop gets resized, recreate the textures and renegotiate the
source caps with the updated video dimensions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2249>
2021-05-21 17:03:20 +02:00
Philippe Normand
6691cd4687 tests/check: Use fake{audio,video}sink
The tests already depend on -bad, so this should be OK.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/254>
2021-05-21 14:44:12 +01:00
Philippe Normand
df2cb6104a launcher: Switch to fake{audio,video}sink
Simplifies the code a bit, though introducing runtime dependency on -bad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/254>
2021-05-21 14:38:36 +01:00
He Junyan
3bca4045e5 va: h265dec: Set LastSliceOfPic for multi sliced frames.
VA-API HEVC decoding needs to known which is the last slice of a
picture, but slices are processed sequencially, so we know the
last slice until all the slices are already pushed into the
VABuffer array.

In order to mark the last slice, they are pushed into the
VABuffer array with a delay of one slice: the first slice is
hold, and when the second slice come, the first one is pushed
while holding the second, and so on. Finally, at end_picture(),
the last slice is marked and pushed into the array.

Co-author: Victor Jaquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2246>
2021-05-21 13:22:03 +02:00
Víctor Manuel Jáquez Leal
7a25c5d4ec vaapi: Demote vaapidecodebin to rank NONE.
One of the main reasons of vaapidecodebin was because it mitigated the
possible surface exhaustion. But that problem is currently
solved. Nowadays, vaapidecodebin brings more problems than it
solves. Thus this patch demotes vaapidecodebin to NONE rank while
bumping PRIMARY + 1 the most common decoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/426>
2021-05-21 09:36:26 +00:00
Matthew Waters
512160a1c8 gl/context/wgl: implement a better get_proc_address()
Look in opengl32.dll first, then wglGetProcAddress(), and only then
possibly from any linked in libraries.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1165>
2021-05-21 14:12:11 +10:00
Matthew Waters
f8510ae3c8 gl/context: add opengl32.dll as a library to dlopen() on windows
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1165>
2021-05-21 14:12:11 +10:00
Tim-Philipp Müller
a983bea1a9 overlaycomposition: fix cut-off example code in docs
Include everything to the end.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1164>
2021-05-21 00:36:10 +01:00
Seungha Yang
8132958b3b d3d11desktopdupsrc: Add support for desktop size/rotation mode change
Re-negotiates with updated size on desktop size
(i.e., resolution, scaling factor), and rotation mode change

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2268>
2021-05-20 17:05:24 +00:00
Thibault Saunier
34a88d95c6 validate:flow: Sort fields in serialized structures
Otherwise change in element implementations could lead to meaningless
breakages
2021-05-20 11:19:32 -04:00
Daniel Almeida
195981767c gl: add support for A420 conversion
A420 is a four planar format similar to I420 but with an extra buffer
for alpha values.

A common use of the gl stack is for GPU format conversions using
shaders, in which case one can use glupload, glcolorconvert and
gldownload elements to upload their buffer to the GPU context, perform
the conversion on the GPU itself and then retrieve the data to CPU
context.

A420 was not supported. This patch adds said support mainly by adding
the corresponding shader to perform the conversion and updating the
supported caps.

Both A420->RGBA and RGBA->A420 conversions are supported.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1153>
2021-05-20 15:06:26 +00:00
Jan Alexander Steffens (heftig)
0312887452 mpegtsmux: Fixup program array indices after stream removal
Each stream stores the `program_array_index` of its position in its
program's `streams` array. When we remove a stream from this array, we
need to correct the `program_array_index` of all streams that were
backshifted by the removal.

Also extract the removal into a new function and add some more safety
checks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2266>
2021-05-20 13:35:06 +00:00
Enrique Ocaña González
34ef2b2759 glcolorbalance: Error out on unsupported texture target types
The issue can be reproduced on a computer with a Radeon graphics card
when trying to force GStreamer Editing Services to use GL for video
mixing in GESSmartMixer, instead of the GstCompositor that smart mixer
would normally use. This change causes the resulting video stream to
have "video/x-raw(memory:GLMemory) ... texture-target: 2D" caps (instead
of "video/x-raw ..." caps). At the PlaySink stage of the pipeline, a
GstGLImageSinkBin is plugged, with a GstGLColorBalance on it. For some
reason that is still to be debugged (and out of the scope of this
patch), gst_gl_filter_set_caps() is never called on that color balance
element, leaving filter->in_texture_target set to its default
GST_GL_TEXTURE_TARGET_NONE value. The incomplete _create_shader() logic
does the rest and silently generates a shader code that doesn't build.

This is the command I use to reproduce the issue (I'm not sure if I
would be able to isolate the issue in a simple pipeline, though):

 GST_PLUGIN_FEATURE_RANK=vaapih265enc:NONE,vaapih264enc:NONE,vaapisink:NONE,vaapidecodebin:NONE,vaapipostproc:NONE,vaapih265dec:NONE,vaapivc1dec:NONE,vaapih264dec:NONE,vaapimpeg2dec:NONE,vaapijpegdec:NONE,glvideomixer:260
 ges-launch-1.0 +clip /tmp/video.mp4

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1159>
2021-05-20 13:22:24 +00:00
Stéphane Cerveau
918d882021 matroskademux: fix decoder glitches with H264 content
To avoid decoder starvation causing glitches on screen,
the demuxer shall clip only when the buffer is a key frame
and the lace time is greater than the stop time.

Fixes gst-editing-services#128

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/973>
2021-05-20 15:07:07 +02:00
Seungha Yang
360a195158 d3d11memory: Protect map and unmap with device lock
We should lock memory object with gst_d3d11_device_lock() first
then GST_D3D11_MEMORY_LOCK() need to be used.

One observed deadlock case is that:
- Thread A takes d3d11 device lock
- At the same time, Thread B tries CPU map to d3d11memory which requires
  d3d11 device lock as well, but it's already taken by Thread A.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2267>
2021-05-20 11:19:44 +00:00
Seungha Yang
7a0bc2a91d d3d11memory: Add trace log for debugging locking thread
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2267>
2021-05-20 11:19:44 +00:00
Víctor Manuel Jáquez Leal
b3d9c5bf80 plugins: Demote rank of vaapipostproc and vaapioverlay.
Since almost all video filters have rank NONE, these both elements
should be NONE too.

This is useful for autovideoconvert and other bins, and users might
force to use these by setting the environment variable
GST_PLUGIN_FEATURE_RANK.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/429>
2021-05-20 10:35:32 +02:00
Seungha Yang
1f743c8d84 audiolatency: Drop incoming downstream stick events
stream-start, caps, and segment events will be pushed by internal
audiotestsrc element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2265>
2021-05-20 15:50:55 +09:00
Seungha Yang
3bd600741c audiolatency: Use live mode audiotestsrc
Expected use case of audiolatency element is that mimic audio capture
device which is most likely live source. So audiolatency element
should use live mode as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2265>
2021-05-20 15:41:50 +09:00
Thibault Saunier
818db8f0b3 wpe: Bump WPE dependency to 2.28
The new audio feature depends on WPE 2.28 so we should just bump our
requirement to that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2264>
2021-05-19 18:50:29 -04:00