Commit graph

115078 commits

Author SHA1 Message Date
Nicolas Dufresne d126f65485 v4l2bufferpool: Fix debug trace
The tracing of the buffer pointer was done on the secondary pointer, which
does not match with other traces of the same buffer. This made the trace
confusing and less useful.

Fixes #1379

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2893>
2022-08-16 14:33:24 +00:00
Jan Schmidt f4f1819416 adaptivedemux2: Fix for period switching in live streams
When playing live, it's possible that one stream reaches
the end of the available playback window and goes to sleep
waiting for a manifest update, and the manifest update
introduces a new period. In that case, the sleeping
stream needs to wake up and go 'properly' EOS before we
can advance the input to the new period.

Accordingly, make sure that a stream's last_ret value
is not marked as EOS if it's just sleeping waiting for a live
manifest update.

Also fix the output loop to go back and re-check if it's
time to switch to the next period after dequeuing and
discarding an EOS event.

https://livesim.dashif.org/livesim/periods_20/testpic_2s/Manifest.mpd

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2895>
2022-08-16 12:39:58 +00:00
Seungha Yang dbc8a7ab18 videoconvert,videoscale: Do conversion in videoconvert and scaling in videoscale
Keep behaving the same as before videoconvertscale port

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2778>
2022-08-16 12:08:36 +00:00
Seungha Yang 0d5c937642 Revert "videoconvertscale: Add properties to disable scaling/converting in videoconvert/videoscale"
This reverts commit cd7a91cef1.

Reverting properties, scaling in videoconvert and converting in
videoscale will be disabled by the other commit

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2778>
2022-08-16 12:08:36 +00:00
Hosang Lee 3cd79c4262 mssdemux2: Use gsturi structure to form fragment urls
Utilize gsturi to form fragment url paths.
A token query may contain the string "manifest" and this would lead
to improper url creations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2859>
2022-08-16 17:57:19 +09:00
Nirbheek Chauhan a14df98ff4 meta: Set the parent refcount of the GstStructure correctly
The parent refcount is of the *transformed* buffer, not the input
buffer.

Also update the docs to clarify that @transbuf is the transformed
buffer, and not the buffer on which a transformation is being
performed.

Due to this bug, modifying the structure of a meta that has been
copied to another buffer fails with:

gst_structure_set: assertion 'IS_MUTABLE (structure) || field == NULL' failed

Add a test for the same.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2890>
2022-08-15 19:58:26 +00:00
Seungha Yang df64226e71 d3d11decoder: Do timer based DecoderBeginFrame retry
... instead of retry count based one, because the precision of Sleep()
varies depending on system and application configuration.
Also, don't retry DecoderBeginFrame if decoder is doing flush.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2886>
2022-08-15 19:16:16 +00:00
Seungha Yang 812bb14f28 cudaupload,cudadownload: Don't simplify caps in transform_caps
The simplified caps might not be a subset of filter caps
and basetransform will complain about it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2883>
2022-08-15 18:44:14 +00:00
Seungha Yang 9b4fafb882 d3d11decoder: Do not use miniobject qdata
The miniobject qdata uses global mutex.
Use ID3D11DeviceChild::{Set,Get}PrivateData methods instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2885>
2022-08-15 02:50:18 +09:00
Khem Raj ce1f1c9eff ssaparse: include required system headers for isspace() and sscanf() functions
Newer compilers ( clang 15 ) have turned stricter and errors out instead
of warning on implicit function declations

