Commit graph

4177 commits

Author SHA1 Message Date
Eva Pace ce467b72aa docs: Update tutorial 14 to 1.0 (audio/x-raw)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4353>
2023-04-06 15:16:15 +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
Jan Schmidt 1b762ba012 mpegpsdemux: Rework gap sending
Take the gap logic from mpegtsdemux, and don't
send gap events on a stream that's outputting buffers with
no timestamps. Time isn't advancing, but the stream has
buffers - so it's not sparse.

Fixes #2374

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4333>
2023-04-06 01:34:03 +00:00
Sebastian Dröge b90c0bd79b vulkan: Use new GLib APIs as suggested by comments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4349>
2023-04-06 00:26:13 +00:00
Jordan Petridis 1c301df91a jack: remove version guards from the code
We already require >= 1.9.7 in meson and thus we can remove
the older codepath.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4348>
2023-04-05 21:39:00 +00:00
Nicolas Dufresne b2ebc2cac4 medias: Bump the medias commit
See !4259

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4259>
2023-04-05 13:38:30 -04:00
Nicolas Dufresne c883fea19e h265parse: Don't override upstream framerate
The framerate should only be replaced (and corrected for alternating field)
when it is parsed from the bitstream. Otherwise, the upstream framerate
from caps should be trusted and assumed correct.

Related to gst-plugins-bad!2020

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4259>
2023-04-05 13:33:39 -04:00
Nicolas Dufresne 93904f1921 h265parse: Rename parsed_framerate to framerate_from_caps
That meaning of parsed_framerate is ambigious, it is set whenever the
framerate has been parsed from caps, which can be confused with being
parsed from the bitstream. Rename this as framerate_from_caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4259>
2023-04-05 13:33:39 -04: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 7b41db3ab6 basesrc: add gst_base_src_push_segment()
gst_base_src_new_segment() does not send the segment right away, which
may break events ordering if subclass sends other events after
calling it.
Introducing a variant pushing the segment right away to preserve
ordering in such cases.

Will be used by appsrc which has its own internal queue where we need to
preserve events order.

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
Alexande B 452c06782e osxvideosink: fix broken aspect ration and frame drawing region
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3336>
2023-04-05 09:48:34 +00:00
Sebastian Dröge 5b178caadf rtsp-server: media: First set state to PLAYING again temporarily, then send EOS
Sending the EOS event while the pipeline is PAUSED can deadlock on the
stream lock if a sink is currently blocked because of pre-rolling.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4340>
2023-04-05 08:06:50 +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
Sebastian Dröge 43e4db9fc9 rtspsrc: Skip PTs with caps incompatible to the global caps
Otherwise empty caps are created while all following code assumes that
the caps will have exactly one structure, and then run into assertions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4339>
2023-04-04 22:13:59 +00:00
Edward Hervey 38dd5deb66 tsdemux: Minor refactoring
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4336>
2023-04-04 20:54:50 +00:00
Edward Hervey 8e51399334 mpegts: Fix include headers
<gst/mpegts/mpegts.h> is the unique header to use

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4336>
2023-04-04 20:54:50 +00:00
Jan Schmidt 8ec6ef8ca4 adaptivedemux: Don't parse URI unnecessarily
Short-circuit parsing and recreating the playlist URI if
no HLS directives are going to be applied to it.

Fixes problems playing some streams (YouTube) that have
unneeded escaped characters in the URI and then complain
when GStreamer removes the escaping

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4335>
2023-04-04 19:21:31 +00:00
Wojciech Kapsa 8d4916df84 decklink: fix 10 bit RGB (r210) format auto detection
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2391

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4332>
2023-04-04 20:37:09 +03:00
Jan Alexander Steffens (heftig) cd827e790a multiqueue: Simplify gst_multi_queue_iterate_internal_links
We don't need to obtain the mutex to ensure that `sq` is non-NULL. `sq`
is assigned immediately after the pads are created and not destroyed
until the pads are finalized.

