Commit graph

749 commits

Author SHA1 Message Date
Edward Hervey 75d6621c2a videodecoder: Only use subframes internal values in subframe mode
This clarifies the usage of it, and fixes issues with reverse playback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4694>
2023-05-24 18:50:56 +00:00
Edward Hervey 7a4916b251 videodecoder: Remove unused internal fields
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2552

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4694>
2023-05-24 18:50:56 +00:00
Edward Hervey 386a8dbae5 videodecoder: refactor and document finish_frame some more
* Move the in-flight iteration and handling code into the main block
* Document the intent a bit more

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4694>
2023-05-24 18:50:56 +00:00
Edward Hervey bce9f3327d videodecoder: Refactor post-decode PTS/DTS recovery code
The code was a bit hard to follow. Use clear/explicity variable names and
comment a bit more on what is going on.

Also fold the double list iteration into a single one

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4694>
2023-05-24 18:50:56 +00:00
He Junyan 1e9e976268 videometa: Only validate the alignment only when it contains some info
When the alignment contains nothing, all its fields are 0 and always
can be satisfied. So there is no need to validate it in this case.
And there are a lot of places just setting this alignment to default
all zero value, this validation generates lots of warnings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4674>
2023-05-24 16:22:21 +00:00
Nicolas Beland 3a9c103b58 alsasink: Fix stall for transition of alsasink from PAUSED to READY with USB speakerphone
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4642>
2023-05-24 11:16:06 +00:00
Guillaume Desmottes 58f80c180c uridecodebin3: notify when 'current-(sub)uri' properties are updated
Assume both uri and suburi are changed when the main item changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4543>
2023-05-24 09:28:58 +00:00
Thibault Saunier 7eca75130d encodebin: Plug a parser before timestamper
Timestamper might not support all stream formats so we need to make sure
some element is able to convert between those formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4122>
2023-05-22 15:10:52 +00:00
Seungha Yang a8bf19deda video: convertframe: Add D3D11 specific conversion path
Add d3d11 conversion path to make gst_video_convert_sample() work
for GstD3D11Memory.

Note that just adding "d3d11download" to the exisitng code is
suboptimal from GstD3D11 point of view because:
* d3d11convert element can support crop/colorspace-conversion/scale
  all at once while existing software pipeline needs intermediate steps
  for the conversion
* "Process everything on GPU then download it to CPU memory" would be likely
  faster than "download GPU memory to CPU then processing it on CPU"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2715>
2023-05-20 14:24:27 +00:00
Seungha Yang 9554a5c7fa video: convertframe: Remove pointless const qualifier
const keyword for refcounted object does not very make sense
and unnecessary in this case

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2715>
2023-05-20 14:24:27 +00:00
Philippe Normand b2e121054d sdp: Add API to remove media from a SDP message
Based on initial patch by Stefano Buora.
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/579

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4670>
2023-05-20 09:23:17 +01:00
Ruben Gonzalez 059965fe53 doc: Fix newline char between authors
Found running `gst-inspect-1.0 -a |& grep -v ":" | grep @`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4682>
2023-05-20 05:48:23 +00:00
Haihua Hu 9f67b866b9 decodebin3: avoid identity, sinkpad, parsebin leakage when reset input
when reset_input, need remove identity/parsebin from decodebin3
when release_pad, need call free or reset input if collection
didn't change

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4664>
2023-05-19 16:24:08 +00:00
Matthew Waters 8003acf5bb gl: update docs for mixer move
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4608>
2023-05-18 19:34:15 +00:00
Matthew Waters e9bf1c79cc glmixer: don't add rgba templates by default
Subclasses may want to override the pad template with different formats
or with a different pad subclass.