Fixes
gstssaparse.c:297:12: error: call to undeclared library function 'isspace' with type 'int (int)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    while (isspace(*t))

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2879>
2022-08-14 08:32:05 +00:00
Seungha Yang 852ba82e36 docs: Remove dxgiscreencapsrc from documentation
The implementation was dropped in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1750

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2878>
2022-08-13 18:40:02 +00:00
Sebastian Dröge 723bdd2514 player: Don't leak wrapped video info
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1373

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2880>
2022-08-13 12:24:37 +03:00
Sebastian Dröge aff79db608 play: Make ownership of video-sink clearer in combination with floating references
And correctly handle the case of VideoRenderer::create_video_sink() not
actually returning a floating reference, which might be tricky for some
bindings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2880>
2022-08-13 12:16:16 +03:00
Sebastian Dröge f060b8b6f3 play: Fix object construction
Ideally new() functions should simply call g_object_new() and not much
else, so let's do that here and handle all the construction properly in
a GObject way.

Now a play object created via g_object_new() is actually usable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2880>
2022-08-13 12:16:16 +03:00
Sebastian Dröge abfbcc0b6f player: Fix object construction
Ideally new() functions should simply call g_object_new() and not much
else, so let's do that here and handle all the construction properly in
a GObject way.

Now a player object created via g_object_new() is actually usable.

In addition, also fix the video-renderer property so that reading it
returns an object of the correct type.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2880>
2022-08-13 12:05:47 +03:00
Sebastian Dröge 15ee056fb8 player: Release signal adapter on finalize
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2880>
2022-08-13 12:04:31 +03:00
Seungha Yang 3632e97df2 mxfdemux: Always calculate BlockAlign of raw audio
Workaround for nBlockAlign and nBitsPerSample mismatch. Always
use the formula described in the specification for BlockAlign value

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2864>
2022-08-12 19:26:08 +00:00
Sebastian Dröge 8e77c8155c rtspsrc: Consider the actual control base URI also in case the connection URI contains a query string
That is, get rid of unnecessary and wrong special-casing.

This could always use gst_rtsp_url_get_request_uri_with_control() but as
we only have the control base URI as string it is easier to just call
gst_uri_join_strings().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2868>
2022-08-12 18:52:29 +00:00
Sebastian Dröge edb0e47074 rtspurl: Use gst_uri_join_strings() in gst_rtsp_url_get_request_uri_with_control() instead of a hand-crafted, wrong version
For example the query string of the base must not be taken over to the
request URL unless there is no control path, and control paths can be
absolute and must not be considered relative if they start with a /.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2868>
2022-08-12 18:52:29 +00:00
Sebastian Dröge d69616b6ba rtspurl: Use fail_unless_equals_string() in tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2868>
2022-08-12 18:52:29 +00:00
Seungha Yang 7c842d9247 meson: d3d11: Fix build with GIR enabled
... and remove unused list

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2870>
2022-08-12 18:03:00 +00:00
Sebastian Dröge b0533d1ea0 qtdemux: Add reference timestamp meta with UTC times based on the ONVIF Export File Format CorrectStartTime box to outgoing buffers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2525>
2022-08-12 16:13:50 +00:00
Matthias Clasen 491dcddf6e gstplayer: Plug a memory leak
This was showing up as a memory leak in GTK's
gstreamer media backend:

