Commit graph

772 commits

Author SHA1 Message Date
Thibault Saunier
49055f1cd5 rtph264pay: Handle 'profile' field
In order to allow "level-asymmetry-allowed" we now handle a new
"profile" field, which as the same semantics as the "profile" field in
H.264 stream so that we can force payloaded stream to have the right
format when using the `gst_sdp_media_get_caps_from_media` to set caps
filter after the payloader. This allows a simple negotiation in standard
RTP negotiation based on SDPs (like webrtc) for that particular case,
closely respecting the specs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1410>
2021-12-12 10:59:00 -03:00
Thibault Saunier
9ac502c21d sdp: Handle level-asymmetry-allowed for H264 streams
The ["level-asymmetry-allowed"] field states that the peer wants the
profile specified in the "profile-level-id" fields but doesn't care
about the level. To express this in GStreamer caps term, we add a
"profile" field in the caps, which reuses the usual "profile" semantics
for H.264 streams and, and remove "profile-level-id" and
"level-asymmetry-allowed" fields.

["level-asymmetry-allowed"]: https://www.iana.org/assignments/media-types/video/H264

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1410>
2021-12-12 10:59:00 -03:00
Seungha Yang
f10867dfb5 d3d11videosink: Use only tested color space for swapchain
We are querying supported swapchain colorspace via
CheckColorSpaceSupport() but it doesn't seem to be reliable.
Use only tested full-range RGB formats which are:
- sRGB
- BT709 primaries with linear RGB
- BT2020 primaries with PQ gamma

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1433>
2021-12-12 11:00:24 +00:00
Thibault Saunier
d82efb47aa pitch: Specify layout as required for negotiation
There are cases where it might negotiate 'non-interleaved' while it
is wrong.

