Commit graph

5509 commits

Author SHA1 Message Date
Mart Raudsepp
bcc0885239 bs2b: Add missing space in plugin description
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5477>
2023-10-13 09:04:14 +00:00
Mart Raudsepp
6c0e5ca689 colormanagement: Fix typo in pipeline example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5478>
2023-10-13 10:04:39 +03:00
Jordan Petridis
5f7a37f21e qt6: if def newer symbosl in QRhiTexture
version 6.4 added QRhiTexture::RGB10A2 but we depend on an older
version of qt in meson, and we can keep compiling with older Qt6
versions still.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5475>
2023-10-12 22:57:35 +00:00
Stéphane Cerveau
7c7a90b99d imagesequencesrc: fix regular image deadlock
With one regular image file path provided (without %05d),
the element was stuck in a dead loop counting the frames:

gst_image_sequence_src_count_frames

This allows to display any image file out of the element
for a given number of buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5471>
2023-10-12 22:06:02 +00:00
Rahul T R
6fbe4d55c4 kmssink: Add TIDSS auto-detection
Add Texas Instruments TIDSS display controller into list of
auto-detected modules.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5469>
2023-10-12 18:25:50 +00:00
Haihua Hu
4e381b8901 playback: Support runtime change connection-speed of adaptivedemux(2)
Update connection-speed at runtime in playbin, uridecodebin and decodebin
also do the same thing in urisourcebin.

With contributions from Philippe Normand <philn@igalia.com> (build fixes and
rebase on mono-repo).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4713>
2023-10-12 16:06:42 +00:00
Matthew Waters
7b491f382c build/qt6: properly error/skip build if the qsb tool is not found
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3032

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5459>
2023-10-12 12:58:26 +00:00
Seungha Yang
ed29c23e86 d3d12, dwrite, va: Fix various msys2 build error/warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5454>
2023-10-12 10:53:58 +00:00
Mengkejiergeli Ba
c14f4cda0c msdkvpp: Use filter flag to handle passthrough for tone mapping
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5449>
2023-10-12 05:02:37 +00:00
Seungha Yang
c2ed8759c8 d3d11videosink: Don't use DXGI_ALPHA_MODE_PREMULTIPLIED for HWND swapchain
It's allowed only for a swapchain type which does composition

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5464>
2023-10-11 22:22:56 +00:00
Seungha Yang
7b564619cf d3d11videosink: Fix rendering with initial fullscreen state
Change fullscreen mode once the swapchain is fully configured

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5462>
2023-10-11 21:39:11 +00:00
Seungha Yang
15248d8b84 d3d11videosink: Fix toggling between fullscreen and maximized
Use GetWindowPlacement() and SetWindowPlacement() APIs
to remember and restore window status, such as maximized, position,
restore position, etc.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3016
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5462>
2023-10-11 21:39:11 +00:00
Michael Tretter
0563a25494 v4l2videoenc: unconditionally activate the OUTPUT pool
If the v4l2videoenc receives an QUERY_ALLOCATION, it must not propose a
currently used pool, because it cannot be sure that the allocation query came
from exactly the same upstream element. The QUERY_ALLOCATION will not contain
the internal OUTPUT pool.

The upstream element (the basesrc) detects that the newly proposed pool differs
from the old pool. It deactivates the old pool and switches to the new pool.

If there was a format change, a new OUTPUT buffer pool will be allocated in
gst_v4l2_object_set_format_full() and the CAPTURE task will be stopped to switch
the format. If there hasn't been a format change,
gst_v4l2_object_set_format_full() will not be called. The old pool will be kept
and reused.

Without a format change, the processing task continues running.

This leads to the situation that the processing task is running, but the OUTPUT
buffer pool (the old pool) is deactivated. Therefore, the encoder is not able to
get buffers from the OUTPUT pool and encoding cannot continue.

This situation can be triggered by sending a RECONFIGURE event without a format
change.

Resolve this situation by ensuring that the OUTPUT buffer pool is always
activated when frames arrive at the encoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4235>
2023-10-11 19:35:54 +00:00
Michael Tretter
41ce99ebab v4l2videoenc: fix activation of internal pool
Fix the buffer pool activation if the driver does not support VIDIOC_CREATE_BUFS
the same way as it was fixed for the v4l2videodec.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4235>
2023-10-11 19:35:54 +00:00
Michael Tretter
5e72e1985a v4l2videoenc: rename OUTPUT pool to opool
There is a CAPTURE pool in the same function. While the CAPTURE pool is called
cpool, using pool for the OUTPUT pool is confusing.

Using opool for the OUTPUT pool makes it more obvious, which pool is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4235>
2023-10-11 19:35:54 +00:00
Seungha Yang
f52ecb9607 d3d11converter: Add support for HLSL precompile and bytecode caching
Precompile pixel shaders for simple conversion path
(without gamma/primaries conversion) in case of MSVC build.
Even if runtime compile is required (cross-compiled or complex conversion
path), do it only once and reuse the compiled bytecode.

This precompile/caching can save about 95% of time taken by
gst_d3d11_converter_new() call.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3004
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5457>
2023-10-11 18:40:46 +00:00
Seungha Yang
83a576e854 d3d11: Reuse sampler object
The linear sampler object can be reused

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5457>
2023-10-11 18:40:46 +00:00
Seungha Yang
92cc5722c8 d3d11: Pass HLSL source size to compile function
The string size is known at build time

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5457>
2023-10-11 18:40:46 +00:00
Seungha Yang
bfdea297d2 d3d11converter: Set alpha-mode using config
... and disallow runtime alpha-mode update for now

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5457>
2023-10-11 18:40:46 +00:00
Seungha Yang
8fe26c8a10 d3d11: Simplify HLSL build
Unify source/header/entrypoint names

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5457>
2023-10-11 18:40:46 +00:00
Guillaume Desmottes
a56aabc773 flvmux: set the src segment position as running time
We were already converting the pad last timestamp to running time but
not the segment position.
This segment position is used by gst_aggregator_simple_get_next_time()
to compute the waiting time when aggregating.

Those waiting times were wrong in my live pipeline using the system
clock, resulting in the aggregator to never wait at all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5460>
2023-10-11 15:20:18 +00:00
Nicolas Dufresne
bcfbdfbbca v4l2: Fix tiled formats stride conversion
While adding arbitrary tile support, a round up operation was badly
converter. This caused the Y component of the stride to be 0. This
eventually lead to a crash in glupoad preceded by the following
assertion.

  gst_gl_buffer_allocation_params_new: assertion 'alloc_size > 0' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5458>
2023-10-11 14:13:53 +00:00
Nicolas Dufresne
88fd9908fe v4l2codecs: Fix tiled formats stride conversion
While adding arbitrary tile support, a round up operation was badly
converter. This caused the Y component of the stride to be 0. This
eventually lead to a crash in glupoad preceded by the following
assertion.

  gst_gl_buffer_allocation_params_new: assertion 'alloc_size > 0' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5458>
2023-10-11 14:13:53 +00:00
Seungha Yang
5cb63edbd3 tests: multiqueue: Add overrun test case
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5430>
2023-10-11 13:17:46 +00:00
Seungha Yang
aa5f6b2376 multiqueue: Do not update time level on segment
Update time level decision logic to be identical to the queue/queue2

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5430>
2023-10-11 13:17:46 +00:00
Seungha Yang
650e7cc4b2 tests: queue, queue2: Add more timelevel test
... and update existing testcases for new timelevel measuring logic

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5430>
2023-10-11 13:17:46 +00:00
Seungha Yang
96a758abdb queue, queue2: Fix current-level-time report
Do not update timelevel on segment. Segment itself does not tell
anything about the amount of buffered time duration in the element
but buffer timestamp/duration is required to measure actual bufferred time.
Moreover, at the time when new segment is applied to sink/srcpad,
segment.position would point to random value.
Therefore calculating running time using the random value does not
make sense and it will result in wrong timelevel report.

This patch updates queue/queue2's timelevel measuring logic so that
it can be updated only on buffer/buffer-list/gap-event flow.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5430>
2023-10-11 13:17:46 +00:00
Matthew Waters
714c78ac51 glcolorconvert: add A422/A444 to output switch statement
Fixes glcolorconvert writing to A422 or A444 formats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5455>
2023-10-10 22:47:59 +11:00
Piotr Brzeziński
64a58c37ac glfilter: Only add parent meta if inbuf != outbuf
This was causing a memory leak in cases like `gltestsrc ! gltransformation scale-x=0.5 ! glimagesink`.
Parent meta was being added in assumption that those buffers are different, which was not the case here,
creating a reference loop and never freeing the buffer.

