Commit graph

2613 commits

Author SHA1 Message Date
Seungha Yang 1813b4e3d9 d3d11: Move transform matrix related method to utils
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5572>
2023-10-28 22:12:17 +09:00
Seungha Yang 3a2a31d18b d3d11overlaycompositor: Set rasterizer state
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5572>
2023-10-28 22:12:17 +09:00
Seungha Yang 4dfdb6ec68 d3d11screencapturesrc: Set rasterizer state
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5572>
2023-10-28 22:12:17 +09:00
Seungha Yang 5389cc2cc3 d3d11compositor: Set rasterizer state
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5572>
2023-10-28 22:12:17 +09:00
Seungha Yang 1a82c9b9ab d3d11testsrc: Set rasterizer state
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5572>
2023-10-28 22:12:17 +09:00
Seungha Yang 5f44390b3e d3d11converter: Reuse rasterizer state object
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5572>
2023-10-28 22:12:17 +09:00
Seungha Yang e13612162b d3d11screencapturesrc: Use DirectXMath struct and C++ mutex
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5572>
2023-10-28 22:11:53 +09:00
Seungha Yang 63bb0b8de7 d3d11videosink: Add support for transform and MSAA
Adding properties for 3D rotation with arbitrary angle
and scaling. And adding Multi Sampling Anti-Aliasing rendering
support to smooth borders if arbitrary angle is applied

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5532>
2023-10-28 09:58:16 +00:00
Seungha Yang 0b45548f18 d3d11videosink: Fix typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5532>
2023-10-28 09:58:16 +00:00
Seungha Yang b7c49f8e9f d3d11converter: Add support for MSAA render target
Create multi-sample render target view if sample count > 1
and MSAA enabled rasterizer for multi-sample render target

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5532>
2023-10-28 09:58:16 +00:00
Seungha Yang eac65d248a d3d11converter: Add support for custom transform matrix
Adding gst_d3d11_converter_set_transform_matrix() method so that
user specified transform matrix can be applied when "video-direction=custom"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5532>
2023-10-28 09:58:16 +00:00
Seungha Yang 769c6a62a4 d3d11converter: Use transform matrix for rotation/flip
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5532>
2023-10-28 09:58:16 +00:00
Seungha Yang 745a73eece wasapi2: Don't use global volume control object
ISimpleAudioVolume controls volume of corresponding audio session
and there would be only single input/output audio session
in case of share-mode, which means that it controls audio volume of the
process. Instead, use IAudioStreamVolume interface which controls
volume of the stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5549>
2023-10-27 18:11:51 +00:00
Seungha Yang bdc0f177f0 d3d11screencapturesrc: Fix mouse cursor blending
Ignore alpha component of source (mouse cursor texture)
when blending alpha channel, otherwise the background area of source
(which has zeros) will be written to render target. Then it will result
in black rectangle if output texture is converted to premultiplied alpha
texture

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5566>
2023-10-27 16:33:04 +00:00
Sebastian Dröge e6ff644bac aja: Move clang-format configuration from the top-level to the plugin subdirectory
This shouldn't have been left at the top-level but was forgotten to be
moved when merging the repository histories.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5558>
2023-10-27 11:44:36 +00:00
Tim-Philipp Müller 67d7df247b fpsdisplaysink: fix copy'n'paste-o in license header
It's LGPL licensed, remove confusing GPL reference.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5557>
2023-10-27 10:54:44 +00:00
Matthew Waters d20d94cc48 vkformat: also use the correct srgb vs unorm when using older
gst_video_info_from_video_info()

Fixes sRGB colorspace chosen by GstVulkanSwapper and therefore used for
display.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5316>
2023-10-27 09:13:18 +00:00
Tim-Philipp Müller 3438b7a880 kate: remove plugin
Bitrotten and not really used in the wild.

The actual render library (libtiger) is not just unmaintained
but the upstream location has disappeared, and it's also not
even packaged by e.g. debian/ubuntu.

Closes #3071

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5408>
2023-10-27 07:34:39 +00:00
Philippe Normand 7fd7917c78 wpesrcbin: Fix audio metadata
The meta expects the number of samples in the buffer, not the total size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5531>
2023-10-27 04:55:20 +00:00
Víctor Manuel Jáquez Leal ce91004c3b build: opencv: disable opencv deps if it's not installed
When hotdoc documentation is enabled and opencv plugin is set as
auto-detected, but the library isn't installed, meson configuration fails
with this message:

  ../subprojects/gst-plugins-bad/docs/meson.build:139:21: ERROR: Unknown variable "gstopencv_dep".