The original beahviour is still available by calling
gst_gl_mixer_class_add_rgba_pad_templates() in _class_init() of the
subclass.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4608>
2023-05-18 19:34:15 +00:00
Matthew Waters fc85b63c2b glmixer: remove set_caps() vfunc
All of its implementors can be moved to gl_start/stop() from
GstGLBaseMixer instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4608>
2023-05-18 19:34:14 +00:00
Matthew Waters 331b1af468 glmixer: remove reset vfunc
This functionality is covered by GstGLBaseMixer's gl_stop() vfunc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4608>
2023-05-18 19:34:14 +00:00
Matthew Waters 14e7e991d3 gl/mixer: make fbo instance field private and provide accessor function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4608>
2023-05-18 19:34:14 +00:00
Matthew Waters 007a602726 gl: move gl(base)mixer to library
For use by applications/libraries outside of the opengl plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4608>
2023-05-18 19:34:14 +00:00
Ruben Gonzalez 5c0f6b88d8 README.md: fix current version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4662>
2023-05-18 06:25:50 +00:00
Haihua Hu 36333a5152 decodebin3: fix random hang when remove failing stream
When reconfigure_output_stream entry missing decoder path,
requested_selection should been update with what is really
active/selected immdiately with SELECTION_LOCK hold. So
use an optional message return from reconfigure_output_stream
and post it after release SELECTION_LOCK. This can make sure
other thread call to check_slot_reconfiguration will got
a correct requested_selection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4599>
2023-05-16 12:43:12 +00:00
Michael Olbrich b660f258a6 theoradec: make sure the selected pool accepts the new config
If gst_buffer_pool_set_config() fails then the pool will use its old
config. This may include different width or height when
pic_width/pic_height != frame_width/frame_height.
As a result, the assertions in theora_handle_image() will fail.

So check the result of gst_buffer_pool_set_config() and only use the pool
if it succeeds. Otherwise let the parrent decide_allocation() create a new
pool.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4600>
2023-05-12 14:37:06 +02:00
Michael Olbrich 802b3b9898 theoradec: add another assert to check the buffer size
If the buffer has no video meta then the meta is created from the local
data. In this case, the other asserts don't actually check anything. So add
another one to ensure that the buffer is actually large enough.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4600>
2023-05-12 14:37:06 +02:00
Michael Olbrich 9dd6b08fcc theoradec: remove unused codec state variable
The last user of this state was removed in 9a541157cf "theoradec: Fix
decoding in the presence of GstVideoCropMeta".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4600>
2023-05-12 14:37:06 +02:00
Nirbheek Chauhan 681f042f27 meson: Install viv-fb GL headers, needed by i.MX
Needed by qmlglsink at build time to allocate a viv-fb display.

Without this, the GL fastpath doesn't work, and performance is really
bad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4613>
2023-05-12 15:05:56 +05:30
Yinhang Liu f04a1eee71 video: video-info-dma: Fix return value
The return value of gst_video_info_dma_drm_new_from_caps is a pointer type,
and should not return a boolean type. Fix this issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4612>
2023-05-12 15:38:08 +08:00
Piotr Brzeziński 5e45a1b1bd macos: Set activation policy in osxvideosink and glimagesink
Upon creating a window, glimagesink and osxvideosink now set the policy to
NSApplicationActivationPolicyRegular, which lets us show an icon in the Dock
for convenience and appear in the top menu bar like other apps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4573>
2023-05-12 01:14:44 +02:00
Piotr Brzeziński f60c87769f macos: Remove old NSApp workaround related code
This is no longer needed since the introduction of `gst_macos_main()` in 1.22.
Before that existed, we had a patch for GLib in Cerbero, which did work but made it
impossible to update GLib at all. The code being removed was a fail-safe in case of
running without said patch being applied. It's no longer needed, since for macOS
we just wrap our GStreamer with an NSApplication using `gst_macos_main()`.