Co-authored-by: Matthew Waters <matthew@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5445>
2023-10-10 03:17:07 +00:00
Seungha Yang
3536b7f3a6 decklink: Fix broken COM string conversion
WideCharToMultiByte return is the string length without null terminate
character if passed "cchWideChar" does not include the null terminate
character size. Instead of passing the exact string length, pass -1 so that
the API can understand the input string is null terminated already and
returned value from the API includes the character.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3023
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5444>
2023-10-09 20:10:25 +09:00
Michael Tretter
c020dab393 uvcsink: use the pad's current caps to update caps_changed
The caps that were sent by the caps event can be retrieved from the sinkpad
using gst_pad_get_current_caps(). This is more reliable than using cur_caps as
we know exactly which caps upstream selected when the UVC host didn't select a
format, yet.

This further allows to simplify the check, if the uvcsink has to wait for the
caps event before switching to the internal v4l2sink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4994>
2023-10-06 15:55:23 +00:00
Michael Tretter
733b4d9597 uvcsink: use event function instead of probe
The probe passes all events except the EVENT_CAPS. Installing and removing the
probe doesn't provide any additional value.

Install an event function and always handle EVENT_CAPS. Use the caps_changed
field, to decide, if the element has to do anything special on a EVENT_CAPS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4994>
2023-10-06 15:55:23 +00:00
Michael Tretter
1732f8c728 uvcsink: refactor gst_uvc_sink_update_streaming
Move the sanity checks to the beginning of the function. Make the actual effect
of the function more obvious and reset the flags in the end.

This should make it easier to understand what this function is doing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4994>
2023-10-06 15:55:23 +00:00
Michael Tretter
6637343980 uvcsink: extract helper function for updating the stream state
The uvcsink may switch to the v4l2sink after a STREAMON either on a caps event
or on a caps query.

Extract the code that handles the STREAMON into a helper function, as this is
the same code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4994>
2023-10-06 15:55:23 +00:00
Michael Tretter
24daf9ea3d uvcsink: extract common code to reset caps_changed
The caps_changed flag must be reset for streamon and streamoff. Extract it to a
common path.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4994>
2023-10-06 15:55:23 +00:00
Michael Tretter
a9eef25717 uvcsink: remove separate function for buffer probe installation
The probe that installs the buffer probe is already on the correct pad. There is
no need for a separate function to install the probe.

While at it, change the signature of the probe functions to GstPadProbeCallback
to avoid the cast when installing the probes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4994>
2023-10-06 15:55:23 +00:00
Michael Tretter
eac9f60608 uvcsink: extract common code in idle_probe
The RECONFIGURE event has to be sent in streamon and streamoff. Extract the
common code to a separate branch to make it easier to understand.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4994>
2023-10-06 15:55:23 +00:00
Michael Tretter
69c5529011 uvcsink: return caps when reading the host configured caps
The uvcsink calculates the caps for the format that the UVC host selected. The
gst_uvc_sink_parse_cur_caps() sets these caps as cur_caps as a side effect. This
behavior is surprising as cur_caps is later updated to reflect the actually used
caps.

Just return the configured caps to avoid side effects. This makes the function
easier to understand. Update the function name to reflect the new behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4994>
2023-10-06 15:55:23 +00:00
Michael Grzeschik
17797d1d28 uvcsink: fix event peer probe
The only job of the event peer probe is to catch the upcoming caps event
and be able to react with the sink change. All other events that are
passing the pad shall be passed and ignored.

Since the probe is a blocking probe, there is no use in returning
with GST_PAD_PROBE_OK on other events. Otherwise the event would just
be blocked.

Since we are handling the probe removal of the probe already in the
event switch, we can remove the second explicit probe removal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4994>
2023-10-06 15:55:23 +00:00
Michael Grzeschik
e3a121950b uvcsink: drop useless debug messages in peer event probe
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4994>
2023-10-06 15:55:22 +00:00
Guillaume Desmottes
dd0896f05a audiobuffersplit: disable max-silence-time if set to 0
According to the property documentation max-silence-time is supposed to be
disabled when set to 0 but it was not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5442>
2023-10-06 14:48:46 +02:00
Sebastian Dröge
134a66277e ptp: Fix a couple of stylistic clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5441>
2023-10-06 13:39:34 +03:00
Leif Andersen
d1aaf8ba0d docs: Fix line numbers in tutorials 1 and 2
It seems that the lines for the C code for tutorials 1 and 2 are all
off.

The remaining tutorials seem uneffected.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5387>
2023-10-05 21:54:17 +00:00
Thibault Saunier
049859c2cb adaptivedemux2: Do not submit_transfer when cancelled
There is a race condition where transfer has not been submitted yet while the
request is cancelled which leads to the transfer state going back to
`DOWNLOAD_REQUEST_STATE_OPEN` and the user of the request to get signalled about
its completion (and the task actually happening after it was cancelled) leading
to assertions and misbehaviours.

To ensure that this race can't happen, we start differentiating between the
UNSENT and CANCELLED states as in the normal case, when entering `submit_request`
the state is UNSENT and at that point we need to know that it is not because
the request has been cancelled.

In practice this case lead to an assertion in
`gst_adaptive_demux2_stream_begin_download_uri` because in a previous call to
`gst_adaptive_demux2_stream_stop_default` we cancelled the previous request and
setup a new one while it had not been submitted yet and then got a `on_download_complete`
callback called from that previous cancelled request and then we tried to do
`download_request_set_uri` on a request that was still `in_use`, leading to
something like:

```
 #0: 0x0000000186655ec8 g_assert (request->in_use == FALSE)assert.c:0
 #1: 0x00000001127236b8 libgstadaptivedemux2.dylib`download_request_set_uri(request=0x000060000017cc00, uri="https://XXX/chunk-stream1-00002.webm", range_start=0, range_end=-1) at downloadrequest.c:361
 #2: 0x000000011271cee8 libgstadaptivedemux2.dylib`gst_adaptive_demux2_stream_begin_download_uri(stream=0x00000001330f1800, uri="https://XXX/chunk-stream1-00002.webm", start=0, end=-1) at gstadaptivedemux-stream.c:1447
 #3: 0x0000000112719898 libgstadaptivedemux2.dylib`gst_adaptive_demux2_stream_load_a_fragment [inlined] gst_adaptive_demux2_stream_download_fragment(stream=0x00000001330f1800) at gstadaptivedemux-stream.c:0
 #4: 0x00000001127197f8 libgstadaptivedemux2.dylib`gst_adaptive_demux2_stream_load_a_fragment(stream=0x00000001330f1800) at gstadaptivedemux-stream.c:1969
 #5: 0x000000011271c2a4 libgstadaptivedemux2.dylib`gst_adaptive_demux2_stream_next_download(stream=0x00000001330f1800) at gstadaptivedemux-stream.c:2112
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5435>
2023-10-05 20:55:00 +00:00
James Oliver
aeef97d81b nvh265encoder: fix bounds for auto-select GPU enumeration
Fixes the bounds-check for encoder auto-select GPU enumeration to be
between 0-7 instead of 0-6. This should allow 8-GPU machines to work
with nvautogpuh265enc for the last enumerated GPU.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5438>
2023-10-05 13:37:36 +08:00
James Oliver
54074af8ec nvh264encoder: fix bounds for auto-select GPU enumeration
Fixes the bounds-check for encoder auto-select GPU enumeration to be
between 0-7 instead of 0-6. This should allow 8-GPU machines to work
with nvautogpuh264enc for the last enumerated GPU.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5438>
2023-10-05 13:37:32 +08:00
Stéphane Cerveau
898e153968 dashsink: add dashmp4mux support
As mp4mux is not correctly suppporting the fragment generation,
see
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1722,
we deprecate and advertize the current status of usage.

Added the possibility to use the rust dashmp4mux element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5403>
2023-10-04 23:49:02 +00:00
Stéphane Cerveau
2644b3608f dashsink: Do not reset muxer only for TS
The MP4 needs to be reset to continue to produce segments.

Closes #1015

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5403>
2023-10-04 23:49:02 +00:00
Guillaume Desmottes
8004b1650a videorate: log when rolling back previous caps
We were logging when restoring the current caps but not when it was
changed, making logs quite confusing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5433>
2023-10-04 14:19:37 +00:00
Arun Raghavan
9e137ea6a4 gio: Drop some trailing whitespace in giobasesink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5372>
2023-10-04 12:56:03 +00:00
Arun Raghavan
ca337002f1 giostreamsink: Add a property to close stream on stop()
Back in the mists of time[1], we switched `giostream*` elements to not close the
stream on stop() so that applications that needed a handle to the stream after
the element stopped had it.

Unfortunately, we also have cases[2] where waiting for the element to be
finalized is too late for the stream to be closed.

In order to not change the behaviour of the element, we add a property to allow
users to select the desired behaviour.

[1]: https://bugzilla.gnome.org/show_bug.cgi?id=587896
[2]: gst-plugins-rs#423

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5372>
2023-10-04 12:56:03 +00:00
Thibault Saunier
974e908c61 ges: project: Start making MT safe where needed
Formatters might call "loaded" from the `gessrc` streaming thread
meaning that the `->formatters` field need to be protected.

