Commit graph

1445 commits

Author SHA1 Message Date
Sebastian Dröge 7c0541f549 textrender: Don't pass plaintext as pango markup to Pango
Otherwise e.g. & in the text will cause Pango to complain about invalid
markup and render the text incorrectly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3458>
2022-11-23 12:49:47 +01:00
Sebastian Dröge 1bac733938 textrender: Don't blindly forward all events
Use gst_pad_event_default(), which does the right thing by default.
Especially it does not forward text/x-plain caps downstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3458>
2022-11-23 12:49:47 +01:00
Célestin Marot 8e8a5d94d4 fakesrc: avoid time overflow with datarate
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3438>
2022-11-19 12:02:18 +00:00
Edward Hervey 080818140d Revert "mpegtspacketizer: memcmp potentially seen_before data"
This reverts commit fcad4cc646.

This was wrong is so many ways.

* The memcmp was badly used (it should use == 0 to check the data is identical,
  and not != 0)
* There was no boundary checks on the present stream section_data when passing
  it to memcmp.
* The return value should have been TRUE (i.e. we have done all checks, none of
  them failed, therefore the section has been seen before)
* stream->section_data would *always* be NULL if the section had already been
  processed

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3427>
2022-11-19 00:41:43 +00:00
Edward Hervey d0ed03fe3b mpegts: Check is program is identical before updating
There is no need to update the program if it's identical :)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3427>
2022-11-19 00:41:43 +00:00
Boyuan Zhang 5fc136bcf2 libs: context: use queried value for attrib
Attribute's value should use returned value from get_attribute for
VAConfigAttribRTFormat, since VAProfileHEVCMain10, in AMD Mesa Gallium,
can process either VA_RT_FORMAT_420 and VA_RT_FORMAT_420_10, which isn't
considered in gstreamer-vaapi design, where encoder's src pads will
expose only 4:2:0 color formats but no 4:2:0 10bit. So, this is a workaround
for this issue while new vah265enc is released.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3435>
2022-11-19 00:08:35 +00:00
Tim-Philipp Müller 989ac0f0c0 Revert "rtspsrc: Only EOS on timeout if all streams are timed out/EOS"
This reverts commit d186e19568.

This unearthed a whole bunch of other issues for which lots of
other fixes all over the place were required, so let's revert
the backport into the stable branch for now.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1530
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3271

Fixes #1532

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3422>
2022-11-16 10:36:32 +00:00
Seungha Yang f74e856255 d3d11screencapturesrc: Specify PAR 1/1 to template caps
... otherwise PAR can be wrongly signalled during the negotiation

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3372>
2022-11-15 11:26:09 +00:00
Edward Hervey 169bbd2fea oggdemux: Don't leak incoming EOS event
If we're going to drop it ... then do drop it :)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3412>
2022-11-15 05:31:57 +00:00
Jan Schmidt a44530df57 aesdec: Fix padding removal for per-buffer-padding=FALSE
When per-buffer-padding is FALSE, the OpenSSL context needs
to be told to remove any padding at the end of the ciphertext

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3411>
2022-11-15 04:54:53 +00:00
Jan Alexander Steffens (heftig) 8c1243a595 rtmp2: Improve error messages
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
2022-11-15 02:38:32 +00:00
Jan Alexander Steffens (heftig) a4121afebb rtmp2/connection: Pass triggering GError in 'error' signal
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
2022-11-15 02:38:32 +00:00
Jan Alexander Steffens (heftig) 7a80611c3a rtmp2/connection: Pass triggering GError to _emit_error
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
2022-11-15 02:38:32 +00:00
Jan Alexander Steffens (heftig) 90f39a4c7e rtmp2/connection: Discern reasons for cancelling all commands
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
2022-11-15 02:38:32 +00:00
Jan Alexander Steffens (heftig) 7b9fbf9d4f rtmp2/connection: Handle EOF like error
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
2022-11-15 02:38:32 +00:00
Jan Alexander Steffens (heftig) aea80f0529 rtmp2/client: Make sure 'salt' is not NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
2022-11-15 02:38:32 +00:00
Jan Alexander Steffens (heftig) c802180d6b rtmp2/client: Make sure 'reason' is not NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
2022-11-15 02:38:32 +00:00
Jan Alexander Steffens (heftig) 1bc0e9e1cb rtmp2/client: Make sure 'desc' is not NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
2022-11-15 02:38:32 +00:00
Jan Alexander Steffens (heftig) e2fa6916a9 rtmp2/client: Make sure 'code' is not NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
2022-11-15 02:38:32 +00:00
Justin Chadwell 7954f0539f qtdemux: use unsigned int types to store result of QT_UINT32
In a few cases throughout qtdemux, the results of QT_UINT32 were being
stored in a signed integer, which could cause subtle bugs in the case of
an integer overflow, even allowing the the result to equal a negative
number!

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3367>
2022-11-09 10:39:51 +00:00
Sebastian Dröge 30d894866d allocator: Switch allow-none annotations to nullable / optional
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3369>
2022-11-09 01:47:51 +00:00
Sebastian Dröge ef8474aad5 allocator: Copy allocator name in gst_allocator_register()
The parameter is not marked as `transfer full` and stays around in the
hash table, so we will have to copy it ourselves.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3369>
2022-11-09 01:47:51 +00:00
Edward Hervey 3cc45d5a36 subparse: Fix non-closed tag handling.
Unclear what the goal was, but we could end up reading way past the next_tag.

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

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3351>
2022-11-07 12:45:29 +00:00
Seungha Yang b6309a569a d3d11videosink: Always clear back buffer on resize
Swapchain may not need to be resized if the size of backbuffer
is equal to the previous size. Then previously rendered frame will be stay
on the screen. Do clear back buffer whenever resize() is called

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3342>
2022-11-06 03:26:31 +09:00
Tim-Philipp Müller c2f58cf2e3 qt: initialize GError properly in gst_qt_get_gl_wrapcontext()
Spotted by Claus Stovgaard.