This patch fixes this case defined gstopencv_dep as disabler() when
dependencies aren't found.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5560>
2023-10-26 20:43:14 +00:00
Mengkejiergeli Ba 38e8896887 vaallocator: Do not try derive image for d3d backend
Current codes try derive image in _update_image_info first, if
derive returns no error, the va_allocator->info is the one from derived
image, but in va_map_unlocked, we disable derive manner for d3d backend
because it doesn't seem to work, this will cause issue for d3d path,
i.e. possibly using derived info in va_get_image to do mapping...
This patch disables derive image for d3d backend in _update_image_info,
to ensure we only use info from va_create_image for d3d path.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5495>
2023-10-26 16:08:10 +00:00
Víctor Manuel Jáquez Leal 250aa8daea vulkandownload: use GstVulkanOperation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5079>
2023-10-26 07:26:23 +00:00
Víctor Manuel Jáquez Leal 11c8c002a5 vulkanupload: use GstVulkanOperation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5079>
2023-10-26 07:26:23 +00:00
Víctor Manuel Jáquez Leal a2f875251f vkimagebufferpool: use GstVulkanOperation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5079>
2023-10-26 07:26:23 +00:00
Víctor Manuel Jáquez Leal 265f1274dc vkoperation: synchronization helper object
An operation is an arbitrary amount of work to be executed on the host, a
device, or an external entity such as a presentation engine.

The purpose of this object is to help on the operation's synchronization
through declaring explicit execution dependencies, and memory dependencies
between two sets of operations defined by the command’s two synchronization
scopes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5079>
2023-10-26 07:26:22 +00:00
Víctor Manuel Jáquez Leal c83c508c5e vulkan: add a timeline semaphore per image
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5079>
2023-10-26 07:26:22 +00:00
Víctor Manuel Jáquez Leal 964aec54b4 vkbarrier: Use guint64 for VkFlags and VkFlags2
While VkPipelineStageFlags is an enum (arguably backed as uint32 in 32bit
platforms), VkPipelineStageFlags2 is a redefinition of guint64; likewise for
VkAccessFlags and VkAccessFlags2.

This patch types both members in GstVulkanBarrierMemoryInfo as guint64 for
compatibility, so it could be used with or without synchronization2 vulkan
extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5079>
2023-10-26 07:26:22 +00:00
Víctor Manuel Jáquez Leal 8809ce5648 vkmemory: unref queue in barriers
Queue might be assigned for queue transfers, so we need to unref it if the
memory has been assigned to a specific queue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5079>
2023-10-26 07:26:22 +00:00
Víctor Manuel Jáquez Leal 5acd6c23b8 vkdevice: use macro VK_KHR_synchronization2 as guard
Instead of (defined(VK_VERSION_1_3) || (defined(VK_VERSION_1_2) && VK_HEADER_VERSION >= 170))

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5079>
2023-10-26 07:26:22 +00:00
Sebastian Dröge 1b117e666b aja: Add basic documentation
Also remove the `gst-inspect-1.0` output from the README.md. This is
listed in the actual documentation and more up to date there.
2023-10-26 09:36:10 +03:00
Sebastian Dröge 59f4146bdc aja: Integrate AJA plugin into the build system
Co-Authored-By: Nirbheek Chauhan <nirbheek@centricular.com>
2023-10-26 09:36:09 +03:00
Sebastian Dröge d2d947380e Merge AJA audio/video source/sink plugin
Original location is https://github.com/centricular/gst-aja
2023-10-26 09:35:52 +03:00
Sebastian Dröge f1a1dadbf3 Prepare for merging into GStreamer 2023-10-26 09:27:46 +03:00
Jordan Petridis 67475fa684 opencv: move the dependency check to a single place
Previously we were checking for opencv dep in 2 different places,
and the checks would vary in terms of how complex and exhaustive
they were.

Move the check into the libs module and reuse the result later on.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3016>
2023-10-26 00:01:23 +00:00
Seungha Yang 2aa841e74b mfvideoencoder: Fix typo in template caps
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3058
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5554>
2023-10-25 23:19:51 +09:00
Matthew Waters 48ab457d79 vulkan/physical-device: don't assume that queue_family_ops is filled
On old enough vulkan (< 1.2), we will never retrieve the family operations and
will perform a NULL pointer dereference when dumping the queue family op
properties.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5547>
2023-10-25 16:38:06 +11:00
Adrien De Coninck 65365caa21 d3d11videosink: post "have-window-handle" element message on the bus
* when window_id is not user-provided and window_type==GST_D3D11_WINDOW_NATIVE_TYPE_HWND
* allows user to retrieve internally created window handle
  * for custom positionning
  * for custom icons
  * ...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5544>