40 bytes in 1 blocks are definitely lost in loss record 18,487 of 40,868
   at 0x484586F: malloc (vg_replace_malloc.c:381)
   by 0x50D5278: g_malloc (gmem.c:125)
   by 0x50EDBA5: g_slice_alloc (gslice.c:1072)
   by 0x50EFBCC: g_slice_alloc0 (gslice.c:1098)
   by 0x51F2F45: g_type_create_instance (gtype.c:1911)
   by 0x51DAE37: g_object_new_internal (gobject.c:2011)
   by 0x51DC080: g_object_new_with_properties (gobject.c:2181)
   by 0x51DCB20: g_object_new (gobject.c:1821)
   by 0x9855F86: UnknownInlinedFun (gstplayer-wrapped-video-renderer.c:109)
   by 0x9855F86: gst_player_new (gstplayer.c:579)

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2875>
2022-08-12 15:43:05 +00:00
Jan Schmidt 025e446470 hlsdemux2: Fix reference leak of variant stream
When switching back to the previous variant stream
in gst_hls_demux_change_playlist(), fix a couple of
paths that would leak a reference to the previous
variant.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2873>
2022-08-12 13:52:59 +00:00
Jan Schmidt 9db19a3b06 hlsdemux2: Don't leak the datetime in time map structs
Add a function to clean up GstHLSTimeMap structs
and free the ref on the optional associated GDateTime

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2873>
2022-08-12 13:52:59 +00:00
Jan Schmidt a242428532 hlsdemux2: Fix typefind leak and invalid memory access
When typefinding aggregates incoming data to a pending
typefind buffer and then succeeds in typefinding, it
leaks the aggregated buffer, and leaves the caller
accessing an unreffed buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2873>
2022-08-12 13:52:59 +00:00
Jan Schmidt a6eb725413 hlsdemux2: m3u8: Fix memory leaks on parsing
Fix memory leaks when parsing of an m3u8 file is
incomplete, with EXTINF or EXT-X-PROGRAM-DATE-TIME
directives, but no segment url.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2873>
2022-08-12 13:52:59 +00:00
Jan Schmidt 0ff317f107 hlsdemux2: m3u8: Fix memory leak
Clear the GValue holding intermediate GstStructure field
data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2873>
2022-08-12 13:52:59 +00:00
Jan Schmidt fd64e8c7ed adaptivedemux2: Fix uninitialised memory usage in debug
Fix printing uninitialised memory by clearing the
GstAdaptiveDemuxClock structure when allocating.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2873>
2022-08-12 13:52:59 +00:00
Nirbheek Chauhan d8c4ebccab rtpst2022-1-fecenc: Drain column packets on EOS
Otherwise we won't send the protection packets for the last few
packets when a stream ends.

Also send EOS on the FEC src row pad immediately, and on the FEC src
column pad after draining is complete. This makes it so that the FEC
src pads on rtpbin behave the same way as the RTCP src pads on rtpbin
when EOS is received on the send_rtp_sink pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2863>
2022-08-12 12:59:19 +00:00
Jan Schmidt c668f6fc22 basetextoverlay: Don't miscalculate text running times
When a new segment event arrives, it immediately updates
the current stored segment, which was used for calculating
the running time of the current text buffer for every
passing video frame. This means a segment that arrives
after the text buffer might get used to (mis)calculate
the running times subsequently.

Instead, calculate and store the right running time
using the current segment when storing the buffer. Later
the stored segment can get freely updated.

This fixes the case where pieces of video and text streams
are seamlessly concatenated and fed through the text overlay.
Previously, it could lead to the current text buffer suddenly
have a massive running time and blocking all further input.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2802>
2022-08-12 12:08:18 +00:00
Corentin Damman 0d07ff60c9 d3d11window: fix DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING swap chain flag for full screen
Fixes #1372 (regression introduced in 5eeec165)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2866>
2022-08-12 09:35:40 +00:00
Edward Hervey 63dcee34fb qtdemux: Don't use invalid values from failed trex parsing
If parsing the fragment default values (`trex` atom) failed, don't try to
compute a bogus sample_description_id value.

Fixes #1369

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2860>
2022-08-11 08:50:34 +02:00
Philippe Normand 90d46c1748 wpesrc: Switch URI handler to web+... protocols
The web://http:// URIs were not compliant with RFC 3986. Using web+http://
allows us to use the GstUri parser to pass down a valid URI to `wpevideosrc`.