Warnings will be displayed if no NSApp/NSRunLoop is found wherever needed,
pointing the user towards using the new API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4366>
2023-05-11 20:30:19 +02:00
Sebastian Dröge 4cbd8d6fc6 pbutils: discoverer: Mark gst_discoverer_stream_info_get_stream_id() as nullable
It can return NULL in certain situations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4572>
2023-05-08 15:26:58 +03:00
Jan Schmidt e1faaefea0 glvideomixer: Implement force-live and min-upstream-latency properties
Proxy the force-live and min-upstream-latency propertyies to the internal
glvideomixerelement at construction time. force-live has to be set
during construction of the glvideomixerelement, so that has to be
deferred until the _constructed() call. Make sure that all other
existing proxied properties will still get set once the element
is created.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4494>
2023-05-02 22:47:38 +00:00
Thibault Saunier 40a6f2dc91 discover: Avoid double freee when creating info from cache file
Passing ownership to the function as the created info is made owner.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3911>
2023-04-29 06:54:10 -04:00
Thibault Saunier 0f229aa62a discoverer: Add serializing unknown stream type support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3911>
2023-04-29 06:54:10 -04:00
Thibault Saunier 9e994ea616 discoverer: Add a signal to retrieve serialized GstDiscovererInfo
This allows user to serialize the GstDiscovererInfo in other places
than the default folder, like a database when running web services for
examples.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3911>
2023-04-29 06:47:55 -04:00
Edward Hervey 0db6149880 decodebin3: Handle streams without CAPS or TIME segment
decodebin3 will do its best to figure out whether a parsebin is required to
process the incoming stream.

The problem is that for push-based stream it could happen that the stream would
not provide any caps, resulting in nothing being linked internally.

Furthermore, there is the possibility that a stream *with* caps would not be
using a TIME segment, which is required for multiqueue to properly work.

In order to fix those two issues, we force the usage of parsebin on push-based
streams:
* When the pad is linked, if upstream can't provide any caps
* When we get a non-TIME segment

Fixes #2521

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4492>
2023-04-27 12:50:21 +00:00
Stéphane Cerveau 61416bc532 pbutils: add video/x-ivf to descriptions
Add missing description for video/x-ivf spotted
with gst-discoverer-1.0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4248>
2023-04-27 06:45:27 +00:00
Hou Qi aed4d31e67 decodebin3: fix segment fault when print decoder log
Segment fault happens when cannot find decoder but try to print
decoder name. Need to check the decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4461>
2023-04-25 21:42:15 +08:00
Thibault Saunier 7aaf2b48ef doc: Avoid shelling out to hotdoc to generate plugins config files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4479>
2023-04-25 02:57:55 +00:00
Jordan Petridis 791a068c58 build: appease clang warning
Clang complains about these variables being (possibly) unitialized, even
when they are assigned to NULL or proper value inside the macro.

Might as well initialize them to avoid the warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4281>
2023-04-24 12:37:07 +00:00
Thibault Saunier b14e675a27 gir: Checkout all .gir files and check that they are updated on the CI
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3010>
2023-04-22 09:32:32 -04:00
Sebastian Dröge 6c429a5891 audiotestsrc: Initialize all samples in wave=ticks mode
Previously samples were only initialized in 2 out of 3 cases.

Probably fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/337

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4475>
2023-04-22 08:44:02 +00:00
Patricia Muscalu c6bb20bba8 playsink: Fix volume leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4459>
2023-04-20 14:21:15 +00:00
Nicolas Dufresne e709e2d97c meson: Add a wrap file for libgudev
And allow fallback to it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4447>
2023-04-19 22:47:19 +00:00
Sebastian Dröge 83106de7e7 video: timecode: Add support for framerates lower than 1fps
These are not explicitly defined but the existing calculations can be
extended to also cover that case by inverting them to avoid floating
point calculations.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4374>
2023-04-17 10:26:11 +00:00
Mathieu Duponchelle be208b9f50 docs: mark GstVideoConvertScale as plugin API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4408>
2023-04-13 21:46:59 +00:00
Mathieu Duponchelle 15102e2eef docs: mark GstGLSinkBin as plugin API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4408>
2023-04-13 21:46:59 +00:00
Jan Alexander Steffens (heftig) 77bc9b4a33 tests: allocators: Fix fdmem test with recent GLib
The test failed with recent GLib, where `g_close` emits a critical
warning on EBADF. Remove the `g_close` check from `test_fdmem` and add
another version that tests `GST_FD_MEMORY_FLAG_DONT_CLOSE`.