Several other APIs are called from gesbasedemux, in some radom
thread, so we should ensure that this is all MT. safe, and the API
makes it simple.

Co-authored-by: Philippe Normand <philn@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5431>
2023-10-04 09:29:04 +01:00
Nicolas Dufresne
fc4bb5585f doc: Update plugin cache for added DMA_DRM format
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5386>
2023-10-03 21:13:00 +00:00
Nicolas Dufresne
0eee03d688 videoaggregator: Avoid creating caps that are not in the template
By using the gst_caps_set_simple() to set the format on all structures, the
compositor may create invalid combinations as the caps may contain passthrough
caps. Avoid this issue by intersecting the resul with its original.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5386>
2023-10-03 21:13:00 +00:00
Nicolas Dufresne
dcd911f5dc tests: videoscale: Skip passthrough caps
There scaler can only passthrough with the caps from the ANY caps filter. This
stops testing all the formats twice and avoid failing on DMA_DRM format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5386>
2023-10-03 21:13:00 +00:00
Nicolas Dufresne
aaed9272c1 video-filters: Fix passthrough with ANY caps feature
With the support for DRM modifiers, passthrough caps must now include DMA_DRM
format, otherwise pipeline using thhese filters unconditionally may fail
to negotiate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5386>
2023-10-03 21:13:00 +00:00
Nicolas Dufresne
0fc63b58d0 video: Add support for a list of any video formats
Adds list of formats that should be used by element in needs to passthrough
video. It contains the full list of video format plus DMA_DRM format
and will be extended in the future as needed. This patches includes 3 new
symbols:

  - GST_VIDEO_FORMATS_ANY_STR
  - GST_VIDEO_FORMATS_ANY
  - gst_video_formats_any()

The last one can be used by bindings or for code that prefers having
GstVideoFormat values instead of strings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5386>
2023-10-03 21:13:00 +00:00
Jonas K Danielsson
6c84d7ef0d doc: rist: Update cache for new properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5422>
2023-10-03 20:17:08 +00:00
Jonas K Danielsson
f4fb4a5606 ristsrc: Add support for dynamic payload
This commit ports functionality from the `rtpsrc` to make the `ristsrc`
work with dynamic payload types.

It adds two properties:
  - `caps`
  - `encoding-name`

These can be used to make the `ristsrc` receive other payload types than
the MPEG TS one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5422>
2023-10-03 20:17:07 +00:00
Seungha Yang
cf1286b0e9 d3d11: Add support for HLSL precompile and shader caching
Compile HLSL at build time in case of MSVC, and use it if device
supports shader model 5. Also cache/reuse pixel shader and vertex
shader objects.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5426>
2023-10-03 09:42:03 +00:00
Seungha Yang
6fdcd07e59 d3d11testsrc: Use const buffer in shader
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5426>
2023-10-03 09:42:03 +00:00
Jacob Johnsson
e49a9df621 rtsp-server: Only unblock live streams when complete
When media consists of multiple streams we should only unblock the
complete streams.

Fixes #2443

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4334>
2023-10-02 16:22:33 +00:00
Jacob Johnsson
eb0272e210 rtsp-server: Add new ensure-keyunit-on-start property
While the suspend modes NONE and PAUSED provided a low startup latency
for connecting clients they did not ensure that streams started on
fresh data.

With this property we can maintain the low startup latency of those
suspend modes while also ensuring that a stream starts on a key unit.
Furthermore, by modifying the value of a new property,
ensure-keyunit-on-start-timeout, it is possible to accept a keyunit of
a certain age but discard it if too much time has passed and instead
force a new keyunit.

Fixes #2443

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4334>
2023-10-02 16:22:33 +00:00
Sebastian Dröge
8af9cd9b1a docs: Update plugins caches
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5412>
2023-10-02 09:39:21 +03:00
Sebastian Dröge
510f71fbe4 video-format: Fix up video formats ordering by quality
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5412>
2023-10-02 09:39:21 +03:00
Sebastian Dröge
abdd1967ad flacenc: Correctly handle up to 255 cue entries
The counter was using a signed 8 bit integer, which was overflowing
after 127 entries. That was then passed as an unsigned 32 bit integer to
libflac, which caused it to be converted to a huge unsigned number.
That then caused an invalid memory access inside libflac.

As a bonus, signed integer overflow is undefined behaviour.

Instead, use an unsigned 8 bit integer. Once this overflows the existing
code already catches it and stops adding the cue. While FLAC__metadata_object_cuesheet_insert_track()
takes an unsigned 32 bit integer for the track number, FLAC__StreamMetadata_CueSheet_Track is
limiting it to an unsigned 8 bit integer.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5420>
2023-09-30 15:46:52 +00:00
Jordan Petridis
1fb7cda048 svtav1enc: Avoid svtav1 defining TRUE/FALSE
Make sure we include the svt headers first and then undefine TRUE
and FALSE so we will only ever be using glib's defines for those.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5424>
2023-09-29 14:32:22 +00:00
Seungha Yang
2cd81eb1ac nvdecoder: Handle output surface alignment in decoder helper object
Output resolution might not be an even number. Set output resolution
without round up but consider the alignment inside of decoder

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5409>
2023-09-29 12:36:01 +00:00
Seungha Yang
42560c24df nvdecoder: Add support for D3D11 output
Since DXVA does not support some profiles such as HEVC RExt,
vendor specific decoding API is still required.
When decoder is negotiated with d3d11 caps, decoder will convert
semi-planar frame to planar since semi-planar format (e.g.,
DXGI_FORMAT_NV12) is not supported by CUDA/D3D11 interop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5409>
2023-09-29 12:36:01 +00:00
Seungha Yang
57e0a0bd61 nvdecoder: Handle GstContext in helper object
... and move common code to helper object

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5409>
2023-09-29 12:36:01 +00:00
Seungha Yang
91e0c3aafa cuda: Use d3d11 token data for interop data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5409>
2023-09-29 12:36:01 +00:00
Seungha Yang
c818906236 cuda: Add support for I420_12LE format
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5409>
2023-09-29 12:36:01 +00:00
Dominique Leroux
7affa01e05 osxaudio: add individual elements registration for gst-full compatibility
Found that osxaudiosink could not be added standalone in gst-full build
using
-Dgst-full-elements=osxaudio:osxaudiosink because element registration
was
done at the plugin level. Now src/sink elements and deviceprovider have
their
individual registration.

Copied/adapted from the alsa plugin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5419>
2023-09-28 21:44:48 +00:00
Nicolas Dufresne
63da298b84 glupload: Fix always true compiler warning
There was an if case that was always true. After re-reading the Khronos
spec, this case is actually undefined. It is better to just always ignore
the format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5410>
2023-09-28 20:56:35 +00:00
Philippe Normand
ae7871c019 wpevideosrc: Add a simple example for headless rendering
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5405>
2023-09-28 19:20:12 +00:00
Stéphane Cerveau
80cc1fcc03 mpdhelper: remove useless code
The audio/video codec name from mime type should be retrieved from
gst_codec_utils_caps_get_mime_codec instead

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5404>
2023-09-28 18:31:07 +00:00
David Svensson Fors
82a06a36cc dashsink: Use gst_codec_utils_caps_get_mime_codec()
Use gst_codec_utils_caps_get_mime_codec() in pbutils for codec
strings. That function gives more elaborate RFC 6381 compatible
strings than the helper functions in gstmdphelper.c, such as
"avc1.F4000D".

Remove the helper functions, as they were only used from dashsink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5404>
2023-09-28 18:31:07 +00:00
Aleksandr Slobodeniuk
3901984621 videotestsrc: fix max value for timestamp-offset
Compiled for x64 with msvc the timestamp-offset property
max limit is 2147483646999999999 that is smaller then
the timestamps provided by the rtspsrc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3771>
2023-09-28 17:32:36 +00:00
Alexander Slobodeniuk
5ad1f00605 aggregator: fix start-time-selection=first on negative rate
When the property "start-time-selection" is set to "first", it
calculates the start time of the output from the buffer pts
(converting it to running time of the segment), but if the
rate is negative, the real start is not the pts, but the
pts + duration, because it plays from the end of the buffer
to it's start.
As a result of this bug, in the negative rate, when the
start-time-selection=first, the first frame is dropped
by the videoaggregator (reproduced on d3d11compositor).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5276>
2023-09-28 16:32:37 +00:00
Philippe Normand
9dbe8a1e36 videoconvertscale: Expose converter config as new property
This allows the user to have full control on the conversion parameters. If set,
the property takes precedence over the other similar conversion tweaking properties.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2263>
2023-09-28 15:02:22 +02:00
Philippe Normand
886bd7e4e0 interaudiosink: Ensure adapters don't store buffers with audio meta
The interaudiosrc might take buffers of different sizes from the audio adapter,
so keeping metas consistency would be an issue. So the sink now strips the audio
metas away and the src adds them back (for non-interleaved layouts only) when
taking buffers from the adapter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5324>
2023-09-28 10:26:33 +00:00
Philippe Normand
46dbe2a372 interaudiosrc: Add audio meta to buffers containing non-interleaved samples
Without this a downstream audioconverter wouldn't be able to map the
GstAudioBuffer prior to conversion.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5324>
2023-09-28 10:26:33 +00:00
François Laignel
324d5c6460 tools: gst-inspect: add specific messages for CONSTRUCT_ONLY params
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5407>
2023-09-28 09:13:26 +00:00
Xavier Claessens
0ab48250a9 GstCustomMeta: Use simplified API where possible
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5385>
2023-09-27 18:46:34 +00:00
Xavier Claessens
452ab184cb GstCustomMeta: simplify API
Move the GstStructure field into public struct for direct access, that's
easier than having to call a function to get it. It is not an API/ABI
breakage to extend the public structure of a GstMeta because they are
always allocated by inside GStreamer. The structure is exposed already
by gst_custom_meta_get_structure() which does not return a copy/ref, so
it is locked into holding a GstStructure forever anyway.