Corresponding change for the CEF source element:
8d499495dd

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2856>
2022-08-10 15:10:26 +00:00
Krystian Wojtas 16a3fc3c6d docs: copy-paste fix
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2857>
2022-08-10 12:56:02 +00:00
Corentin Damman 0d5d94aabd nvcodec: fix caps leaks in nvh264/h265encoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2850>
2022-08-10 12:24:37 +00:00
Sebastian Dröge 0f0441564d gst: Protect initialization state with a recursive mutex.
Otherwise a gst_init() call from a plugin would deadlock if the plugin
is loaded as part of registry updating.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2740>
2022-08-10 11:31:50 +00:00
Sebastian Dröge cc2cc03717 registry: Remove dead code
Initialization/updating of the registry can't possible fail and all code
paths always returned TRUE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2740>
2022-08-10 11:31:50 +00:00
Sebastian Dröge 8409798f17 gst: Don't fail gst_init() if updating the registry fails
Everything is already marked as initialized at that point and by failing
no tracers would be loaded or plugin feature rank overrides would be
applied.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2740>
2022-08-10 11:31:50 +00:00
Piotr Brzeziński c883a9f54b videoflip: Add support for 10/12bit planar formats
Implements support for I420, I422 and Y444 in 10/12 bit LE/BE variants.
I422 is handled separately from the rest, as it needs to consider
the endianness of the current format during most transforms.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2788>
2022-08-10 10:52:27 +00:00
Víctor Manuel Jáquez Leal ad15fc9169 vah264enc: Set codec frame sync point if IDR
This flag is used by GstVideoEncoder base class for certain configurations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2852>
2022-08-10 08:00:18 +00:00
Víctor Manuel Jáquez Leal c4706ed219 vah264enc: Packed headers can be zero.
A driver can report back no packed header support (VA_ENC_PACKED_HEADER_NONE).
This patch removes that false verification.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2851>
2022-08-10 04:31:27 +00:00
Tim-Philipp Müller a13fd0ead5 opusenc: improve inband-fec property documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2853>
2022-08-09 23:34:59 +00:00
Haihua Hu 82025897c4 alpha: fix stride issue when out buffer has padding on right
if outbuf has padding on right, need jump to next line use stride,
otherwise downstream element will show a wrong picture when use the
same stride

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2842>
2022-08-09 13:04:11 +08:00
Seungha Yang 05dae94352 d3d11: Use WIN32 API directly for locking with RAII pattern
Such abstraction is unnecessary for this library/plugin.
Use WIN32 API directly instead of GLib wrappers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2848>
2022-08-08 20:13:51 +00:00
Seungha Yang a75e88fdd2 d3d11memory: Remove unnecessary locking
* memory map/unmap is already protected by d3d11 device lock.
  Don't need to take another memory lock.
* Use WIN32 critical section and slim reader/writer lock APIs
  directly instead of GLib wrappers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2848>
2022-08-08 20:13:51 +00:00
Víctor Manuel Jáquez Leal ecb12a05b8 vah264enc: Fix caps for mesa gallium.
Radeon mesa gallium driver has a bug which adds P010_10LE sink caps
format. This patch removes formats which arent 420 chroma.

gst_caps_set_format_array() wasn't used because the fix traverse
several structures with potential different formats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2844>
2022-08-08 17:47:56 +00:00
Víctor Manuel Jáquez Leal 8c59ee29c2 vah264dec: Complete profiles in decoder.
Instead of specifying all the H.264 "supported" profiles in the global
hash table (used either by decoders and encoders), just complete them
in the decoder only, since the encoder doesn't support them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2844>
2022-08-08 17:47:56 +00:00
Jan Schmidt edf84a7119 hlsdemux2: Requeue header buffer when restarting fragment
When returning GST_ADAPTIVE_DEMUX_FLOW_RESTART_FRAGMENT
for the first segment data, we might need to requeue the
header.

This was leading to occasional prerolling stalls on
HLS live streams with renditions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2849>
2022-08-08 15:52:22 +00:00
Jan Schmidt 91e43048cf hlsdemux2: Fix buffer leak when resynching
Unref the buffer in gst_hls_demux_handle_buffer() when
returning GST_ADAPTIVE_DEMUX_FLOW_LOST_SYNC

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2849>
2022-08-08 15:52:22 +00:00