```
gst-launch-1.0 audiotestsrc !  "audio/x-raw, format=(string)F32LE, layout=(string)non-interleaved" ! audioconvert ! audioresample ! pitch tempo=1.2 ! audioconvert ! "audio/x-raw,format=S16LE" ! fakesink

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
(gst-launch-1.0:3029628): GStreamer-Audio-CRITICAL **: 11:42:22.477: gst_audio_buffer_map: assertion '(!meta && info->layout == GST_AUDIO_LAYOUT_INTERLEAVED) || (meta && info->layout == meta->info.layout)' failed
ERROR: from element /GstPipeline:pipeline0/GstAudioConvert:audioconvert1: The stream is in the wrong format.
Additional debug info:
../subprojects/gst-plugins-base/gst/audioconvert/gstaudioconvert.c(876): gst_audio_convert_transform (): /GstPipeline:pipeline0/GstAudioConvert:audioconvert1:
failed to map input buffer
ERROR: pipeline doesn't want to preroll.
ERROR: from element /GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0: Internal data stream error.
Setting pipeline to NULL ...
Additional debug info:
../subprojects/gstreamer/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0:
streaming stopped, reason error (-5)
ERROR: pipeline doesn't want to preroll.
Freeing pipeline ...
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1441>
2021-12-11 19:09:09 -03:00
Nicolas Dufresne
f9668b0697 doc: Update vp9alphadecodebin doc cache
A new field was added to the template cpas.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439>
2021-12-10 21:37:14 +00:00
Nicolas Dufresne
2886eab3c4 alphacombine: Fix for early allocation queries
When using playbin3, it seems that the alpha decode is always first to
push caps and run an allocation query. As the format change from sink
and alpha were not synchronized, the allocation query could endup
being run before the caps are pushed. That may lead to failing query,
which makes the decoder thinks there is no GstVideoMeta downstream and
most likely CPU copy the frame.

This patch implements a format cookie to track and synchronize the
format changes on both pads fixing the racy performance issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439>
2021-12-10 21:37:14 +00:00
Nicolas Dufresne
e0f8ce501b v4l2codecs: vp9: Add alpha decodebin wrapper
This will allow HW accelerated decoding of WebM alpha videos.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439>
2021-12-10 21:37:14 +00:00
Nicolas Dufresne
31d49da237 v4l2codecs: plugin: Minor style fix
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439>
2021-12-10 21:37:14 +00:00
Nicolas Dufresne
3f02515380 v4l2codecs: decoder: Improve logging of timed out request
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439>
2021-12-10 21:37:14 +00:00
Nicolas Dufresne
c4216a693c v4l2codecs: mpeg2: Check that the decoder output formats
This is to avoid exposing a decoder for which we don't support any
output format. This happens on platform using vendor formats or
not yet supported tiles formats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439>
2021-12-10 21:37:14 +00:00
Nicolas Dufresne
91b7a9497b vp9alphadecodebin: Fix auto-pluging v4l2slvp9dec
This adds the alignment field to the template caps. Without this field
set, the auto-plugger will see fixed caps and will use
gst_caps_is_subset() against the caps produced by the parser. This is a
challenge for all cases where a parser can do conversion. This is fixed
by adding alignment field, which makes the auto-pluggers do an
intersection of the caps as it gets unfixed caps after intersection now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439>
2021-12-10 21:37:14 +00:00
Jakub Adam
6d67b43352 ximagesrc: avoid blocking wait for X events
XNextEvent() blocks indefinitely in absence of X11 events, which can
prevent the pipeline from stopping.

This can cause problems when ximagesrc is used in "remote desktop"
scenarios and the GStreamer application itself, through which the user
is viewing and controlling the machine, is the only source of input
events.

Replace the call with non-blocking XCheckTypedEvent().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1438>
2021-12-10 20:43:09 +00:00
Célestin Marot
f509578de5 multifilesrc: fix caps leak
since `gst_caps_replace()` and `gst_pad_set_caps()` both ref the caps and neither of them takes the ownership of the caps -> it must be unreffed in `gst_multi_file_src_set_property()`

to test the leak (on Unix): `echo coucou > /tmp/file.txt && GST_TRACERS=leaks GST_DEBUG="GST_TRACER:7" gst-launch-1.0 multifilesrc location=/tmp/file.txt caps='txt' ! fakesink`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1436>
2021-12-10 18:34:57 +01:00
Seungha Yang
e8c923ebde 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>
2021-12-09 20:12:12 +09:00
Seungha Yang
1a12883993 d3d11window: Fix typo in debug message
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1430>
2021-12-09 19:51:20 +09:00
Corentin Noël
9ebcfb5221 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>
2021-12-08 12:25:41 +00:00
Benjamin Gaignard
9e0c2c4a09 codecs: h264decoder: Fix return value type
Return value should be GstFlowReturn not gboolean

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1426>
2021-12-08 11:08:30 +01:00
Benjamin Gaignard
4ff27314f6 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: 5b405d1585 ("codecs: h265decoder: Use GstFlowReturn everywhere")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1426>
2021-12-08 11:02:32 +01:00
Danny Smith
779e715b6c 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>
2021-12-07 13:45:30 +00:00
Philippe Normand
86719e25a4 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>
2021-12-07 11:43:26 +00:00
Guillaume Desmottes
2aa2477208 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>
2021-12-06 16:52:38 +00:00
Tim-Philipp Müller
26169cee0e teletextdec: fix minor string leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1416>
2021-12-06 13:07:37 +00:00
Marc Leeman
49736fb3fd 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>
2021-12-03 23:46:08 +00:00
Nicolas Dufresne
7e875ddb2c 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>
2021-12-03 07:55:30 -05:00
Nicolas Dufresne
05458f05e0 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>
2021-12-02 15:52:03 -05:00
Nicolas Dufresne
a6eb1e7782 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>
2021-12-02 15:45:26 -05:00
Seungha Yang
e87791592e d3d11vp9dec: Drop frames on non-keyframe format change
... in case of NVIDIA GPU

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1407>
2021-12-02 19:19:59 +00:00
Seungha Yang
2c834b5fc7 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>
2021-12-02 19:19:59 +00:00
Seungha Yang
e2e45e51b0 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>
2021-12-02 19:19:59 +00:00
Nicolas Dufresne
43759ffeaa 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>
2021-12-02 19:19:59 +00:00
Marc Leeman
f699c08af9 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>
2021-12-02 14:23:05 +01:00
Víctor Manuel Jáquez Leal
d10ad61891 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>
2021-12-02 08:37:19 +00:00
Víctor Manuel Jáquez Leal
90df5b5ab8 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>
2021-12-02 08:37:19 +00:00
Nicolas Dufresne
d04fba93f8 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>
2021-11-30 17:11:59 -05:00
Nicolas Dufresne
19d99dbcae 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>
2021-11-30 17:11:59 -05:00
Nicolas Dufresne
8a1440b3f1 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>
2021-11-30 17:11:56 -05:00
Corentin Noël
a445ff1607 basesink: Add missing annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1392>
2021-11-30 02:28:15 +00:00
Corentin Noël
7b1958c8de pushsrc: Add missing annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1392>
2021-11-30 02:28:15 +00:00
Corentin Noël
4e2e8492c9 bitwriter: Add missing annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1392>
2021-11-30 02:28:15 +00:00
Corentin Noël
6da9285158 baseparse: Add missing annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1392>
2021-11-30 02:28:15 +00:00
Nicolas Dufresne
4ca7f1e014 v4l2codecs: h264: Fix typo in comment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1387>
2021-11-30 00:28:34 +00:00
Nicolas Dufresne
83933b7772 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>
2021-11-30 00:28:34 +00:00
He Junyan
b5c07e11ca 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>
2021-11-29 19:25:31 +00:00
He Junyan
954f7cf88c 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>
2021-11-29 19:25:31 +00:00
He Junyan
7f31dcf084 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>
2021-11-29 19:25:31 +00:00
Daniel Almeida
285695ee52 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>
2021-11-29 17:41:19 +00:00
Daniel Almeida
120b96a974 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>
2021-11-29 17:41:19 +00:00
Daniel Almeida
ccab90773f 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>
2021-11-29 17:41:19 +00:00
Daniel Almeida
c51d74ae3a 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>
2021-11-29 17:41:19 +00:00
Daniel Almeida
a2b0837bc5 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>
2021-11-29 17:41:19 +00:00
Daniel Almeida
98dc7a64a0 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>
2021-11-29 17:41:19 +00:00
Wim Taymans
9aaef931bf 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>
2021-11-29 15:35:36 +01:00
Mathieu Duponchelle
e90859f4d8 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>
2021-11-25 18:38:22 +00:00
He Junyan
d867180b4e 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>
2021-11-24 14:42:57 +00:00
Seungha Yang
2a17618dcc 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>
2021-11-24 13:11:23 +00:00
Mathieu Duponchelle
4412198c05 rtpfunnel: fix extmap handling on accept-caps
Follow-up on 97d83056b3, 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>
2021-11-23 20:26:30 +00:00
Krystian Wojtas
423acef4d9 tutorials: Fix typos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1382>
2021-11-23 19:56:27 +01:00
Guillaume Desmottes
d67a63a298 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>
2021-11-23 16:00:53 +01:00
Corentin Noël
578fddbf58 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>
2021-11-23 08:54:01 +00:00
Seungha Yang
ffa8aff6b1 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>
2021-11-23 07:23:12 +00:00
Víctor Manuel Jáquez Leal
5e3bf0fff7 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>
2021-11-22 15:27:10 +00:00
Víctor Manuel Jáquez Leal
68379649db 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>
2021-11-22 15:27:10 +00:00
Víctor Manuel Jáquez Leal
718e83ed4c vapostproc: Remove dead code.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1369>
2021-11-22 15:27:10 +00:00
Víctor Manuel Jáquez Leal
26040bd932 va: filter: Validate input parameter in internal function.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1369>
2021-11-22 15:27:10 +00:00
Víctor Manuel Jáquez Leal
8377463128 va: allocator: log drm modifier
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1369>
2021-11-22 15:27:10 +00:00
He Junyan
a14f0da324 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>
2021-11-22 10:54:23 +00:00
Jean Felder
f8bc5e89fd id3v2mux: Map GST_TAG_MUSICBRAINZ_RELEASETRACKID
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1342>
2021-11-22 09:57:16 +00:00
Jean Felder
941e1b8343 id3v2mux: Map GST_TAG_MUSICBRAINZ_RELEASEGROUPID
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1342>
2021-11-22 09:57:16 +00:00
Philippe Normand
ee7fe545b2 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>
2021-11-20 10:15:49 +00:00
Philippe Normand
12a5bf64f8 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>
2021-11-20 10:15:49 +00:00
He Junyan
c2bffe22f3 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>
2021-11-19 14:40:18 +00:00
Seungha Yang
53391d2b8d 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>
2021-11-19 13:38:19 +00:00
Seungha Yang
7f796b10b2 wasapi2: Fix typo in doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1360>
2021-11-19 13:38:19 +00:00
Seungha Yang
6acf89b3d3 mediafoundation: Skip doc for non-default encoder elements
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1360>
2021-11-19 13:38:19 +00:00
Seungha Yang
7fe08d8bed 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>
2021-11-19 13:38:19 +00:00
Seungha Yang
97c7fec8be 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>
2021-11-19 13:38:18 +00:00
Wonchul Lee
ae7a365274 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>
2021-11-19 13:42:53 +09:00
Thomas Klausner
0b0bc5956d 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>
2021-11-19 00:07:42 +00:00
Tobias Reineke
9e2f679ae1 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>
2021-11-19 04:23:35 +05:30
Víctor Manuel Jáquez Leal
92f8b54657 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>
2021-11-18 07:32:26 +00:00
Víctor Manuel Jáquez Leal
2d5a10f6a6 vaapi: meson: Fail if static build.
And initialize the plugin array.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1357>
2021-11-18 07:32:26 +00:00
Thibault Saunier
f95f63c5af 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>
2021-11-18 00:19:46 +00:00
Ung, Teng En
219d757ac5 vaapipostproc: fix mising metadata when using system
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1325>
2021-11-17 10:35:05 +00:00
Matthew Waters
55e04d129f 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>
2021-11-17 03:08:14 +00:00
Philippe Normand
a6fd767025 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>
2021-11-16 21:55:41 +00:00
Philippe Normand
053dd564a1 wpevideosrc: Run through gst-indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1354>
2021-11-16 21:55:41 +00:00
Sebastian Dröge
5dc95e00fa 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>
2021-11-16 16:32:55 +00:00
Trung Do
a87be69ce5 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>
2021-11-16 10:46:29 -05:00
Víctor Manuel Jáquez Leal
6d7dc93a45 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>
2021-11-16 13:25:02 +01:00
Thibault Saunier
3729704132 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>
2021-11-15 22:12:09 -03:00
Daniel Knobe
74957bfd50 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>
2021-11-15 10:56:43 +00:00
Mathieu Duponchelle
97d83056b3 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>
2021-11-12 18:40:32 +00:00
Mathieu Duponchelle
72118b9db4 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>
2021-11-12 18:40:32 +00:00
Sebastian Dröge
efb2b6d478 qtdemux: Log cslg_shift that was determined
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1294>
2021-11-12 17:51:04 +00:00
Sebastian Dröge
12e918428a 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>
2021-11-12 17:51:03 +00:00
Sebastian Dröge
ad412d257b 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>
2021-11-12 17:51:03 +00:00
Sebastian Dröge
93a10a4ba1 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>
2021-11-12 17:51:03 +00:00
Sebastian Dröge
a6f3391c81 qtdemux: Add a comment why only positive cslg shifts are considered
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1294>
2021-11-12 17:51:03 +00:00
Sebastian Dröge
a33e30cfc4 qtdemux: Only adjust segment.stop by cslg_shift if stop is not -1
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1294>
2021-11-12 17:51:03 +00:00
Sebastian Dröge
bb5a5ae8a8 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>
2021-11-12 17:51:03 +00:00