Also add gst_meta_register_custom_simple() because most of the time only
a name is required, tags and transform functions are more niche
use-case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5385>
2023-09-27 18:46:34 +00:00
Florian Zwoch
4a9a9ed9fc adaptivedemux2: Call GTasks's return functions for blocking tasks
Gio/Task states the following:

If a GTask has been constructed and its callback set, it is an error to
not call g_task_return_*() on it. GLib will warn at runtime if this
happens (since 2.76).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5395>
2023-09-27 15:56:08 +00:00
Jochen Henneberg
c0f44e90c5 va: Lock wayland display dmabuf formats against concurrent access
If there are multiple Wayland event listeners in different threads we
get the formats and modifiers pushed concurrently which leads to
segfault from GArray methods. This patch protects the array.

The problem occurs e.g. when using vaapipostproc together with Qt
qmlglsink, QtWayland will get the events as well as VAAPI.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5280>
2023-09-27 14:37:06 +00:00
Piotr Brzeziński
85adc2daee vtdec: Handle output in separate thread
Moves outputting frames to a task on the source pad, bringing vtdec in line with vtenc.
This brings possible performance improvements thanks to decoupling queueing new frames from outputting processed ones.
The queue length is limited to `2*DBP` to prevent decoding too far ahead compared to what we're pushing downstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5163>
2023-09-27 13:01:33 +00:00
Jochen Henneberg
d9cd8b375e rtpbasedepayload: Fixes for cleanup of header ext. aggregation
* Free delayed buffer on _finalize()
* Reset header aggregation cache and delayed buffer on state change
  from READY_TO_PAUSE

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5278>
2023-09-27 11:49:11 +00:00
Jochen Henneberg
372709400f rtpbasedepayload: Only aggregate RTP header extensions if in use
Right now we split the RTP header from the current buffer into a new
buffer and aggregate those buffers for later processing if the
depayloader creates an output buffer.

This is cumbersome as it happens even if none of the incoming RTP
buffers carries RTP header extensions at all just because header
aggregation has been enabled in the depayloader class.

This commit will start aggregation only in case that there really are
RTP header extensions available on an incoming RTP buffer. The check
is trivial and cheap. Once activated we keep aggregation active for
all buffers. The active state is reset on state change READY_TO_PAUSE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5278>
2023-09-27 11:49:10 +00:00
Matthew Waters
237d195209 gl/format: fix swizzle indices for RGB10A2/BGR10A2
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3003
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5400>
2023-09-27 19:45:57 +10:00
Albert Sjölund
47dbdea469 souphttpsrc: Chain finalize call to parent
GstSoupSession finalize does not chain parent finalize,
causing it to leak memory, shown under g freeze notify.
In finalize method, ensure all branches call to parent
finalize.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5398>
2023-09-27 09:01:43 +02:00
Seungha Yang
a7353d8859 d3d11decoder: Fix crash on negotiate() when decoder is not configured
The negotiate() can be called by GstVideoDecoder baseclass on GAP event,
and decoder helper object might not be configured at the time
when negotiate() is called.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5394>
2023-09-27 01:15:26 +09:00
Daniel Moberg
0e6cd64232 rtspsrc: Property for adding custom http request headers
This commit adds a property which enables adding custom http request headers to
the rtspsrc element. Added headers will be appended to http requests
made during http tunneling.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5268>
2023-09-26 06:35:43 +00:00
Daniel Moberg
7446839e0d rtspconnection: Add API for adding extra http request headers
This commit adds capability to add custom headers to any http requests
during http tunnel mode. If header exist new header will replace old.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5268>
2023-09-26 06:35:43 +00:00
Stijn Last
4bda59f88d deinterlace: greedy, improve quality
scanlines->m1 = same line of the previous field
scanlines->t0 = line above of the current field
scanlines->b0 = line below of the current field
scanlines->mp = same line of the next field

Deinterlacing a field weaved frame:
When deinterlacing the top field, the next bottom field is available
(part of the same frame). but when deinterlacing the bottom field,
the next top field (part of the next frame) is not available and
scanlines->mp equals NULL.

In this case it's better to use greedy algorithm using the prevous field
(twice) rather then linear interpolation of the current field.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5331>
2023-09-25 06:40:47 +00:00
Hou Qi
be9d9371b7 v4l2videodec: Correctly free caps to avoid memory leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5379>
2023-09-24 12:50:01 +00:00
Seungha Yang
c5bd0faee3 nvdecoder: Add support for HEVC GBR output
... and use P012 format for 12bits instead of P016

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2991
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5375>
2023-09-23 13:12:56 +00:00
Seungha Yang
907c507680 nvh265encoder: Add support for RGB encoding
Adding GBR format support to nv{autogpu,cuda,d3d11}h265enc.
Note that the only difference between GBR and Y444 encoding
is matrix_coeffs value written in VUI.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5375>
2023-09-23 13:12:56 +00:00
Seungha Yang
a80f542f66 cuda: Add support for P012_LE and Y444/GBR high bitdepth formats
Adding P012, Y444_10, Y444_12, GBR_10, GBR_12 and GBR_16 formats support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5375>
2023-09-23 13:12:55 +00:00
Seungha Yang
d731a7c2fc d3d11: Add support for GBR_16LE format
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5375>
2023-09-23 13:12:55 +00:00
Seungha Yang
69d1679914 video: Add GBR 16bits formats
Adding 16bits planar RGB formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5375>
2023-09-23 13:12:55 +00:00
Sebastian Dröge
2a2ef23829 rtpsource: Don't store invalid running times and calculate with it
If we end up with GST_CLOCK_TIME_NONE as running time for an RTP packet
then this can't be used for bitrate estimation, and also not for
constructing the next RTCP SR. Both would end up with completely wrong
values, and an RTCP SR with wrong values can easily break
synchronization in receivers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5329>
2023-09-23 07:39:00 +00:00
Tong Wu
57bfbf51b2 msdkvpp: fix an issue which causes dangling pointer
Put all the external buffer structures into thiz to avoid being freed
early.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5377>
2023-09-22 10:04:30 +08:00
Eric
f7cb79874a rtspconnection: Ignore trailing whitespace in headers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5358>
2023-09-21 22:06:22 +00:00
Chris Wiggins
c3b6479755 avcodecmap: Add MxPEG codec ID
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5361>
2023-09-21 15:03:01 +00:00
Seungha Yang
2b7dc0de1b h265decoder: Set discont state after new_picture()
Subclass might negotiate with downstream inside of the new_picture().
Set discont state after the new_picture() call

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5368>
2023-09-20 18:44:42 +00:00
Ruben Gonzalez
87dcc7f7ad gstutils: Delete extra semicolon
Warning reported by GCC with -Wpedantic: ISO C does not allow extra
‘;’ outside of a function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5359>
2023-09-20 17:18:58 +00:00
Michiel Westerbeek
03bf8e9386 video-scaler, audio-resampler: downgrade 'can't find exact taps' to debug
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5369>
2023-09-20 16:31:47 +00:00
Sebastian Dröge
72742dee30 mxfdemux: Check number of channels for AES3 audio
Only up to 8 channels are allowed and using a higher number would cause
integer overflows when copying the data, and lead to out of bound
writes.

Also check that each buffer is at least 4 bytes long to avoid another
overflow.

Fixes ZDI-CAN-21661, CVE-2023-40475

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5362>
2023-09-20 15:40:07 +00:00
Sebastian Dröge
ce17e968e4 mxfdemux: Fix integer overflow causing out of bounds writes when handling invalid uncompressed video
Check ahead of time when parsing the track information whether
width, height and bpp are valid and usable without overflows.