We will depend on the Valgrind test run to warn us about leaked FDs.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2480
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4381>
2023-04-12 17:17:37 +00:00
Seungha Yang 5765eb8dce sdpmessage: Don't set "source-filter" to caps
Multiple "source-filter" can exist, and it requires special handling

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3485>
2023-04-12 16:32:07 +00:00
Matthias Fuchs 15b7c7ea25 glvideoflip: fix leaked caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4394>
2023-04-11 21:31:45 +00:00
Matthias Fuchs 769cc48e49 glcontext_wgl: fix missing unref
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4392>
2023-04-11 20:05:17 +00:00
Philippe Normand 4e4cb3bcf5 glbasesrc: Reverse order of error/debug messages
Addressing follow-up review from Tim in !4222, the first string is meant to be
shown to the user and should be translatable. The second one is more suited for
debugging purposes and should not be translated.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4389>
2023-04-11 12:28:27 +01:00
Tim-Philipp Müller da4aa00d5b gst-plugins-base: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4388>
2023-04-11 09:21:18 +00:00
Sebastian Dröge 8ed0b03c78 appsink: Use a class handler callback instead of vfunc for propose-allocation
There would otherwise be no padding left in the class struct anymore and
we might need it for something else in the future.

A class handler callback can be overridden by subclasses via
`g_signal_override_class_handler()` and chained up via
`g_signal_chain_from_overridden_handler()`.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4356>
2023-04-06 15:21:35 +00:00
Sebastian Dröge 51a2adb837 allocators: drm-dumb: Annotate allocator instance parameters with the correct type
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4360>
2023-04-06 17:04:45 +03:00
Sebastian Dröge edcb8e8f35 allocators: drm-dumb: Annotate device-path as a filename
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4358>
2023-04-06 15:41:27 +03:00
Rouven Czerwinski 7ad84674ab gst-plugins-base: gl: wayland: cleanup on close
The proxy and queue are created in the gst_gl_window_wayland_egl_open()
function and will be recreated on open. This leaks both objects, the
wayland client documentation mentions that they should be destroyed
using the appropriate destroy functions.

Found during valgrind memory leak testing, these blocks were marked as
definitely lost.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4354>
2023-04-06 08:09:36 +02:00
Guillaume Desmottes 84dea99132 appsrc: properly handle events received before sending the segment
The first serialized events that can be send on a src pad are a CAPS and then a
SEGMENT event.

When handling events from user in appsrc, we used to send a segment
automatically if the SEGMENT has not been sent yet.
This breaks if the CAPS event was not send either as we were now sending
a SEGMENT before the CAPS.

Fix this by delaying such events until the CAPS has been configured.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4297>
2023-04-05 11:11:46 +00:00
Guillaume Desmottes 4587a70998 tests: appsrc: test_appsrc_send_custom_event: check that event was actually received
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4297>
2023-04-05 11:11:46 +00:00
Guillaume Desmottes 4bffa7b537 appsrc: log when popping caps and buffer (list) from queue
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4297>
2023-04-05 11:11:46 +00:00
Sebastian Dröge a17209220f sdp: Skip source-specific caps fields when creating an SDP media from caps
Regression from https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132

We parse the source-specific fields from the SDP and put it into the
caps, but when converting caps into an SDP again this would need special
handling. By default it would end up as part of the fmtp field, which is
simply wrong.