Fixes #1545

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3339>
2022-11-05 01:14:37 +00:00
Sebastian Dröge 4dca76396e qtmux: Add durations to raw audio buffers from the raw audio adapter in prefill mode
This ensures that a duration can also be calculated and stored for the
last buffer at EOS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3338>
2022-11-05 00:26:26 +00:00
Sebastian Dröge afa15e6284 qtmux: Release object lock before posting an error message
GST_ELEMENT_ERROR() also takes the object lock and this would then
deadlock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3338>
2022-11-05 00:26:25 +00:00
Edward Hervey 5ec482bdcf gstpad: Fix non-serialized sticky event push
With non-serialized sticky events, such as GST_EVENT_INSTANT_RATE, we both want
to store the event (for later re-linking) *AND* push the event in a non-blocking
way.

We therefore must *not* propagate pending sticky events if the event is "sticky
or serialized" but only if it's "serialized"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3332>
2022-11-04 19:33:12 +00:00
Jan Alexander Steffens (heftig) 39f4d5849f srt: Remove callers for which srt_bstats fails
This keeps them from accumulating in the element and in the stats while
the sink is not being fed, as long as we at least periodically grab
stats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329>
2022-11-04 18:17:06 +00:00
Jan Alexander Steffens (heftig) 253a5cc125 srt: Use simpler list operations for callers
Avoid `g_list_append` and `g_list_remove` (which have to scan the list)
and replace them with `g_list_prepend` and `g_list_delete_link`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329>
2022-11-04 18:17:06 +00:00
Jan Alexander Steffens (heftig) 68cd5e1de1 srt: Clean up poll/sock lifecycle
Make sure `srtobject->poll_id` is never invalid as long as `srtobject`
exists. Only remove our caller socket from it when the socket becomes
invalid.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329>
2022-11-04 18:17:06 +00:00
Jan Alexander Steffens (heftig) debb19868f srt: Clean up error handling
- Make the srt_epoll_wait loops more uniform.

- Error only via GError when possible; let the element send the error
  message. Avoids a second error message.

- Return 0 when cancelled. Avoids an error message from the element.

- Don't send an error message from send_headers when we're a server
  sink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329>