2023-10-24 16:32:36 +02:00
David Rosca 8aac08506a va: Use vaMapBuffer2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5467>
2023-10-23 19:40:16 +00:00
Jordan Petridis 9f3b8c9366 vkwindow_xcb: Make the visible private field a guint
This field is used to store gbooleans (which are ints) but if it's
a :1 bit depth assigning ints to it changes it's value as the only
valid values are -1 and 0.

Make it a guint instead so the cast would be correct.

```
../subprojects/gst-plugins-bad/gst-libs/gst/vulkan/xcb/gstvkwindow_xcb.c:151:25: error:
implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1
[-Werror,-Wsingle-bit-bitfield-constant-conversion]
    window_xcb->visible = TRUE;
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5432>
2023-10-23 10:43:52 +05:30
Tim-Philipp Müller 654f3370a0 meson: Bump GLib requirement to >= 2.64
This includes fixes to make GstBus watches non-racy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2126>
2023-10-22 10:48:12 +01:00
Jordan Petridis 88e6dd0555 ci: switch the Fedora base image to f34
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1060>
2023-10-22 05:23:28 +03:00
Jordan Petridis 0bc353085f svthevcenc: Fix potential use of unitialized variable
In gst_svthevc_enc_propose_allocation if we don't get info from
the caps, we'd goto done, which could potentially try to unref
and unitialized pool variable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5476>
2023-10-21 20:08:59 +00:00
Piotr Brzeziński e79b308f82 vtdec: Fix deadlock when attempting to negotiate
This was wrongly calling the base class method, which unnecessairly took the stream lock, already taken by
handle_frame(). The drain() call in negotiate() would then wait for the output loop to pause, while that loop
is stuck waiting to take the stream lock, thus causing a deadlock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5521>
2023-10-20 13:50:16 +02:00
Nirbheek Chauhan 0a29654d7b svtav1enc: Don't segfault on not-negotiated
Don't drain on finish if we didn't configure the encoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5517>
2023-10-20 12:54:44 +05:30
Olivier Crête d0b587eb15 onnx: Remove enums file
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4916>
2023-10-20 00:33:29 +00:00
Olivier Crête a225755489 onnx: Remove unnecessary tensorid class
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4916>
2023-10-20 00:33:29 +00:00
Olivier Crête 62f292ac73 onnx: Update to build against 1.16.1
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4916>
2023-10-20 00:33:29 +00:00
Aaron Boxer 1ff585233a onnx: add gstonnxinference element
This element refactors functionality from gstonnxinference element,
namely separating out the ONNX inference from the subsequent analysis.

The new element runs an ONNX model on each video frame, and then
attaches a TensorMeta meta with the output tensor data. This tensor data
will then be consumed by downstream elements such as gstobjectdetector.

At the moment, a provisional TensorMeta is used just in the ONNX
plugin, but in future this will upgraded to a GStreamer API for other
plugins to consume.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4916>
2023-10-20 00:33:29 +00:00
Jan Alexander Steffens (heftig) 6053dd0d1b tsmux: Fix default get_es_descrs_func
`tsmux_stream_default_get_es_descrs` is missing the `user_data`
parameter and shouldn't be cast to `TsMuxStreamGetESDescriptorsFunc`.

Prefer not casting at all to make sure we don't miss such an issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) 2d72008361 tsmux: Fix default new_stream_func
`tsmux_stream_new` is missing the `user_data` parameter and shouldn't be
cast to `TsMuxNewStreamFunc`.

Prefer not casting at all to make sure we don't miss such an issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) 5bac956b58 tsmux: Add missing include
We need `GstMpegtsPMTStream` here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) db88612853 tsmux: Simplify tsmux_section_write_packet
- Don't try to make the parameters match `GHFunc`. Use a dedicated
  callback for `g_hash_table_foreach`.
- Don't try to be clever with buffer memories. We're allocating a full
  packet anyway, might as well memcpy and save on a lot of complexity.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) 950789f61b tsmux: tsmux_packet_out should always consume its buffer
Consuming the buffer only when successful is an antipattern and easily
leads to leaks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) 55658ad166 tsmux: Don't memset in pad_stream when writing a PCR packet
tsmux_write_ts_header will write a stuffing adaptation field, so we
don't need to prefill the buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:28 +00:00
Jan Alexander Steffens (heftig) 2dbd89b036 tsmux: Move out parameters of tsmux_write_ts_header
Move them to the end of the parameter list and also allow passing NULLs
to ignore the payload information, but assert that the payload length is
zero in this case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:27 +00:00
Jan Alexander Steffens (heftig) 5128975a36 tsmux: Fix two more uses of gst_buffer_map
The buffers should be used for writing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5496>
2023-10-19 22:34:27 +00:00
Nirbheek Chauhan fd4828bafe meson: Add a top-level option to enable webrtc
There are a bunch of plugins that you need for webrtc support, and
it's not obvious at all to users which those are.

With this commit, srtp, sctp and dtls options will be auto-enabled if
the webrtc option is enabled.

Requires meson 1.1

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5505>
2023-10-19 06:38:45 +00:00
Nicolas Dufresne 41f478e97d v4l2codecs: h265: Fix entry_point_offsets array leak
This array was being leaked.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5499>
2023-10-17 15:06:26 -04:00
Detlev Casanova 5f9b24e3ba codecs: h265: Do not free slice header before using it
The v4l2codecs H.265 decoder uses the
GstH265SliceHdr::entry_point_offset_minus1 array so make sure that it is not
freed before decoding the frame.

Before this patch, some H.265 input would segfault in
gst_v4l2_codec_h265_dec_fill_slice_params() when executing the line:

guint32 entry_point_offset = slice_hdr->entry_point_offset_minus1[i] + 1;

Make sure that the array is not freed before using it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5499>
2023-10-17 15:06:10 -04:00
Seungha Yang 269ab85881 d3d11converter: Fix deadlock on taking property mutex
SRWLOCK should be zero initialized, but since we changed the private
struct to C++, use C++ mutex instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5498>
2023-10-17 12:50:55 +00:00
Seungha Yang 65aa1b8faa d3d11converter: Create ID3D11Buffer with initial data
... and remove unnecessary device lock

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5492>
2023-10-17 10:48:49 +00:00
Seungha Yang 4e3d87edf5 d3d11converter: Don't set unnecessary constant buffer
Skip PSSetConstantBuffers() if it's not used by pixel shader

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5492>
2023-10-17 10:48:49 +00:00
Diego Nieto e290555367 mpegtsdemux: Fix comment about the jitter description
According to the information provided below, the Jitter (J) is
defined by a network delay (D) + a noise(i)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5494>
2023-10-17 08:22:41 +00:00
Jan Alexander Steffens (heftig) 8a7d0efd96 tsmux: Fix error handling in pad_stream
Don't leak the map or the buffer if we encounter an error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5490>
2023-10-16 15:46:00 +02:00
Jan Alexander Steffens (heftig) b1810d83bc tsmux: Fill padding packets with stuffing bytes
Instead of leaving it uncleared, emitting probably old packet data but
potentially also random or sensitive application data.

Also fix the mapping mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5490>
2023-10-16 15:46:00 +02:00
Seungha Yang e2790d635c d3d11screencapturesrc: Fix HWND capture mode
Use per-monitor-aware context to cover different DPI settings per
monitor

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2425
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5485>
2023-10-16 01:02:36 +09:00
Seungha Yang 66bb9ee866 d3d11converter: Update shader code to make 4_0_level_9_1 compatible
4_0_level_9_1 target requires float4 SV_TARGET

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5483>
2023-10-15 19:02:24 +09:00
Seungha Yang a35c4fd5c5 d3d11converter: Fix 10/12bits planar output
Simple division can result in 10/12bits overflow.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5483>
2023-10-15 01:47:29 +09:00
Seungha Yang 5ea1f8a548 d3d11converter: Print calculated matrix for debugging
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5483>
2023-10-15 00:27:27 +09:00
Seungha Yang ba02e94dde d3d11converter: Calculate gamma LUT only once
Reuse calculated gamma lookup table and use immutable 1D texture

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5482>
2023-10-14 13:37:08 +00:00
Seungha Yang 6f8c474293 d3d11converter: Remove unused variable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5482>
2023-10-14 13:37:08 +00:00
Seungha Yang 26e8bd1cc2 docs: Update Windows plugin docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5481>
2023-10-14 12:32:46 +00:00
Seungha Yang 347dd37225 dxva: Build gir and remove SDK header dependency
Build gir for documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5481>
2023-10-14 12:32:46 +00:00
Seungha Yang c5d60cee01 d3d12decoder: Hide non-default device from docs
... and add since marker

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5481>
2023-10-14 12:32:46 +00:00
Seungha Yang 8a35c8a2a5 d3d11compositor: Fix typo in property description
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5481>
2023-10-14 12:32:46 +00:00
Seungha Yang 0a05ba3f62 nvencoder: Add support for new preset/tune/multi-pass options
Adding new P1 ~ P7 presets and deprecate old preset values.
Also adding tune and multi-pass properties.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5428>
2023-10-14 11:03:40 +00:00
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
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
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
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
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 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