Fixes ZDI-CAN-21660, CVE-2023-40474

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5362>
2023-09-20 15:40:07 +00:00
Nicolas Dufresne
ff91a3d8d6 h265parser: Fix possible overflow using max_sub_layers_minus1
This fixes a possible overflow that can be triggered by an invalid value of
max_sub_layers_minus1 being set in the bitstream. The bitstream uses 3 bits,
but the allowed range is 0 to 6 only.

Fixes ZDI-CAN-21768, CVE-2023-40476

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5364>
2023-09-20 14:11:55 +00:00
Piotr Brzeziński
9cbe9a52fe vtenc: Fix deadlock after GST_FLOW_ERROR is received on frame push
This was easy to trigger when testing with e.g. vtenc ! vtdec ! glimagesink and closing the sink via window button,
causing GST_FLOW_ERROR to be received by the output loop, stopping it with the queue still full. This made the
enqueue_buffer() callback to lock waiting for space in our queue, while handle_frame() was waiting for the internal
VideoToolbox queue to free up, so that VTCompressionSessionEncodeFrame could finish. As the output loop was not
running, both functions waited forever.

Fixed by 1) immediately emptying our queue when GST_FLOW_ERROR is received (like we already did with _FLUSHING)
and 2) unconditionally setting the flushing flag in finish_encoding() when it sees the output loop stopped because
of GST_FLOW_ERROR, so that enqueue_buffer() will immediately discard any new frames coming out of VideoToolbox.
Both of those make sure we never run into the both-queues-full scenario.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5303>
2023-09-20 13:10:02 +00:00
Seungha Yang
d9a89cce06 d3d12decoder: Add support for D3D11 interop
As a short-term solution before full d3d12 rendering feature,
copy decoded d3d12 texture to shared d3d11 texture in order to use
existing various d3d11 implementations such as conversion, resizing,
and videosink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5356>
2023-09-20 10:34:54 +00:00
Seungha Yang
2aa88033b2 d3d11memory: Allow CreateSharedHandle() without keyed mutex
For d3d11 resource to be shared with d3d12, keyed mutex shouldn't
be enabled since d3d12 resource does not expose the keyed mutex
interface

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5356>
2023-09-20 10:34:54 +00:00
Seungha Yang
bb040ce571 d3d12decoder: Move common part to helper object
Store device at helper object

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5356>
2023-09-20 10:34:54 +00:00
Seungha Yang
44b02e58fc d3d12fence: Check completed value before waiting
If currently completed fence value is larger than target value,
skip waiting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5356>
2023-09-20 10:34:54 +00:00
Maksym Khomenko
5b252a1511 appsrc: use macros for getters/setters
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5321>
2023-09-20 08:54:01 +00:00
Maksym Khomenko
60591960c3 appsink: add max-time and max-buffers properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5321>
2023-09-20 08:54:01 +00:00
Maksym Khomenko
4c13ccec16 appsrc: extract buffering level calculations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5321>
2023-09-20 08:54:01 +00:00
Piotr Brzeziński
f3d98341e3 qml: Fix leftover reference to gstqsgtexture
Made it impossible to build with qmake as per the readme. The file was renamed to gstqsgmaterial a while ago.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5357>
2023-09-19 23:55:45 +00:00
Hugues Fruchet
42c65cc765 waylandsink: Fix cropping for video with non-square aspect ratio
Padding of unaligned content is still visible at right with some aspect-ratio.
Fix this by giving the original content resolution to wp_viewport_set_source()
instead of pixel aspect ratio scaled one.

Fixes !5259

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5346>
2023-09-19 22:56:31 +00:00
Hugues Fruchet
5c307e8d17 gtkwaylandsink: do not use drm dumb pool when importing DMAbuf buffers
There is no need to use DRM dumb pool if buffer to
render is already a DMABuf, just import it and render it.

This fixes a DMAbuf memory leakage when waylandsink downstream
element exports DMABuf while waylandsink is configured to be
DMABuf exporter (drm-device=/drv/dri/card0):

gst-launch-1.0 v4l2src io-mode=4 ! gtkwaylandsink drm-device=/dev/dri/card0

leakage identfied with command:
watch "cat /sys/kernel/debug/dma_buf/bufinfo | grep attached "

Fixes #2729

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5350>
2023-09-19 16:21:58 +00:00
Hugues Fruchet
e4bc88492a waylandsink: do not use drm dumb pool when importing DMAbuf buffers
There is no need to use DRM dumb pool if buffer to
render is already a DMABuf, just import it and render it.

This fixes a DMAbuf memory leakage when waylandsink downstream
element exports DMABuf while waylandsink is configured to be
DMABuf exporter (drm-device=/drv/dri/card0):

gst-launch-1.0 v4l2src io-mode=4 ! waylandsink drm-device=/dev/dri/card0

leakage identfied with command:
watch "cat /sys/kernel/debug/dma_buf/bufinfo | grep attached "

Fixes #2729

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5350>
2023-09-19 16:21:58 +00:00
Seungha Yang
39aca8a096 d3d11vp9dec: Fix critical warning
Don't query GPU vendor using null device.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5353>
2023-09-19 13:09:57 +00:00
Olivier Blin
4b891639da pulsedeviceprovider: fix incorrect usage of GST_ELEMENT_ERROR
The provider is not a GStreamer element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5349>
2023-09-19 14:13:49 +02:00
Seungha Yang
e769ae3dbe d3d12decoder: Add support for d3d12 output
... and enable zero-copy decoding if downstream supports d3d12 memory

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5345>
2023-09-19 08:52:04 +00:00
Seungha Yang
ff7bde06f2 d3d12decoder: Use GstD3D12BufferPool
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5345>
2023-09-19 08:52:04 +00:00
Seungha Yang
884f4122b5 d3d12decoder: Use global copy queue and fence value
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5345>
2023-09-19 08:52:04 +00:00
Seungha Yang
1a7390c85c d3d12: Remove unused debug category
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5345>
2023-09-19 08:52:04 +00:00
Seungha Yang
6c9d023861 d3d12: Add d3d12download element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5345>
2023-09-19 08:52:04 +00:00
Seungha Yang
8965b1e92f d3d12: Add GstD3D12BufferPool
Adding d3d12 specific bufferpool impl.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5345>
2023-09-19 08:52:04 +00:00
Seungha Yang
c0572f8749 d3d12memory: Add GstD3D12AllocationParams struct
Will be used for buffer pool configuration. And update C++ helper
to reduce the number of required arguments

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5345>
2023-09-19 08:52:04 +00:00
Seungha Yang
73744df6e4 d3d12memory: Make d3d12memory CPU accessible
Add support for gst_memory_{map,unmap} without GST_MAP_D3D12 flag

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5345>
2023-09-19 08:52:04 +00:00
Seungha Yang
68cfb64ae3 d3d12: Fix d3d12sdklayer setup and d3d12device debug category
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5345>
2023-09-19 08:52:04 +00:00
Leif Andersen
60b93fd593 docs: Fix markdown link in contribution page
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5348>
2023-09-18 22:44:25 -04:00
Leif Andersen
2fb819a549 docs: Meson has deprecated the implicit setup command
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5342>
2023-09-18 15:32:15 +00:00
Víctor Manuel Jáquez Leal
4c5e17308e vaallocator: don't update size in info for single plane images
Don't update info's size with the VA image reported data size for single plane
images, since drivers might allocate bigger space than the strictly required to
store the image, but when we dump the buffer as is (using filesink, for example)
the produced stream is corrupted. For multi-plane images video meta is required
to read/write them.

We updated info's size because gstreamer-vaapi did it too, but the reason to
update it there was for uploading and rendering surfaces (commit c698a015).

Furthermore, this patch adds an error message if the allocated data size for the
image by the driver is lesser than the expected because it would be a buggy
driver.