2022-11-04 18:17:06 +00:00
Jan Alexander Steffens (heftig) 7425fdf2ba srt: Simplify socket stats
Don't hide stats depending on whether we're a sending or receiving
socket. While we're here, add some more debug logs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329>
2022-11-04 18:17:06 +00:00
Jan Alexander Steffens (heftig) 34f9788dd6 srt: Replace stats accumulation with naive byte counting
srt_bstats cannot be used to get the stats of closed connections, so the
best we can do is keep the running count ourselves.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3329>
2022-11-04 18:17:06 +00:00
Sebastian Dröge 4925002d87 core/base: Only post latency messages if the latency values have actually changed
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1525

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3291>
2022-10-27 23:18:37 +01:00
Edward Hervey 74ec0d4b0c videodecoder: Only post latency message if it changed
Posting latency messages causes a full and potentially expensive latency
recalculation of the pipeline. While subclasses should check whether the latency
really changed or not before calling this function, we ensure that we do not
post such messages if it didn't change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3291>
2022-10-27 23:15:31 +01:00
Nicolas Dufresne c29bfbe448 avdec_h265: Fix endless renegoation with alternate interlacing
The picture parameter picture->top_field_first is reused in this mode
to signal the TOP fields. As a side effect, it will change every frame
and current code assumed that if this changes then a renegotiation is
needed. Fixed this by ignoring that change whenever we are decoding one field
only.

Fixes #1523

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3289>
2022-10-27 18:02:54 +01:00
Edward Hervey 5d22503a55 concat: Properly propagate EOS seqnum
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3288>
2022-10-27 16:38:02 +01:00
Nicolas Dufresne 7071c4ec2f avviddec: Avoid flushing on framerate changes
A framerate change does not require flushing the decoder and causes
issues with some specific fragmented files if the two fragments have
different framerate.

Fixes #1522

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3280>
2022-10-27 01:32:05 +01:00
Nicolas Dufresne ea1dc750ae alphacombine: Add missing query handler for gaps
The gap handling was in place, but there was no event handler to trigger it.
Implement the alpha sink event handler for the gaps. This fixes handling of
valid streams which may not refresh the alpha frames for every video frames.
It will also allow a clean error if the stream was missing the initial
alpha frame, at least until we find a better way to handle these
invalid frames.

Related to #1518

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3279>
2022-10-26 23:42:43 +01:00
Ignacio Casal Quinteiro 049737966d avfdeviceprovider: do not leak the properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3278>
2022-10-26 22:57:14 +01:00
Seungha Yang c865a2b9c3 videosink: Don't return unknown end-time from get_times()
... in case of reverse playback. Otherwise basesink will not
wait for clock

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3277>
2022-10-26 22:03:16 +01:00
Patrick Griffis fef136b3d0 build: Fix building ges with tools disabled
If you configure with `tools=disabled` then ges_launch is undefined.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3274>
2022-10-26 19:55:27 +01:00
Patrick Griffis c560ec47fb webrtc: Fix double free in webrtc-recvonly-h264 demo
The "message" signal does not transfer ownership of the GBytes passed
to it so calling g_bytes_unref() on it is incorrect.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3272>
2022-10-26 18:28:35 +01:00
Sebastian Dröge d186e19568 rtspsrc: Only EOS on timeout if all streams are timed out/EOS
Otherwise a stream that is just temporarily inactive might time out and
then can never become active again because the EOS event was sent
already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3271>
2022-10-26 17:44:57 +01:00
Patrick Griffis 98bc763f2b webrtc: Fix critical in webrtc-recvonly-h264 example
This signal only takes 2 properties yet a third was passed.
This would cause a critical in GLib.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3269>
2022-10-26 15:42:42 +01:00
Nirbheek Chauhan d1d365373f gl/vulkan: Fix static linking on macOS
duplicate symbol '__invoke_on_main' in:
    /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstvulkan-1.0.a(cocoa_gstvkwindow_cocoa.m.o)
    /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstgl-1.0.a(cocoa_gstglwindow_cocoa.m.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Also make the same change in iOS for consistency.

Continuation of https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1132

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3263>
2022-10-25 11:06:34 +01:00
Seungha Yang 8a7ae99567 padtemplate: Fix annotations
gst_caps_replace() does not take ownership of the new caps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3262>
2022-10-25 10:12:21 +01:00
Nirbheek Chauhan ccd032c569 FFmpeg.wrap: Fix to the 4.4.2 stable release
We've had a lot of changes in the meson-4.4 branch that can and have
broken builds, so let's fix it to the stable release right before
that.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1497

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3187>
2022-10-23 23:40:02 +00:00
Tim-Philipp Müller a2a300a0e6 gst-plugins-base: bump core req to 1.20.4
For newly-added _gst_meta_tag_memory_reference symbol.

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2928#note_1591459

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3185>
2022-10-23 17:29:40 +00:00