Use the pad direction to determine which internal peer we need.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/888>
2023-04-04 12:22:18 +00:00
Michael Gruner 53c145a158 gstelement: protect async state changes against spurious wake ups
When a pipeline is pre-rolling, it waits for all sink elements to report
they have received a buffer before completing the transition to paused.
This async wait is done using a state condition variable. The way this
waits are currently implemented do not protect against spurious conditional
wake ups, which may happen due to external factors in the kernel.

This change implements the wait within a loop that iterates over the protected
variable to reinitiates the wait if the wakeup was spurious. More details in
the [GCond docs](https://docs.gtk.org/glib/struct.Cond.html).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4086>
2023-04-04 07:24:57 +00:00
Seungha Yang 47fda2c51c d3d11screencapturesrc: Add "window-capture-mode" property
... to support capturing only window's client area

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2425
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4324>
2023-04-03 15:06:47 +00:00
Jordan Petridis 3b1a7e5296 meson: add missing source_filename in the dav1d wrap
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4307>
2023-04-03 14:29:36 +00:00
Seungha Yang 1876e5c429 cea608mux: Fix output buffer timestamping
Don't assume that input stream starts from zero running time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4319>
2023-04-03 13:11:00 +00:00
Aleksandr Slobodeniuk e683000573 d3d11videosink: fix race conditions in win32 window
One race condition is the fact that the window object
can be destroyed while running some routine in the UI
thread (such as resizing). To avoid that situation we make
UI thread hold a reference on the window object while it's
running.
Other probpematic case is when the window handle is reused:
if we stop and start the pipeline very fast,
so the sink creates a new window object that is going to use
the same window handle as the previous one.
And finally the case when the pipeline is stopped immediatelly
right after starting, this one is also handled in this commit.

NOTE: a unit test that reproduces this cases have been added
in the previous commit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4260>
2023-04-03 11:19:11 +00:00
Aleksandr Slobodeniuk fcf4dbf8e3 d3d11videosink: add gstcheck test for win32 window
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4260>
2023-04-03 11:19:10 +00:00
Matthew Waters 54acb36689 vulkan/wayland: use xdg_wm_base when available
wl_shell is deprecated and has been removed from some compositors.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4316>
2023-04-03 02:36:38 +00:00
Matthew Waters edffae31dd vulkan/wayland: provide a dummy registry global_remove function
Even if we don't care about any global objects being removed, wayland
will still error if globals are removed without a corresponding listener
set up for them.  e.g. wl_output hotplugging

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4316>
2023-04-03 02:36:38 +00:00
Matthew Waters 21cff6b134 vulkan/wayland: rename debug category to mention wayland instead of XCB
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4316>
2023-04-03 02:36:38 +00:00
Tim-Philipp Müller c73f6c5746 tools: gst-inspect: print action signals as emit_by_name() invocations
It's quite confusing to print a function callback signature for
action signals when people need to do a g_signal_by_name() invocation
in order to use this feature. Requires too much background knowledge
about how GObject works under the hood to make sense of that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4299>
2023-04-02 16:35:32 +00:00
Tim-Philipp Müller 8e5196fec6 tools: gst-inspect: prettify type names for strings
'gchararray' and 'GStrv' are not types used anywhere else
and are just confusing. Map that to 'const gchar *' and 'gchar *'
etc. depending on context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4299>
2023-04-02 16:35:32 +00:00
Tim-Philipp Müller b21a0948aa tools: gst-inspect: add vertical spacing between properties and signals
Makes it easier to read and less squashed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4299>
2023-04-02 16:35:32 +00:00
Seungha Yang 7755cd2f7a d3d11videosink: Enhancement for initial window size decision
Use AdjustWindowRect() method to calculate window size so that
video scene can be rendered on client area without black borders

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4323>
2023-04-02 00:31:58 +09:00
Matthew Waters b132a44ba5 ccconverter: reintroduce frame count reset on cycle completion
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4308>
2023-03-31 21:35:21 +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
Shengqi Yu 8cf21fe744 v4l2object: Add support for YVU420M format
This is a multi-planar format with planes non contiguous in memory. It
is intended to be used only in drivers and applications that support the
multi-planar API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4287>
2023-03-31 13:42:05 +00:00
Brad Hards 4087bb9a55 mpegts: remove stream-type from KLV meta
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4310>
2023-03-31 07:03:54 +00:00
Brad Hards 6f2eb752c5 mpegts: add support for KLV metadata in PES packets
Co-authored-by: Andoni Morales Alastruey <ylatuya@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1312>
2023-03-30 12:16:52 +00:00
Brad Hards 4e14bac1ff mpegts: implement metadata in PES packets
Co-authored-by: Andoni Morales Alastruey <ylatuya@gmail.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1312>
2023-03-30 12:16:52 +00:00
Víctor Manuel Jáquez Leal e5c38003b8 gsth254picture: move internal API to private header
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4288>
2023-03-30 11:40:33 +02:00
Víctor Manuel Jáquez Leal 57e0bdb356 h264decoder: use last_output_poc from DPB
It seems that `last_output_poc` in `h264decoder` class is a left over of commit
5527cc4a2e.

This patch removes it but keeps the log message by fetching the `h264picture`'s
`last_output_pic`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4288>
2023-03-30 09:38:47 +00:00
Víctor Manuel Jáquez Leal a31cd75c73 vkmemory: flush whole size
Running element_vkcolorconver test with Vulkan validation layer this error is
raised:

Code 0 : Validation Error: [ VUID-VkMappedMemoryRange-size-01390 ] Object 0:
handle = 0x100000000010, type = VK_OBJECT_TYPE_DEVICE_MEMORY;
| MessageID = 0xdd4e6d8b
| vkFlushMappedMemoryRanges: Size in pMemRanges[0] is 0x4, which is not a
multiple of VkPhysicalDeviceLimits::nonCoherentAtomSize (0x40) and offset +
size (0x0 + 0x4 = 0x4) not equal to the memory size (0xb). The Vulkan spec
states: If size is not equal to VK_WHOLE_SIZE, size must either be a multiple of
VkPhysicalDeviceLimits::nonCoherentAtomSize, or offset plus size must equal the
size of memory

The reason of is that the image size used in the test doesn't comply hardware
restrictions. In order to avoid juggling with image size and hardware
restrictions, this patch proposes to use VK_WHOLE_SIZE macro.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4296>
2023-03-30 00:03:05 +00:00
Víctor Manuel Jáquez Leal d69e1393f8 tests: vkimage: add VK_IMAGE_USAGE_SAMPLED_BIT usage bit
Running tests with Vulkan Validation enabled show an error on vkimage tests:

Code 0 : Validation Error: [ VUID-VkImageViewCreateInfo-image-04441 ]
Object 0: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle
= 0x50000000005, type = VK_OBJECT_TYPE_IMAGE;
| MessageID = 0xb75da543
| Invalid usage flag for VkImage 0x50000000005[] used by vkCreateImageView(). In
this case, VkImage should have VK_IMAGE_USAGE_SAMPLED_BIT |
VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT |
VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT | VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT |
VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR |
VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT |
VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR |
VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR |
VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR |
VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR | VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM
| VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM set during creation.
The Vulkan spec states: image must have been created with a usage value
containing at least one of the usages defined in the valid image usage list for
image views

This patch adds VK_IMAGE_USAGE_SAMPLED_BIT to the usage bits in test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4296>
2023-03-30 00:03:04 +00:00
Víctor Manuel Jáquez Leal 3e194267d1 vkfullscreenquad: set enable_clear as TRUE by default
While using the validation layer with this pipeline:

gst-launch-1.0 videotestsrc num-buffers=10 ! vulkanupload ! vulkancolorconvert ! vulkansink

The validation layer throws this message:

Code 0 : Validation Error: [ VUID-VkAttachmentDescription-format-06699 ]
Object 0: handle = 0x5555562e9610, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x52b3229e |
vkCreateRenderPass: pCreateInfo->pAttachments[0] format is
VK_FORMAT_B8G8R8A8_UNORM and loadOp is VK_ATTACHMENT_LOAD_OP_LOAD, but
initialLayout is VK_IMAGE_LAYOUT_UNDEFINED.
The Vulkan spec states: If format includes a color or depth aspect and loadOp is
VK_ATTACHMENT_LOAD_OP_LOAD, then initialLayout must not be VK_IMAGE_LAYOUT_UNDEFINED

When creating the render pass the loadOp can be either
`VK_ATTACHMENT_LOAD_OP_CLEAR` or `VK_ATTACHMENT_LOAD_OP_LOAD` depending on
`enable_clear`. While `enable_clear` is FALSE by default (which means
`VK_ATTACHMENT_LOAD_OP_LOAD`). Nonetheless, its value is explicitly changed by
`vkoverlaycompositor` to FALSE too!

This behavior was introduced in merge request #2470 where
`VK_ATTACHMENT_LOAD_OP_CLEAR` was a fixed value for loadOp. Thus, the bug
consists in a missing initialization of `enable_clear` to TRUE from that merge
request.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4296>
2023-03-30 00:03:04 +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
Erik Fröbrant 456bbad2dd curlbasesink: error codes in transfer error details
There is currently no easy way for an application to distinguish between
different resource write errors being set in the curlbasesink.
Add curl status codes as error details on transfer failure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4062>
2023-03-29 10:03:36 +00:00
Erik Fröbrant 8f094a1cc8 curlhttpsink: HTTP code in transfer error details
There is currently no easy way for an application to distinguish between
different resource write errors being set in the curlhttpsink.
Add HTTP status code as error details on transfer failure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4062>
2023-03-29 10:03:35 +00:00
Juan Navarro b41a5d3ccb gstutils: Add category and object to most logging messages
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4291>
2023-03-28 22:41:53 +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
Sebastian Dröge 49c9f31803 datetime: Return G_MAXFLOAT instead of G_MAXDOUBLE for no timezone offset
Returning G_MAXDOUBLE from a function returning a float is not going to
work well and MSVC also correctly warns about this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4264>
2023-03-27 16:50:33 +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
Matthew Waters 58d1ab4618 vulkanswapper: correctly handle force-aspect-ratio=false
It was simply ignored so actually handle it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4278>
2023-03-27 11:58:46 +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 c798f01fae debugqroverlay: fix string leak
g_string_free(.., FALSE) gives us ownership of the string
already, no need to duplicate that again with g_strdup(),
and doing so will leak the string returned by g_string_free()
here. Caught by compiler warnings in newer GLib versions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4273>
2023-03-27 07:37:11 +00: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
Thibault Saunier 00ed40dbfd validate: scenario: Add a vmethod to free GstValidateActionParameter-s
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4265>
2023-03-27 01:25:43 +00:00
Sebastian Dröge da198e59b2 av1enc: Use correct enum type with libaom >= 3
This fixes, among other things, a compiler warning with clang.

Also add static assertions that our own enum values match with the ones
from libaom.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4223>
2023-03-25 07:12:53 +00:00
Stéphane Cerveau f3dfe7b125 openjpegdec: allow multithread decoding only in subframe mode
To avoid mis-ordered frames, allow multithread decoding only in
subframe mode.

Fixes #1786

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3948>
2023-03-25 06:03:02 +00:00
Mathieu Duponchelle e8c362ee34 cea608mux: advance segment->position when outputting
It is the responsibility of the subclass to advance segment->position if
it wants to rely on gst_aggregator_simple_get_next_time() for timeouts
in live mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4266>
2023-03-24 21:17:58 +00:00
Tim-Philipp Müller ba417b0e07 rtpjpegdepay: fix logic error when checking if an EOI is present
We wouldn't add the missing EOI marker if the frame ended with
either 0xFF NN or 0xNN D9.

Fixes #2407

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4256>
2023-03-24 19:39:33 +00:00
Víctor Manuel Jáquez Leal 292d6cdbed vaencoder: remove display reference in decode picture
Since it's possible to grab the VA display from the GstBuffer and
GstMemory, there's no need to keep a reference to it in
GstVaEncodePicture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3066>
2023-03-24 14:05:15 +00:00
Víctor Manuel Jáquez Leal 494169aad4 vadecoder: remove display reference in decode picture
Since it's possible to grab the VA display from the GstBuffer and
GstMemory, there's no need to keep a reference to it in
GstVaDecodePicture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3066>
2023-03-24 14:05:15 +00:00
Víctor Manuel Jáquez Leal 746e81fccf vkinstance: register GStreamer version as engine version
Specification says:

"""
engineVersion is an unsigned integer variable containing the developer-supplied
version number of the engine used to create the application.
"""

Assuming the engine is GStreamer, it would be expected to set its version as
engine version.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4243>
2023-03-24 04:28:54 +00:00
Seungha Yang af6dccd6e6 d3d11bufferpool: Fix invalid access in debug print loop
Add missing condition check in for loop

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4255>
2023-03-23 18:15:03 +00:00
Víctor Manuel Jáquez Leal 1ace1a5275 vkinstance: enable GPU assisted validation
This allows to check for syncronization issues while using the validation layer.

https://vulkan.lunarg.com/doc/sdk/1.3.239.0/linux/synchronization_usage.html

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4245>
2023-03-23 16:46:34 +00:00
Tobias Rapp b30f982cf5 gst-libav: Update codec mapping for FFVHuff video
Replaces the ad-hoc type string 'video/x-gst-av-ffvhuff' with
'video/x-ffvhuff' for the avdec_ffvhuff and avenc_ffvhuff elements.

Related to #2389.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4250>
2023-03-23 14:30:59 +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
Matthew Waters ba81f3597d vulkanoverlaycompositor: also support RGBA vulkan images
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4184>
2023-03-23 22:18:47 +11:00
Sebastian Dröge 84e08a377b mpegtsdemux: Fix handling of explicit Opus channel mapping
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4180>
2023-03-23 08:46:50 +00:00
Sebastian Dröge 9d2ac6e90b mpegtsmux: Allow writing arbitrary Opus channel mapping families and up to 255 channels
And fix writing of dual-mono special cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4180>
2023-03-23 08:46:50 +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
Aleksandr Slobodeniuk 4f988e24d2 bin: fix documentation about event forwarding
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4249>
2023-03-23 02:39:34 +00: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
Stéphane Cerveau e88e8527ed sys: avoid double definition of symbol MEDIASUBTYPE_I420
Namespace the symbol MEDIASUBTYPE_I420 to avoid double definition
across dshow and mediafoundation plugins.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4246>
2023-03-23 00:56:04 +00:00
Seungha Yang 96555c7ee9 nvh264encoder: Fix template caps
It should include progressive as well

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4236>
2023-03-22 23:40:58 +00:00
Víctor Manuel Jáquez Leal c159e40a9f vulkan: silence gobject-instrospection warnings
According with gi annotations [1] the "optional" annotation must be only
for (out) or (inout) parameters.

1. https://gi.readthedocs.io/en/latest/annotations/giannotations.html

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4244>
2023-03-22 14:19:13 +00:00
Piotr Brzeziński 5beef42922 qtdemux: Fix seek adjustment with SNAP_AFTER flag
With GST_SEEK_FLAG_SNAP_AFTER present, the previous version would
adjust seek time based on the keyframe farthest away from desired_time.
This was incorrect, because we always want the *earliest* suitable keyframe
to seek to, not the last one.
With this fix, in case of the SNAP_AFTER, we now look for the closest keyframe
that can be found after desired_time. Behaviour for SNAP_BEFORE should remain
unchanged.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4183>
2023-03-22 13:05:53 +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
François Laignel 1abc8aa733 examples: webrtc/janus/rust: add mandatory ws HTTP request headers
Trying to run the `janus` Rust `gst-example`, `tungstenite` reports:

> Missing, duplicated or incorrect header sec-websocket-key

Indeed, all mandatory headers from the following list are missing
(code from `tungstenite:🤝:client::generate_request`):

```rust
const WEBSOCKET_HEADERS: [&str; 5] =
    ["Host", "Connection", "Upgrade", "Sec-WebSocket-Version", KEY_HEADERNAME];
```

These headers are mandatory for the websocket handshake. This feature is
selected by async-tungstenite.

Prior to this commit, the HTTP request was created with the header
"Sec-WebSocket-Protocol" only. Delegating the request creation to tungstenite
adds the missing headers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4240>
2023-03-22 09:48:28 +00:00
Tong Wu ebc9780c5f msdkdec: delete use_video_memory
Since msdkdec uses video pool as the output buffer pool at all time. The
use_video_memory variable is not useful anymore. Now delete it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4088>
2023-03-22 05:07:19 +00:00
Tong Wu 8105d2044d msdkdec: expand retry times to 1s
One-frame sleep time is not enough to wait until there is a surface
unlocked from downstream. Now expand it to 1s and add a return when
fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4088>
2023-03-22 05:07:19 +00:00
Tong Wu 123c8d14c1 msdkallocator_d3d: add gst_msdk_frame_free callback function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4088>
2023-03-22 05:07:19 +00:00
Tong Wu abe4d0046a msdkdec: acquire buffer from video pool on Windows
Video memory is available on Windows. This patch is to make the buffers
acquired from d3d11 video pool.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4088>
2023-03-22 05:07:19 +00:00
Tong Wu d2902be9eb msdkdec: add thiz->ds_has_known_allocator for d3d11
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4088>
2023-03-22 05:07:19 +00:00
Tong Wu 245df2778e msdkallocator_d3d: add alloc callback function for d3d allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4088>
2023-03-22 05:07:19 +00:00
Tong Wu b3e13df8c1 msdkdec: add d3d11 pool during negotiation
Enable use_video_memory for Windows and add d3d11 pool.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4088>
2023-03-22 05:07:19 +00:00
Tong Wu 2b9cda928b msdkdec: add d3d11 caps for srcpad
Set decoder srcpad with D3D11Memory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4088>
2023-03-22 05:07:19 +00:00
Michael Tretter a11f811155 v4l2object: mark jpeg as parsed
Assuming that V4L2 CAPTURE devices always use one buffer per JPEG image, we can
always mark JPEGs provided by a V4L2 element as parsed.

The V4L2 elements require that JPEG images sent to V4L2 OUTPUT devices must
always be parsed.

This is necessary to link a V4L2 CAPTURE device with a V4L2 OUTPUT device
without explicitly marking the stream as parsed or adding a jpegparse into the
pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4229>
2023-03-21 14:58:15 +00:00
Aleksandr Slobodeniuk 1f834eaacb d3d11convert: add "method" property
It allows to select the sampling method, same
as "method" property of videoconvert.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4205>
2023-03-21 12:08:54 +00:00
Aleksandr Slobodeniuk 4c9d4d30cb d3d11convert: protect 'add-borders' with mutex
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4205>
2023-03-21 12:08:54 +00:00
Colin Kinloch 1b926e0dcc gtkwaylandsink: Fix crash when rendering after the window is closed
Continuation of https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4197

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4232>
2023-03-21 08:57:34 +00:00