Fixes: #2959
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5308>
2023-09-18 14:55:10 +00:00
Víctor Manuel Jáquez Leal
b5de07a8c5 msdk: meson: don't warn deprecated symbols
Since it's impossible to not to use any because any possible version mismatch
between the header and the runtime, such in the case of the denoise structure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5283>
2023-09-18 09:30:33 +00:00
Víctor Manuel Jáquez Leal
b3b2f3016c msdkdec: fix method declaration signature
Thus silencing a compilation warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5283>
2023-09-18 09:30:33 +00:00
Michiel Westerbeek
0705de9f12 ges: decreased log level for missing ->init method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5339>
2023-09-17 19:19:19 +00:00
Seungha Yang
d849e238fe d3d12: Add AV1 decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4161>
2023-09-17 18:53:39 +09:00
Seungha Yang
10bda3a12a d3d12: Add VP9 decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4161>
2023-09-17 18:53:39 +09:00
Seungha Yang
fb27733dd8 d3d12: Add H.265 decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4161>
2023-09-17 18:53:39 +09:00
Seungha Yang
734dd50879 d3d12: Add H.264 decoder
Adding Direct3D12 h264 decoder

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4161>
2023-09-17 18:53:24 +09:00
Seungha Yang
2c058b3b99 d3d11decoder: Port to GstDxva
Use new DXVA baseclass

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4161>
2023-09-17 18:30:07 +09:00
Seungha Yang
729c11cb0c dxva: Add DXVA decoder baseclass implementation
Extract Direct3D version independent common DXVA logic from d3d11
decoder so that it can be used by the other APIs (D3D9 and D3D12)
as well

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4161>
2023-09-17 18:30:03 +09:00
Seungha Yang
48a0c01570 h264decoder: Update latency dynamically
The actual number of reorder frames is unknown
unless frame reordering is disabled
(e.g., POC type 2 or constrained-* profiles).
Also derived maximum DPB size or max_num_reorder_frames in VUI
is not the upper bound of output delay.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2702
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5326>
2023-09-17 01:43:29 +09:00
Seungha Yang
bd25c2738e nvdecoder: Copy output frame if needed
Even if decoder is negotiated with CUDA memory feature, if downstream
proposed no buffer pool, assume that the pool size is unknown.
And disable zero-copy if there's no more free output surface.
Or, in case of reverse playback, always copy frames.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5338>
2023-09-17 00:15:47 +09:00
Seungha Yang
c5a5dcdf18 nvh265dec: Reconfigure decoder on max-dpb-size change
Decoder should create new picture pool for larger DPB size

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5338>
2023-09-16 23:00:11 +09:00
Seungha Yang
85f01d7709 d3d11h265dec: Reconfigure decoder on max-dpb-size change
Decoder should create new picture pool for larger DPB size

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5338>
2023-09-16 22:56:03 +09:00
Seungha Yang
6785c7d378 av1parser: Fix segmentation params update
Even if the segmentation feature value is not updated,
the parsed "segmentation_update_map" and "segmentation_temporal_update"
values should not be cleared as it's referenced during lower
level bitstream parsing. Also, don't use assert() in parser
unless it's clearly impossible condition.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5334>
2023-09-16 07:50:41 +09:00
Seungha Yang
3ac2690807 h265decoder: Fix DPB overflow
If DPB is full already, GstH265Decoder::new_picture() might fail if
subclass uses fixed size picture pool and its size is equal to the DPB
size. Call the new_picture() after DPB is cleared in gst_h265_decoder_dpb_init()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5333>
2023-09-15 18:26:31 +00:00
Matthew Waters
86f00367fc androidmedia/enc: handle codec-data before popping GstVideoCodecFrames
Issue is that when amc was producing a codec-data buffer, a
GstVideoCodecFrame was being popped off the internal queue.  This meant
that the codec-data was being associated with the first input frame and
the second (first encoded buffer) output buffer with the second input
frame.  At the end (assuming one input produces one output which seems
to hold in my testing and how the encoder is currently implemented)
there would be an input frame missing and would be pushed without any
timing information.  This would lead to e.g. muxers rejecting the buffer
without PTS and failing to mux.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5330>
2023-09-15 17:47:17 +03:00
Matthew Waters
bec57df2f8 androidmedia/enc: add fixme log about partial frames
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5330>
2023-09-15 13:46:47 +00:00
Mengkejiergeli Ba
b3e7404312 msdkvpp: Add compute scaling mode
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5128>
2023-09-14 13:50:48 +08:00
Nicolas Dufresne
b20f66ceac x264: Check that minimum version is met
Since the addition of monochrome encoding support, we now depends on build 156.
No version check was happening so far.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5325>
2023-09-13 10:12:44 -04:00
Mengkejiergeli Ba
887b4095ca msdkvpp: Enable HDR-to-SDR tone mapping
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5277>
2023-09-13 14:58:59 +08:00
Mengkejiergeli Ba
0ee7ebd17d msdkvpp: Set color properties for input and output
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5277>
2023-09-13 14:58:59 +08:00
Matthew Waters
c6b867e470 vulkancolorconvert: actually support passthrough correctly
e.g. passthrough of YUV (or RGB) formats should not modify any buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5317>
2023-09-13 01:12:18 +00:00
Sebastian Dröge
fcd591c1af rtpjitterbuffer: Avoid integer overflow in max saveable packets calculation with negative offset
The timestamp offset can be negative, and it can be a bigger negative
number than the latency introduced by the rtpjitterbuffer so the overall
timeout offset can be negative.

Using the negative offset for calculating how many packets can still
arrive in time when encountering a lost packet in an equidistant stream
would then overflow and instead of considering fewer packets lost a lot
more packets are considered lost.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5296>
2023-09-12 08:38:53 +00:00
Mengkejiergeli Ba
8ab6559362 msdkh265enc: Use vpl APIs to handle HDR SEIs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5135>
2023-09-12 07:36:39 +00:00
He Junyan
0ace130107 glcolorconvert: Calculate correct swizzles for Y410, Y412 formats
The GST_VIDEO_FORMAT_Y410, GST_VIDEO_FORMAT_Y412_LE and GST_VIDEO_FORMAT_Y412_BE
formats in fact are packed formats, which have just 1 plane. But we have special
setting for them rather than using get_single_planar_format_gl_swizzle_order().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5314>
2023-09-11 22:01:20 +00:00
Tim-Philipp Müller
30f955f73a ges: tools: fix msvc compiler warning about G_LOG_DOMAIN redefinition
cl: Command line warning D9025: overriding '/DG_LOG_DOMAIN="GES"'
with '/UG_LOG_DOMAIN'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5312>
2023-09-11 20:53:19 +00:00
Tim-Philipp Müller
600b626472 ges: tools: fix duplicate ges_tools definition in meson.build
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5312>
2023-09-11 20:53:19 +00:00
Tim-Philipp Müller
4a857fbf87 ges: launcher: fix compiler warning with MSVC 2022
tools/ges-launcher.c(315): warning C4133: 'function':
incompatible types - from 'GESTrackType *' to 'guint *'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5312>
2023-09-11 20:53:19 +00:00
Nicolas Dufresne
1eaa671feb glupload: Only allow non-linear formats with direct dmabuf uploaders
As we don't have any mapping from YUV formats + modifiers to an equivalent
emulated format (e.g. NV12 + modifier -> R8+modifier/RG88+modifier), do no
allow these formats to be used with the indirect DMABuf uploader.

Fixes #2942

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5270>
2023-09-11 19:55:19 +00:00
Nicolas Dufresne
c1e03081c0 v4l2: object: Handle video helper return value
gst_video_info_set_interlaced_format() can return an error if the
width/height causes integer overflow. Handle this case, so that we can
fail cleanly. This has been experienced while testing an in-progress
driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5286>
2023-09-11 15:05:34 -04:00
Nicolas Dufresne
353cb2da92 v4l2: bufferpool: Avoid warnings on empty last buffer
Some drivers will push an buffer flagged LAST but empty. In decoder
case, this results in an "producing too many buffer" warning, even
though the result is entirely correct. Detect this case in order to
signal EOS earlier and avoid this warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5286>
2023-09-11 18:08:21 +00:00
Nicolas Dufresne
65350b601e v4l2: bufferpool: Do not resize compressed buffer
Avoid resizing compressed buffer to their maximum size. This fixes a
regression that caused valid but very large streams to be generated.

Fixes #2953

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5286>
2023-09-11 18:08:21 +00:00
Thomas Schneider
2f3fea33ca androidmedia: fix hevc codec profile registration
Fix the codec registration logic such that all supported
profiles are available instead of just the first in the
list.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5282>
2023-09-11 12:00:05 +00:00
Sebastian Dröge
889a3fe932 rtmp2: Set default flash version to NULL
This is consistent with the librtmp-based old rtmp plugin and ffmpeg.
While some servers require a valid flash-version, others are failing
with a too long or any flash-version at all.