Automatically putting it into the caps and SDP will need some more work.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4338>
2023-04-05 05:20:33 +00:00
Seungha Yang 55db8367f7 tools: Count argc after parsing GOption on Windows
Existing codes rely on modified argc value by g_option_context_parse()
but g_option_context_parse_strv() is used in case of Windows.
Count arguments after the option parsing manually.
Fixing command "gst-inspect-1.0.exe -b"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4313>
2023-03-31 18:11:52 +00:00
Robert Rosengren 6bb1257c99 alsasink: Fix for being stuck in stop_streaming_threads state
Moving from PLAYING to NULL will set the stop_streaming_threads to TRUE,
but when moving back upwards its not reset to FALSE (as only done in
uncalled init and resume callbacks).

Fix by reseting value in the prepare callback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4309>
2023-03-31 16:51:11 +00:00
Ilie Halip 6846810f50 typefindfunctions: Increase xml typefinder closing brace limit
If the first XML element in a DASH manifest has its closing brance
beyond the first 512 bytes (because of, e.g. lots of attributes),
the MPD typefinder fails. Try to read a larger block, and then
smaller blocks until 512 bytes.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4241>
2023-03-29 17:50:20 +00:00
Bart Van Severen 65f953cd23 rtsp: gstrtspurl: gst_rtsp_url_get_request_uri: use rtsps scheme for tls transport methods
gst_rtsp_url_get_request_uri returns rtsp://... url when requested url is rtsps://, this is not
in accordance with https://www.rfc-editor.org/rfc/rfc7826.html#section-19.2.
This also impedes setting up a rtsps session with a live555 rtsp server.

Don't expose other than rtsp and rtsps internal gstreamer rtsp url schemes
to avoid regression:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2412

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4294>
2023-03-29 11:38:47 +00:00
Bart Van Severen c2b3afd3dd Revert "rtsp: gstrtspurl: gst_rtsp_url_get_request_uri: fix incorrect scheme for tls transport methods"
This reverts commit 024ef7659d because it causes a regression:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2412

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4294>
2023-03-29 11:38:47 +00:00
Hugo Svirak 631c72b219 videorate: Fix incorrect drop value when drop_only is true
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4052>
2023-03-27 19:56:55 +00:00
Haihua Hu 8541d6b990 decodebin3: fix hang issue when remove failing stream
Need mark selection_update to true when update selection,
otherwise, pipeline will not handle this selection update
sometimes when this flag has been reset

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4277>
2023-03-27 13:52:42 +00:00
Shengqi Yu 96a46e31c7 appsink: add propose_allocation support
Adding propose_allocation is to meet the requirement of Application to
request buffers. Application sometimes need to create buffer pool
and request buffers to maintain buffer management itself, and Gstreamer plugin
import Application's buffers to use. So, add propose_allocation in
appsink like waylandsink and kmssink etc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4185>
2023-03-27 12:34:16 +03:00
Tim-Philipp Müller 330836db8e taglist, plugins: fix compiler warnings with GLib >= 2.76
Fix compiler warnings about not using the return value when
freeing the GString segment with g_string_free(.., FALSE):

    ignoring return value of ‘g_string_free_and_steal’ declared with attribute ‘warn_unused_result’

which we get with newer GLib versions. These were all harmless.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4273>
2023-03-27 07:37:11 +00:00
Tobias Rapp c467ac0869 gst-plugins-base: Add FourCC and type description for FFVHuff video
The FFVHuff video codec is a FFmpeg-specific variant of the lossless
HuffYUV codec with increased coverage of supported pixel formats and bit
depths.

Fixes #2389.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4250>
2023-03-23 14:30:59 +00:00
Sebastian Dröge b1cb36e74c opusdec: Add support for decoding >8 channels
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4180>
2023-03-23 08:46:50 +00:00
Sebastian Dröge d78bed99e8 opusenc: Use downstream channel configuration when using channel mapping family 255
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4180>
2023-03-23 08:46:50 +00:00
Sebastian Dröge 7e63427827 opusenc: Add support for encoding >8 channels and unknown/unpositioned layouts
This was kind of implemented before but missing a few pieces to actually
work correctly.