By changing to the same default as in the old plugin and in ffmpeg,
GStreamer will at least behave the same and will work and fail with the
same servers without setting a flash-version.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5293>
2023-09-11 08:23:33 +00:00
Philippe Normand
ce7b2af414 glsinkbin: Check sink property exists before attempting to read it
The same is done in the set_property function. This was noticed when attempting
to dump a pipeline containing glsinkbin sink=gtk4paintablesink to dot format.
Critical warnings were raised due to the missing force-aspect-ratio property on
that sink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5311>
2023-09-11 07:36:21 +00:00
Eva Pace
003e419ff5 examples: webrtc: rust: i64 -> u64 for session and handle ids
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5307>
2023-09-11 06:21:32 +00:00
Nicolas Dufresne
c7e6463e9e doc: Update cache after template pixel formats changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5304>
2023-09-10 19:13:28 -04:00
Nicolas Dufresne
16ae1286d1 wayland: Use generated formats list
Update the order according to what the generator produces.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5304>
2023-09-10 19:06:07 -04:00
Nicolas Dufresne
5af78522b7 video: Use generated format order
Update the order according to what the generator produces.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5304>
2023-09-10 19:06:07 -04:00
Nicolas Dufresne
d1043226d7 video: Fix unknown big endian format list
That list contained multiple formats that did not exists.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5304>
2023-09-10 19:06:07 -04:00
Víctor Manuel Jáquez Leal
b7ded81f7b vkbufferimagepool: short circuit usage for decoding
NVIDIA & RADV drivers don't report decoding features for color format. Setting
requested usage to zero to short circuit validation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5288>
2023-09-08 18:11:55 +02:00
Matthew Waters
9d79852890 vkformat: assume that unknown rgb transfer is sRGB
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5288>
2023-09-08 16:09:33 +00:00
Matthew Waters
b82a402bf1 vkformat: also check configured usage flags
This does also mean that if the primary format fails this check, we need
to try the secondary format before returning an error

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2957
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5288>
2023-09-08 16:09:33 +00:00
Matthew Waters
4d3b03e8e8 vkformat: invert srgb and multiplane && planes > 1 checks
The primary format for RGB includes sRGB transfer but was not actually
being used.

The !(no_multiplane && planes > 1) check for YUV resulted in those
formats never being used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5288>
2023-09-08 16:09:33 +00:00
Matthew Waters
8a9d630e3b vkformat: FORMAT_FEATURE_COLOR_ATTACHMENT also includes INPUT_ATTACHMENT
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5288>
2023-09-08 16:09:33 +00:00
Matthew Waters
6c534655d4 vkformat: reorder RGBA formats before RGBx formats
Fixes gst_vulkan_format_to_video_format to use the RGBA formats instead
of RGBx formats.

Fixes vulkansink exposing a RGBx/BGRx format instead of the more
relevant RGBA/BGRA formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5288>
2023-09-08 16:09:33 +00:00
Aleksandr Slobodeniuk
a98330636a h264/h265parser: clarify some gtk-doc annotations
Needed for the documentation since the transfer
is not obvious.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5287>
2023-09-08 13:41:01 +00:00
Seungha Yang
efe35a3f6c h264parse, h265parse: Fix potential integer overflow
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2961
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5295>
2023-09-08 12:45:12 +00:00
Seungha Yang
f9169c5431 nvdecoder: Move common logic to decoder helper object
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Seungha Yang
6cf6c73712 d3d11decoder: Move common logic to decoder helper object
We can remove duplicated code by using the GstCodecPicture struct

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Seungha Yang
97fc02cfe3 av1decoder: Port to GstCodecPicture struct
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Seungha Yang
a73c6d7fb6 vp9decoder: Port to GstCodecPicture struct
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Seungha Yang
4571fac946 vp8decoder: Port to GstCodecPicture struct
... and remove unused "pts" variable from GstVp8Picture struct

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Seungha Yang
a5ddf7af3b mpeg2decoder: Port to GstCodecPicture struct
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Seungha Yang
6e7cab43be h265decoder: Port to GstCodecPicture struct
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Seungha Yang
ea3dfadbed h264decoder: Port to GstCodecPicture struct
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Seungha Yang
d69bacb954 codecs: Define common codec picture struct
Adding parent class of codec picture struct

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Matthew Waters
fac5a83fd9 gl: add support for I420 10/12 bit formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5292>
2023-09-07 17:03:19 +00:00
Robert Mader
649eeeaa27 wlvideoformat: Add P010
It is similar to NV12 but has 10bits per channel instead of 8.
As it is supported by many modern GPUs, VA-API and an increasing
number of Wayland compositors, let's support it as well.

Also bump the required libdrm version accordingly and add a temporary
define for the WL_SHM format.

Tested with Weston, Mutter and Sway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5275>
2023-09-07 13:50:48 +00:00
Robert Mader
fd82342bbd waylandsink: Move format caps list to shared library
So it can be shared and more easily updated. While on it, order the
formats according to the documentation for GstVideo.VIDEO_FORMATS_ALL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5275>
2023-09-07 13:50:48 +00:00
Matthew Waters
9e6891076c qml6glmixer: add support for non-RGBA inputs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5290>
2023-09-07 02:12:29 +00:00
Matthew Waters
ba00a7efda qml6glovleray: add support for non-RGBA inputs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5290>
2023-09-07 02:12:29 +00:00
Matthew Waters
95db85e664 gl/mixer: use the pad's video info instead of creating our own
The pad's video info will match the actual video format in use.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5290>
2023-09-07 02:12:29 +00:00
Matthew Waters
6efccf0ee1 qml6/sink: add support for non-RGBA input
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5290>
2023-09-07 02:12:29 +00:00
Nicolas Dufresne
7e3f8e7907 basesrc: Delay unlocking so we can hold the STREAM_LOCK
unlock_stop() is expected to be run while the streaming thread is idle. To
guaranty this is the case, we should take the streamlock, but its not
possible to take this lock during state transitions from PAUSED to
PLAYING as the wait function that we want to terminate is holding it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4961>
2023-09-06 17:34:45 +00:00
Nicolas Dufresne
47d79eedc9 basesrc: Retry create() if we are back from pause
After a create() call, which may have returned FLUSHING or a filled buffer,
if it possible that we detect that we are now in pause. As live sourced
don't produce data in pause, drop the buffer is any and later retry creating
a buffer. This will ensure that we resume from pause while avoiding displaying
ancient frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4961>
2023-09-06 17:34:45 +00:00
soak
e506f9c23e basesrc: Restore pause/resume in derived classes
When the pipeline goes from Playing to Paused, this change will invoke
unlock in the derived class. When the pipeline goes from Paused to
Playing, this change will invoke unlock_stop in the derived class.

This feature was removed in commit 523de1a9 and is now being restored.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4961>
2023-09-06 17:34:45 +00:00
Thibault Saunier
6dd0019090 ges: Fix setting keyframes from ges-launch
There is no registered GValue conversion function from string to double (on purpose) so
we need to handle that case appropriately.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5294>
2023-09-06 11:07:35 -03:00
Akihiro Sagawa
3c7ba382db codecparsers: Fix MPEG-1 aspect ratio table
The values defined in ISO/IEC 11172-2 are different from those used so far.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5272>
2023-09-06 12:24:37 +00:00
Philippe Normand
bb5d5e0066 glcontext_egl: Remove spurious mutex unlock
The context is not locked in any call site of the "failed" goto.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5291>
2023-09-06 12:03:42 +01:00
He Junyan
6b23f2c4be va: baseenc: use in_info rather than input_state->info
The in_info is correct video info which already considers the
DMA kind caps case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5289>
2023-09-06 15:40:03 +08:00
Arun Raghavan
d1e7b3fce1 meson: Update webrtc-audio-processing wrap to 1.3
Small fix to the generated pkgconfig file.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5284>
2023-09-05 11:27:17 -04:00
Alicia Boya García
135f859629 validate: Fix error on GstTest.copy()
Fixes regression introduced in ba61160d6c,
where running check tests with gst-validate-launcher -f would trigger
this exception:

    AttributeError: 'GstCheckTest' object has no attribute 'reports'.
    Did you mean: 'reporter'?

The member `reports` is meant to be just part of GstValidateTest, but
not other subclasses, even though a usage is still found in the base
class GstTest in the method test_end().

This patch introduces an override of the methods copy() and test_end()
in GstValidateTest so that `reports` is copied and cleared respectively,
but only for validate tests.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5281>
2023-09-05 14:16:57 +00:00
Alicia Boya García
f033160ea2 gst-validate: Use fatal-criticals by default
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2903

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5182>
2023-09-05 13:25:40 +00:00
Seungha Yang
8252ca0ef2 queue, queue2: Flush internal queue on flow error
This is to fix an infinitely blocked upstream streaming thread if
* upstream has fixed-size buffer pool, some H/W decoders for example
* downstream returned flow error without releasing buffer

When the fixed-size buffer pool hits its configured max-buffers and
also downstream of queue returned flow error without releasing corresponding
buffer, upstream has no chance to run the next processing loop
because it will be blocked by acquire_buffer(), and therefore
downstream flow will not be propagated to upstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5023>
2023-09-04 17:47:02 +00:00
Arun Raghavan
87c3dffc51 meson: Update webrtc-audio-processing wrap to 1.2
More explicitly specifies the implied abseil-cpp dep.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5271>
2023-09-01 17:30:36 -04:00
He Junyan
732a32a243 va: Add modifier paramters check for va_create_surfaces()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5267>
2023-09-01 17:26:51 +08:00
Seungha Yang
2c4cb82afc h264parse, h265parse: Fix timecode parsing
The scaling factor for nFrame part should be "(1 + nuit_field_based_flag) / 2"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5254>
2023-09-01 06:44:52 +00:00
Víctor Manuel Jáquez Leal
22c8d1890e va: retry if surface creation fails
Old versions of mesa doesn't support VASurfaceAttribDRMFormatModifiers. To
solve it, by just ignoring the modifiers assuming that linear is accepted and
produced, the creation of frames will be tried again without that attribute.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5256>
2023-08-31 20:18:26 +00:00
Víctor Manuel Jáquez Leal
52971faf14 va: refactor caps convertion to va caps
To avoid code duplication in code related with buffer importation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5257>
2023-08-31 12:41:48 +00:00
Víctor Manuel Jáquez Leal
89b0a6fa23 va: refactor buffer import
This patch removes the code duplication of input buffer importation, in all the
va elements that import video frames. It defines a synthetic object whose
members are required to create a new input buffer and do the importation of the
upstream buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5257>
2023-08-31 12:41:48 +00:00
Nirbheek Chauhan
4b586a809e macos-bison: Update to 3.8.2 and add an ARM64 build
Also includes a shell script to build bison and match pycodestyle.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5261>
2023-08-31 07:50:43 +00:00
Sebastian Dröge
a0522c8193 ptp: Fix compilation with rustc 1.48
That's currently the minimum version we declare in meson.build but the
latest changes introduced some usage of 1.62 features.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5265>
2023-08-31 06:05:18 +00:00
Matthew Waters
9d867356df gl/bufferpool: add configuration to extend buffer lifetime before reuse
Fixes a potential GPU stall if an immediately freed texture/buffer is
attempted to be reused immediately by the CPU, e.g. when uploading.

Problematic scenario is this:
1. element does GPU processing reading from texture
2. frees the buffer back to the pool
3. pool acquire returns the just released buffer
4. GPU processing then has to wait for the previous GPU operation to
   complete causing a stall

If there was a reliable way to know whether a buffer had been finished
with across all GPU drivers, we would use it.  However as that does not
exist, this workaround is to keep the released buffer unusable until the
next released buffer.

This is the same approach as is used in the qml (Qt5) elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5144>
2023-08-31 01:24:38 +00:00
Nicolas Dufresne
cd9ac137d2 x264enc: Add monochrome 8bit support
This is mapped to GStreamer GRAY8 format. This allow producing files with
the chroma_format_idc 0 (monochrome). This is only availbable to high profile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4812>
2023-08-30 16:54:01 -04:00
Nicolas Dufresne
0b648f9a2d waylandsink: Crop surfaces to their display width height
Setting the surface source rectangle has been omitted so far. As a side effect
surface created with padded width/height are being scaled down. Fix this using
the viewporter source rectangle configuration. This can later be enhanced
to support crop meta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5259>
2023-08-30 18:58:45 +00:00
Seungha Yang
ce922a413c qt6d3d11: Add plugin docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5258>
2023-08-30 15:45:12 +00:00
Seungha Yang
51218c3c9c bad: Update Windows plugin docs
Updating wasapi, wasapi2, mediafoundation, and winks plugin docs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5258>
2023-08-30 15:45:12 +00:00
Seungha Yang
cc713f9075 qsv: Update plugin docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5258>
2023-08-30 15:45:12 +00:00
Seungha Yang
9a5f5304f8 dwrite: Add plugin docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5258>
2023-08-30 15:45:12 +00:00
Seungha Yang
560faa38c5 d3d11: Update plugin docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5258>
2023-08-30 15:45:12 +00:00
Sebastian Dröge
967aa2abca ptp: Listen with different sockets on individual interfaces
This allows us to portably know on which interface a multicast packet
arrived, and to send back any packets for that clock on the correct
interface.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5232>
2023-08-30 12:19:46 +00:00
He Junyan
e81a40cb72 va: baseenc: Add the DMA buffer input support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5189>
2023-08-29 15:31:09 +00:00
He Junyan
5e6c91579f va: encoder: Add in_info field to base encoder
When we consider the DMA kind caps as input, the input_state->info
only contains the video format of GST_VIDEO_FORMAT_DMA_DRM, which
is not enough for va plugins. The new info in base encoder contains
the correct video info after the DMA caps parsing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5189>
2023-08-29 15:31:09 +00:00
Seungha Yang
1e381dc1cc d3d11convert: Passthrough allocation query on same caps
Since d3d11convert and its variant elements does not enable basetransform's
passthrough, passthrough allocation query needs to be handled
manually in order to respect downstream element's min/max buffer
requirement.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5255>
2023-08-29 19:46:00 +09:00
Stephan Seitz
9d3b57f362 sdp: fix wrong error message for missing clock-rate in caps
When using `gst_sdp_media_set_media_from_caps` on `application/x-rtp` caps
without `clock-rate` it wrongly reports missing payload type even if `payload`
is present in the caps.

This seems to be a copy&paste error from the error message for missing payload
type.

When using payload=10, both `clock-rate` and some other media properties are
defined by the RTP standard so I was wondering whether I could omit `clock-rate`
and was confused about the error message.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5250>
2023-08-26 18:01:38 +00:00
Olivier Crête
e2d7fbe94f gst-stats: Add argument for a custom regexp
This is to use gst-stats against GStreamer logs that went through
some other logging system.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3935>
2023-08-25 21:43:36 +00:00
Seungha Yang
ff435c80a2 d3d11videosink: Use premultiplied-alpha swapchain
Don't ignore alpha component if it's present

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5242>
2023-08-25 16:54:29 +00:00
Seungha Yang
de07c44183 codec2json: Fix plugin loading on Windows
* Library versioning should not be used for plugins since it will add
  -{version}.dll suffix (and versioned libraries on Linux with symlink).
  Then the library file name and plugin init function name mismatch
  will result in blacklisted plugin.

* Don't define BUILDING_GST_CODECS, makes no sense

* Don't define G_LOG_DOMAIN, which should be used only for libraries,
  not plugins

* Depends on gstcodecparsers libary, not gstcodecs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5249>
2023-08-25 16:08:39 +00:00
Sebastian Dröge
d50c842d87 video: Fix ordering of video formats in GST_VIDEO_FORMATS_ALL_STR
This now follows the algorithm again that is described in the
documentation and implemented in gstreamer-rs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5243>
2023-08-25 15:27:02 +00:00
Nirbheek Chauhan
46a4b07fe5 docs: Update docs for installing on windows
This page has been only sporadically updated for a decade, and it is
unlikely to be updated properly anytime soon. Update the top half, and
add a note about the tutorial section being out of date.

The trigger for this was a question on the mailing list about Windows
11 support, since it's not listed in the supported platforms list.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5239>
2023-08-25 15:16:07 +00:00
Seungha Yang
6fa405c1e2 cudaipcclient: Protect IPC handle import/close with global lock
Protect import/close with signle lock to avoid importing a IPC handle
while it's being closed by another cudaipcsrc from other thread.
Also fixing cuda context leak

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5230>
2023-08-25 10:06:58 +00:00
Jan Alexander Steffens (heftig)
14c097e87d rtmp2: Allow NULL flash version, omitting the field
rtmpsink omits it by default. Allow us to do the same.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5241>
2023-08-25 09:50:39 +02:00
Víctor Manuel Jáquez Leal
c1f99f4005 va: Fix in error logs functions mismatches
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5236>
2023-08-24 17:54:32 +00:00
Víctor Manuel Jáquez Leal
bcee96020f vabasedec: Remove assertion for resolution change in input state
This is reported from https://bugs.webkit.org/show_bug.cgi?id=259032

Though I couldn't reproduce the issue, it looks to me unneeded to assert for
resolution changes in old frames, since renegotiation is carried out.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5237>
2023-08-24 16:21:14 +00:00
Seungha Yang
315cfaf2d8 nvencoder: Fix negotiation error when interlace-mode is unspecified
Use GST_PAD_SET_ACCEPT_INTERSECT() to accept caps without interlace-mode
field

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5229>
2023-08-24 14:58:25 +00:00
He Junyan
c927159f21 va: compositor: Use va_get_surface_usage_hint() to get the usage hint
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5210>
2023-08-24 11:03:59 +00:00
He Junyan
1b43baf3c8 va: baseenc: Use va_get_surface_usage_hint() to get the usage hint
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5210>
2023-08-24 11:03:59 +00:00
He Junyan
696d81f6f8 va: Use va_get_surface_usage_hint() to detect the modifiers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5210>
2023-08-24 11:03:59 +00:00
He Junyan
8399bc2521 va: basedec: Use va_get_surface_usage_hint() to get the usage hint
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5210>
2023-08-24 11:03:59 +00:00
He Junyan
bb350138af va: basetransform: Use va_get_surface_usage_hint() to get the usage hint
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5210>
2023-08-24 11:03:59 +00:00
He Junyan
0e500ee084 va: Add helper function va_get_surface_usage_hint()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5210>
2023-08-24 11:03:59 +00:00