These configurations are mapped to channel mapping family 255.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4180>
2023-03-23 08:46:50 +00:00
Edward Hervey 0be233a446 uridecodebin3: Remove play items that were never connected
This is a follow-up of the previous commit that enabled support for redirection.

The problem is that the urisourcebin that emitted the error redirection never
produced any pads, and therefore was never linked to decodebin3. This resulted
in the code waiting for that (output) item to finally switch over ... which will
never happen.

The fix is done by removing it early if it was never connected to decodebin3.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4252>
2023-03-23 07:39:48 +01:00
Stéphane Cerveau 23661f0446 vulkan: gl: change symbols to static
Change window_proc and subclass_proc to static to avoid symbols
duplication.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4246>
2023-03-23 00:56:04 +00:00
Edward Hervey 133c4b2ff9 uridecodebin3: Handle redirection errors
This is done by doing an immediate switch to the redirection URI if compatible.

Fixes #1562

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4242>
2023-03-22 11:28:47 +00:00
Edward Hervey 095356b67e parsebin: Improve elementary stream handling
The goal of parsebin is to figure out which elements to link together in order
to provide elementary streams given any random input.

The problem is that deciding whether a given stream should still have more
elements plugged in or not was dependent on ... the presence of compatible
decoders (sic).

Instead of that, if we can't plug anymore elements on a given stream *and* it is
detected as being an elementary stream, expose it.

Fixes #2118

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4231>
2023-03-21 07:26:37 +00:00
Edward Hervey cf3adbcfb3 urisourcebin: Activate pad before transferring sticky events
Otherwise they get refused since the pad is flushing

Fixes #2384 for good

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4226>
2023-03-20 18:11:26 +00:00
Edward Hervey ee759fb4bf plugins: Fix wrong enum usage
gcc 13 now detects conflicting enum usages. Fix the various cases where it was wrong

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4225>
2023-03-20 11:40:30 +00:00
Philippe Normand 47b8618b2d glbasesrc: Reword error message
The initial glbasesrc implementation was based on a refactoring of gltestsrc,
but one error message wasn't updated accordingly and remained specific to the
gltestsrc implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4222>
2023-03-19 16:39:18 +00:00
Piotr Brzeziński e448888e1e allocators: Only build DRM allocator on Linux
This was causing issues when building the monorepo on macOS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4208>
2023-03-19 13:45:37 +00:00
Sebastian Dröge ccad9a7338 plugins: Fix various trivial clang compiler warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4210>
2023-03-18 16:16:55 +02:00
Edward Hervey 7f1c5e2ef3 urisourcebin: Propagate sticky events from parsebin
If sticky events are present on parsebin source pads, we propagate them to the
multiqueue source pads. Those will be propagated on the new urisourcebin source
pads like in the other code paths.

This ensures that STREAM_START event are present on new source pads. If CAPS
event are also present (not guaranteed), they will also be available.

Fixes #2384

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4203>
2023-03-17 23:48:43 +00:00
Víctor Manuel Jáquez Leal d6dd81dbdd video: remove spurious gst_caps_make_writable()
In gst_video_info_dma_drm_to_caps() the caps are newly created, so there's no
need for make it writable. In gst_video_info_dma_drm_from_caps() a copy of the
caps is done, which implies a gst_caps_make_writable().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4195>
2023-03-17 13:01:02 +00:00
Tim-Philipp Müller 8759b77a50 gst-plugins-base: re-indent with GNU indent 2.2.12
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4182>
2023-03-17 03:18:53 +00:00
Nicolas Dufresne 7c7f2bb6df allocators: Add a DRM Dumb Allocator
This allow allocating memory from any DRM driver that supports this
method. It additionally allow exporting DMABuf. This allocator depends
on libdrm and will be stubbed if the dependency is missing. This is derived
from kmssink dumb allocator.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801>
2023-03-14 21:50:57 +00:00
Carlos Falgueras García 76abb90477 gluploadelement: Delete unused types
`*GstGLUploadElementPrivate` is not defined or used anywhere.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4145>
2023-03-13 06:15:03 +00:00
Víctor Manuel Jáquez Leal 6c71654991 tests: add tests for GstVideoInfoDmaDrm
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4043>
2023-03-12 03:09:01 +00:00
He Junyan 67d0a911a5 video: add dma format and info helper functions
From the dmabuf.md[1], "drm-format" field in caps will replace the
traditional "format" field, so it needs to import some new helper
functions to support this.

1. https://gstreamer.freedesktop.org/documentation/additional/design/dmabuf.html

Co-authored-by: Yinhang Liu <yinhang.liu@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4043>
2023-03-12 03:09:01 +00:00
Stéphane Cerveau f6b2b716b2 timeoverlay: add buffer-count mode
This mode would allow to display the buffer
number received by the timeoverlay element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3827>
2023-03-10 16:00:53 +00:00
Edward Hervey b4cadf35bd uridecodebin3: Ensure atomic urisourcebin state change
When dynamically adding and synchronizing the state of urisourcebin, we need to
ensure that no-one else attempts to change the state in case of failures

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4125>
2023-03-08 09:29:57 +00:00
Nicolas Beland 8e77f89e86 alsasink: Fix stall when going from PLAYING to NULL (stucked at PAUSED) with uac1 gadget
This happened with a uac1 gadget which for some reason does not behave nicely.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4095>
2023-03-02 03:41:25 +00:00
Carlos Falgueras García dafc024ed0 gldisplay: Remove unused code
The code related with environment variable `GST_GL_PLATFORM` is unused
since commit 33c60bdbf9.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4090>
2023-03-01 08:23:37 +00:00
Seungha Yang 5249b09e04 examples: win32-videooverlay: Fix for window freezing
Read and flush console buffer from the console thread immediately,
instead of main thread. Otherwise (if main thread is busy)
the console thread will keep adding idle source and then main thread
will be unresponsive.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4067>
2023-02-25 20:53:55 +09:00
Patricia Muscalu 35f1738875 rtspconnection: Annotate RTSP message parameters correctly
These parameters are not actually `out` parameters but must
be allocated and zero-initialized by the calling function.
Marking them as `out caller-allocates` will cause memory
corruptions when calling these APIs from e.g., Python code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4051>
2023-02-23 12:04:37 +00:00
Tristan van Berkom 0472c306d0 gstglwindow_x11.c: Fix colormap leak
This fixes an X server side memory leak, this is normally not severe
but in some circumstances where the glwindow is recreated frequently
it can result in a very bad memory leak.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4047>
2023-02-22 16:29:06 +00:00
Tim-Philipp Müller 820247b3e8 gst-plugins-base: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4040>
2023-02-22 12:22:12 +00:00
Tim-Philipp Müller 898f0c5ba9 gst-play: update translated string
Make it more consistent with the other option descriptions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4030>
2023-02-21 18:50:33 +00:00
Yang, Xuchen a14f8008fb audio: channel-mix: Fix channel count limit to be able to equal 64
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3949>
2023-02-14 07:04:45 +00:00
Thibault Saunier dc1c9c8985 glvideomixer: Keep a reference to the underlying pad
There was cases where we were accessing the pad while it was already
destroyed. Ensure it can't happen by owning a ref on it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3916>
2023-02-13 22:23:13 +00:00
Edward Hervey 15bb6abeca gst-play: Don't force accurate seeking
This crept in several years ago sadly :(

The usage of accurate seeking should be reserved to use-cases where it is
essential that we seek to that position. This should not be the default.

There is a new option `--acurate-seeks/-a` to be able to force that.

Furthermore, if accurate seeks aren't required, a player should be using the
GST_SEEK_FLAG_KEY_UNIT flag to seek to the closest keyframe and provide the most
reactive experience.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3926>
2023-02-13 09:25:31 +00:00