Commit graph

2241 commits

Author SHA1 Message Date
Seungha Yang c40f6dac57 d3d11overlaycompositor: Fix resource leak
Fixing regression since 94eadc9810

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4885>
2023-06-19 00:13:00 +09:00
Seungha Yang 3153e7f46d amfav1enc: Workaround driver bug with bt601 color matrix
If bt601 is specified, driver generates sequence header with identity
color matrix

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4370>
2023-06-16 10:10:33 +00:00
Daniel Almeida ec188eb82e v4l2codecs: Add AV1 decoder
This patch adds AV1 stateless v4l2 decode support using the
new v4l2 request API to communicate with hardware accelerators.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1011>
2023-06-16 01:30:40 +00:00
Benjamin Gaignard 465d146864 codecparser: AV1: fix reference frame ordering
In AV1 specifications earliest_order_hint is initialized at
beginning of the process and not before each frame ordering.

FFMPEG parser does the same.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1011>
2023-06-16 01:30:40 +00:00
Michael Olbrich 3f24a38c8e sdpdemux: ensure that only one srcpad is created per stream
If two senders use the same multicast IP and port then new_session_pad()
may try to add a srcpad to the same stream twice.

stream->srcpad is updated but gst_element_add_pad() fails the second
time. As a result stream->srcpad points to a deleted object and
access in gst_sdp_demux_stream_free() fails with a segfault.

Just ignore the second pad. Nothing useful can be done with it anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4603>
2023-06-15 23:35:30 +00:00
Seungha Yang 5b6ecf359e va: Fix Windows build
DRM_FORMAT_MOD_LINEAR and DRM_FORMAT_MOD_INVALID are not defined
on Windows

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4864>
2023-06-15 21:14:29 +00:00
James Cowgill 70ff80a873 v4l2codecs: Always chain up to parent decide_allocation function
The `gst_video_decoder_negotiate_pool` function expects the
`decide_allocation` function to always provide a pool and will fail to
negotiate if the pool is missing. If we return immediately (even if we
don't need to do anything special) negotiation will fail if the
downstream element does not propose a pool.

Fix by chaining up to the default `decide_allocation` function which
adds a fallback pool if one was not already proposed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4630>
2023-06-15 17:02:28 +00:00
Nicolas Dufresne 42c12c9c73 doc: Update plugin cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3447>
2023-06-15 10:41:26 -04:00
Nicolas Dufresne 0f5d10f617 v4l2codecs: Enable Verisilicon 10bit 4:2:0 support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3447>
2023-06-15 14:32:32 +00:00
Nicolas Dufresne aea74db1a2 v4l2: Sync headers to current media_stage
commit d78b9d6671decdaedb539635b1d0a34f8f5934f8

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3447>
2023-06-15 14:32:32 +00:00
Seungha Yang ba6800ce23 dwrite: Add DirectWrite text rendering plugin
Adding DirectWrite text rendering elements
* dwriteclockoverlay: Equivalent to clockoverlay
* dwritetimeoverlay: Equivalent to timeoverlay
* dwritetextoverlay: Similar to textoverlay but subtitle is not
  supported

Newly added elements support system memory and d3d11 memory

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4826>
2023-06-15 12:53:02 +00:00
Seungha Yang 01edbf6c6b d3d11overlaycompositor: Add support for d3d11 memory
If overlay buffer is d3d11 memory, use it directly

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4826>
2023-06-15 12:53:02 +00:00
Aaron Boxer a72ca72a27 mpegtsmux: add stream-number property on GstBaseTsMuxPad
This new property allows setting of PES stream number for AAC audio
and AVC video streams.

The stream number is subject to the following constraints:

1. it must be between 0 and 15 for video
2. it must be between 0 and 31 for audio

Currently the PES stream number is hard-coded to zero for these
stream types.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4822>
2023-06-15 10:34:25 +00:00
Marek Vasut 4c92d4096e bayer2rgb: Support video/x-bayer 10/12/14/16 bit depths
Add support for 10/12/14/16 bit depths . This consists of multiple parts.
First is the parsing of caps, which pulls out the bitness and endianness
from the video/x-bayer format.

Second, gst_bayer2rgb_split_and_upsample_horiz() is split into two similar
functions, one for 8bit bayer handling and another for 16bit bayer handling.
The content is basically identical, except one uses 8bpp and the other 16bpp
inputs and outputs, and they each use different ORC code to match. The 16bpp
variant also handles endian swapping. There is now a wrapper called
gst_bayer2rgb_split_and_upsample_horiz() which selects the correct function
based on bpp from the parser.

Third, gst_bayer2rgb_process() is extended to handle both 8bit and 16bit
bayer data. Yet again there are matching ORC functions to handle the 16bit
data. This time however the 16bit handling of data is slightly special. The
ORC is not able to emit opcodes for 'x2 mergelq', so the trick here is to
store the BG and GR longs into separate 'dtmp' temporary buffer, and then
do one more ORC post-processing step, compensate for the less-than-16bpp
bitness using left shift, and reorder them into the destination frame
using 'mergelq' .

Example usage:
```
$ gst-launch-1.0 videotestsrc ! \
    video/x-bayer,width=512,height=512,format=bggr16le ! \
    bayer2rgb ! \
    video/x-raw,format=RGBA64_LE ! \
    videoconvert ! \
    autovideosink
```

Example usage:
```
$ gst-launch-1.0 videotestsrc ! \
    video/x-raw,width=512,height=512,format=ARGB ! \
    rgb2bayer ! \
    video/x-bayer,format=bggr12le ! \
    bayer2rgb ! \
    video/x-raw,format=RGBA64_LE ! \
    videoconvert ! \
    autovideosink
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut 9d1a750117 bayer2rgb: Add comments explaining gst_bayer2rgb_process()
Add comments regarding which LINE()s point to which data in the
temporary buffer and a large comment explaining how the buffer
is processed. This will hopefully be useful to someone, as the
code is not obvious. No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut 920851945f bayer2rgb: Add comment on bayer_orc_horiz_upsample
Explain how the bayer_orc_horiz_upsample function works and
what it does with the pixels, as this may not be obvious.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut 4efe11a705 bayer2rgb: Pass filter pointer into gst_bayer2rgb_split_and_upsample_horiz()
Instead of passing a single element of GstBayer2RGB structure into the
gst_bayer2rgb_split_and_upsample_horiz(), pass the entire pointer and
let the funciton pick out whatever it needs out of the structure. This
is a preparatory patch. No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut fbd02b3e2a bayer2rgb: Pass all parameters to LINE() macro
Pass all three parameters used by the LINE() macro to the LINE() macro
and unroll the code for readability. Add more comments regarding which
of these LINE()s point to which data in the temporary buffer to make
the code less confusing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut 8bec6828f4 bayer2rgb: Fold src_stride into gst_bayer2rgb_process()
The source stride parameter can be easily obtained from GstBayer2RGB
structure, do it within gst_bayer2rgb_process() and drop the parameter.
No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut ddcb45ffc0 bayer2rgb: Inline the j=0 value
The j variable is used as an iterator further down in this code, but
here it can be just inlined in the macro parameters to make the code
easier to read. This is done in preparation for further changes. No
functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut 484e31c1d9 bayer2rgb: Disable in-place transform
The bayer2rgb process implemented doesn't support in-place tranform.
This element doesn't implement a "transform_ip" vmethod of
GstBaseTransform it will revert to using the "tranform" vmethod.
It's misleading to set it to TRUE, here. Change this to FALSE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut 0763fb107d rgb2bayer: Support video/x-bayer 10/12/14/16 bit depths
Add support for conversion to 10/12/14/16 bit bayer pattern.
The implementation is rather simplistic, just take the ARGB
input, generate 16-bit data out of it instead of 8-bit, shift
them as required by the output bitness, and apply endian swap.

Example usage:
```
$ gst-launch-1.0 videotestsrc num-buffers=1 ! \
    video/x-raw,width=512,height=512,format=ARGB ! \
    rgb2bayer ! \
    video/x-bayer,format=bggr12le ! \
    filesink location=/tmp/bayer12.raw
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Seungha Yang 110ec5d4b2 d3dvideosink: Fix navigation event leak
Fixing regression introduced in 6c2f6c3bd4

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4863>
2023-06-15 05:09:46 +00:00
Seungha Yang 94eadc9810 d3d11videosink: Fixing unexpected overlay composition meta drops
A buffer can hold multiple GstVideoOverlayCompositionMeta objects.
Should scan all metas on a buffer and render all overlay rectangles
if any.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4862>
2023-06-15 00:35:09 +00:00
Marek Vasut f18e30cf3b kmssink: Add ST STM32 LTDC auto-detection
Add STM32 LTDC controller into list of auto-detected modules.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4858>
2023-06-14 22:35:27 +00:00
Marek Vasut b8b53cafcf kmssink: Add NXP i.MX8M Plus LCDIFv3 auto-detection
Add i.MX8M Plus LCDIFv3 controller into list of auto-detected modules.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4858>
2023-06-14 22:35:27 +00:00
Arun Raghavan e1139e740a webrtcdsp: Deal with echo probe info not being available
Even if we don't yet know what the echo probe format is, we want to be able to
provide silence for the reverse path, so that when the probe becomes available,
there is no ambiguity around what time period the new set of samples are for.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4849>
2023-06-14 20:08:52 +00:00
Nirbheek Chauhan fade0748d1 webrtcdsp: Map probe buffers with probe info, not dsp info
The probe's info may not precisely match the dsp's info. For instance,
the number of channels or their layout might be different.

```
GStreamer-Audio-CRITICAL **: 16:21:32.899: the GstAudioInfo argument is not equal to the GstAudioMeta's attached info
```

This broke in d5755744c3.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4849>
2023-06-14 20:08:52 +00:00
Seungha Yang 842805d7c6 av1decoder: Fix DPB size signalling
Take current frame into account for the DPB size signalling

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4845>
2023-06-14 15:16:04 +00:00
Seungha Yang 77b9e1351a mpeg2decoder: Fix DPB size signalling
Take current frame into account for the DPB size signalling

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4845>
2023-06-14 15:16:04 +00:00
Seungha Yang 965e566156 vp9decoder: Fix DPB size signalling
Take current frame into account for the DPB size signalling

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4845>
2023-06-14 15:16:04 +00:00
Seungha Yang 7d2beab9b1 vp8decoder: Fix DPB size signalling
Take current frame into account for the DPB size signalling

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4845>
2023-06-14 15:16:04 +00:00
François Laignel 32fbad8d39 srtpdec: fix Got data flow before segment event
A race condition can occur in `srtpdec` during the READY -> NULL transition:
an RTCP buffer can make its way to `gst_srtp_dec_chain` while the element is
partially stopped, resulting in the following critical warning:

> Got data flow before segment event

The problematic sequence is the following:

1. An RTCP buffer is being handled by the chain function for the
   `rtcp_sinkpad`. Since, this is the first buffer, we try pushing the sticky
   events to `rtcp_srcpad`.
2. At the same moment, the element is being transitioned from PAUSED to READY.
3. While checking and pushing the sticky events for `rtcp_srcpad`, we reach the
   Segment event. For this, we try to get it from the "otherpad", in this case
   `rtp_srcpad`. In the problematic case, `rtp_srcpad` has already been
   deactivated so its sticky events have been cleared. We won't be pushing any
   Segment event to `rtcp_srcpad`.
4. We return to the chain function for `rtcp_sinkpad` and try pushing the
   buffer to `rtcp_srcpad` for which deactivation hasn't started yet, hence the
   "Got data flow before segment event".

This commit:

- Adds a boolean return value to `gst_srtp_dec_push_early_events`: in case the
  Segment event can't be retrieved, `gst_srtp_dec_chain` can return  an error
  instead of calling `gst_pad_push`.
- Replaces the obsolete `gst_pad_set_caps` with `gst_pad_push_event`. The
  additional preconditions checked by previous function are guaranteed here
  since we push a fixed Caps which was built in the same function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4844>
2023-06-14 11:59:33 +00:00
François Laignel 96450f4c59 srtpdec: fix assertion 'parent->numsinkpads <= 1' failed
A race condition can occur in `srtpdec` during the READY -> NULL transition:
an RTCP buffer can make its way to `gst_srtp_dec_chain` while the element is
partially stopped, resulting in the following critical warning:

> assertion 'parent->numsinkpads <= 1' failed

This can occur when the first RTCP buffer is received during the READY -> NULL
transition. If deactivation of the `rtp_srcpad` has already reached
`post_activate`, the sticky events are removed from this Pad. In this case,
`gst_srtp_dec_push_early_events` branches to the generation of a stream id
using `gst_pad_create_stream_id`. This function ensures that the element
doesn't own more than 1 sink pad. Since `srtpdec` owns two of them, the
assertion fails.

This commit uses `gst_element_decorate_stream_id` which doesn't perform this
check. The preconditions is not necessary in this particular context since the
stream id for the RTP / RTCP pads are derived from the same id.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4844>
2023-06-14 11:59:33 +00:00
Seungha Yang a88d90b777 d3d11: Log device removed reason
... and live objects. It could be useful hint for GPU debugging

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4170>
2023-06-14 06:23:12 +00:00
Tim-Philipp Müller a9c5e5e239 asfmux: fix potentially unaligned write on 32-bit ARM
Fixes #2665

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4842>
2023-06-14 04:59:05 +00:00
Víctor Manuel Jáquez Leal 06a2b2c7d9 va: dmabuf allocator to use GstVideoInfoDmaDrm
Change the internal GstVideoInfo structure in the GstVaDmabufAllocator to
GstVideoInfoDmaDrm in order to keep track of the exported DRM format by the
driver, and thus removing the DRMModifier quark attached as qdata in the
GstMemory. Though, the exposed API isn't updated yet; that has to go in a
second iteration.

Also this patch clean up some code (remove an unused buffer size assignation)
and fix some typos in documentation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4821>
2023-06-14 01:08:37 +00:00
He Junyan b59b77a02f va: Add helper functions to convert GstVideoInfoDmaDrm into va video info
The VA has its internal video format mapping(because different drivers may
have different interpretation for the same format), so we should convert the
info in GstVideoInfoDmaDrm into the according video info based on that mapping.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4821>
2023-06-14 01:08:37 +00:00
He Junyan c72960b427 va: Replace the tabs into spaces in gstvacaps.h
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4821>
2023-06-14 01:08:37 +00:00
He Junyan e00e64116a va: Add a helper function to detect the surface modifier
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4821>
2023-06-14 01:08:37 +00:00
He Junyan a01f2f0206 va: Lower the message level for va_export_surface_to_dmabuf()
Some surface formats such as GST_VIDEO_FORMAT_Y42B and GST_VIDEO_FORMAT_RGB
can be created but can not be exported as DMA buffer. You can not say that
this is a driver bug because the driver may never want to share this kind of
surface out of libva.
And this function will be used to detect modifiers later, so the error message
will be annoying.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4821>
2023-06-14 01:08:37 +00:00
He Junyan 7166fd3863 va: Extend the va_create_surfaces() function to accept modifiers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4821>
2023-06-14 01:08:37 +00:00
He Junyan 994ab957c1 va: Add a helper function to convert video drm info to video info
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4821>
2023-06-14 01:08:36 +00:00
He Junyan 547f3e8622 va: Map drm fourcc into va fourcc in video format
The fourcc defined in va.h and drm_fourcc.h sometimes is not identical.
For example, the I420 format is defined as "I420" in va.h but defined
as "YU12" in drm_fourcc.h.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4821>
2023-06-14 01:08:36 +00:00
Nicolas Dufresne 4402a8044f fakesinks: Fix recursive notify loop
The proxy callback for the notify::last-message was emiting the signal
again on the child, which caused an infinit loop. We could swap the child
and the user data to signal to the bin instead, but it was found that proxying
this signal was not very useful. Typical use case it to set silent=0 and use
deep-notify feature. Proxying that signal just duplicate that output which
isn't very useful.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4766>
2023-06-13 23:33:08 +00:00
Nicolas Dufresne 5f2a664415 v4l2codecs: h265: Set num_delta_pocs_of_ref_rps_idx
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4413>
2023-06-13 14:34:45 +00:00
Nicolas Dufresne 6a7835e106 v4l2codecs: Extend the API with num_delta_pocs_of_ref_rps_idx
This value is an alternative to short_term_ref_pic_set_size and can be used
to parse the RPS portion of a slice header, instead of skipping over it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4413>
2023-06-13 14:34:45 +00:00
Seungha Yang e422a991f3 h265decoder: Calculate DPB size based on level
As specified in "A.4 Tiers and levels", calculate DPB size based
on level in order to avoid over preallocated DPB

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4840>
2023-06-13 02:57:06 +00:00
Jan Alexander Steffens (heftig) 6e9d67bbc1 mpegtsmux: Use terminological ISO 639-2 language codes
These are preferred in most circumstances.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2649
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4795>
2023-06-12 08:51:10 +00:00
Seungha Yang ebd5ff73be d3d11convert: Add support for premultiplied alpha conversion
Adding "src-alpha-mode" and "dest-alpha-mode" properties
to support alpha mode conversion

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4825>
2023-06-10 18:12:58 +00:00
Seungha Yang 80878a6ea4 d3d11testsrc: Add "alpha" and "alpha-mode" properties
Adding global alpha and alpha mode options

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4825>
2023-06-10 18:12:58 +00:00
Seungha Yang cb28a16007 d3d11overlaycompositor: Handle premultiplied alpha in pixel shader
Do premultiplied -> straight alpha conversion using GPU

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4825>
2023-06-10 18:12:58 +00:00
Seungha Yang 15735a4ef3 d3d11converter: Add support for premultiplied alpha
Adding "src-alpha-mode" and "dest-alpha-mode" properties
and performs premultiplied alpha conversion if needed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4825>
2023-06-10 18:12:58 +00:00
Seungha Yang 1aa9e74aaf cudadownload: Always download CUDA memory if it's bound to decoder
Decoder bounded CUDA memory is allocated by driver and the pool size
is fixed. Since we don't know how many buffers would be held by
downstream non-CUDA element, we should download such CUDA memory
and release it back to decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4810>
2023-06-08 22:27:06 +00:00
Víctor Manuel Jáquez Leal 8dff9d5ad0 doc: use gir file if dependency is not available
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4781>
2023-06-08 08:50:05 +00:00
Víctor Manuel Jáquez Leal 94250e8c31 msdk: remove libva check before 1.12
Since gstmsdk depends on gstva library it also bumps the required version.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4781>
2023-06-08 08:50:05 +00:00
Víctor Manuel Jáquez Leal 53860147c6 va: bump libva version to 1.12
Remove all checks in gstva for all version lower than 1.12

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4781>
2023-06-08 08:50:04 +00:00
Seungha Yang 8a4642cad7 win32ipc: Use gst_util_get_timestamp()
Instead of duplicating the same code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4794>
2023-06-08 01:02:45 +00:00
Seungha Yang 3c5684e085 d3d11: Use gst_util_get_timestamp()
instead of duplicating the same code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4794>
2023-06-08 01:02:45 +00:00
Vivia Nikolaidou 0e62bb2ba6 basetsmux: Fix language crash when ts_pad->stream is NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4785>
2023-06-07 16:58:38 +00:00
Vivia Nikolaidou 0a331402d6 tsdemux: Detect language from ac3 descriptor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4709>
2023-06-07 13:04:03 +00:00
Seungha Yang 4d6a2dea89 d3d11ipcsrc: Stop asynchronously in case of io-mode=import
In case of import mode, d3d11ipcsrc does not know when outputted
memories will be released.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4774>
2023-06-06 17:54:44 +00:00
Seungha Yang ef1853aa8d d3d11ipc: Use unnamed shareable handle
Exchanging HANDLE would have smaller overhead than string

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4774>
2023-06-06 17:54:44 +00:00
Seungha Yang 1e5343f0c6 d3d11memory: Add support for resource sharing via NT handle
Adding gst_d3d11_memory_get_nt_handle() method so that GstD3D11Memory
can hold shareable NT handle and for easy reuse of it

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4774>
2023-06-06 17:54:44 +00:00
Seungha Yang aada49c6a6 d3d11ipcsink: Don't clear prepared sample on render
render() can be called multiple times for the same prepared sample

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4774>
2023-06-06 17:54:44 +00:00
Sebastian Dröge f1e7ac13cd decklink: Implement Windows string conversion with common API between MinGW and MSVC
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4738>
2023-06-06 06:21:46 +00:00
Sebastian Dröge ab582a3b7d decklink: Add some newlines in long defines
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4738>
2023-06-06 06:21:46 +00:00
Maksym Khomenko 72e7ae724f decklink: Calculate string size before malloc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4738>
2023-06-06 06:21:46 +00:00
Sebastian Dröge ab946cd41e decklink: Use the macOS version of the SDK on macOS and not the Linux one
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4738>
2023-06-06 06:21:46 +00:00
Sebastian Dröge a2850bcb88 decklink: Free SDK strings after usage on Linux
While they're const char* they still need to be freed like on Windows
and macOS and would be leaked otherwise.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4738>
2023-06-06 06:21:46 +00:00
Sebastian Dröge 59ca9ef342 decklink: Correctly handle SDK strings on macOS
They're CFStringRef* and not plain NUL-terminated char* C strings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4738>
2023-06-06 06:21:46 +00:00
Aaron Boxer e624e7c695 onnxobjectdetector: gracefully handle Ort exceptions rather than dumping core
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4765>
2023-06-05 17:47:58 +00:00
Víctor Manuel Jáquez Leal e074cb55f7 va: remove unused parameters in internal function
gst_va_buffer_surface_new() don't use neither format, width nor height.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4768>
2023-06-04 19:16:53 +02:00
Matthew Waters c3af29db1e build/android: remove all references to gnustl
Not needed anymore with NDK R25.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4747>
2023-06-03 23:21:34 +00:00
Seungha Yang e4c43db5d5 d3d11basefilter: Forward video related metas if needed
The same as in GstVideoFilter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4751>
2023-06-02 00:33:52 +00:00
Michael Grzeschik ea2764aa69 uvcsink: add probe handling for live pipelines
Currently the uvcsink is only capable to run in an application
that is handling the state transitions of the pipeline properly
by checking on streaming event from the uvcsink.

This code is improving the element by adding an fakesink to
consume possible videostream flow in case the pipeline state
is not changing on hosts streamoff.

This is helpfull when using local gst-launch pipelines where
the streaming event is not monitored to change the pipelines
state.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304>
2023-06-01 19:19:05 +00:00
Michael Grzeschik 5d82deb2c5 uvcsink: add new bin element around v4l2sink
This patch adds an element to stream video data to an uvc video gadget.
The element handles the uvc events STREAMON, STREAMOFF, SETUP and DATA.
to start, stop and configure the video buffer flow by the use of pad
probes. It works with linux kernels of versions higher than v6.1.

The element makes use of the v4l2sink proxy property v4l2sink::device
to locate the corresponding device to parse the configfs for additional
data.

The code in uvc.c is basically derived from /lib/uvc.c in
https://git.ideasonboard.org/uvc-gadget.git.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304>
2023-06-01 19:19:05 +00:00
Michael Grzeschik 6ef14df09b uvcsink: configfs.{c,h}: add helper function to parse by videodev
- add helper function video_find_config_name
- add helper function configfs_parse_uvc_videodev

With these helper functions it is possible to parse the
configfs entry corresponding to the used videodev.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304>
2023-06-01 19:19:05 +00:00
Michael Grzeschik 079fc8216c uvcsink: configfs.c: use G_N_ELEMENTS instead of ARRAY_SIZE
We don't have ARRAY_SIZE in glib.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304>
2023-06-01 19:19:05 +00:00
Michael Grzeschik fd3a6ce642 uvcsink: configfs.c: fix globing in uvc_video_device
The gadget in the sysfs can be postfixed with an index.
Fix the globbing by adding a wildcard after /gadget*/.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304>
2023-06-01 19:19:05 +00:00
Michael Grzeschik 38aa1fc414 uvcsink: configfs.c: refactor location of GUID formats
- move GUID handling to beginning

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304>
2023-06-01 19:19:05 +00:00
Michael Grzeschik da61d8f96d uvcsink: configfs.{c,h}: add parsing of more fields from format
- add parsing of dwMaxVideoFrameBufferSize

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304>
2023-06-01 19:19:05 +00:00
Michael Grzeschik e50dcac517 uvcsink: configfs.c: fix code for local usage
- use local header file and remove unused reference to tools.h

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304>
2023-06-01 19:19:05 +00:00
Michael Grzeschik 42c53f971c uvcsink: add configfs.{c,h} from https://git.ideasonboard.org/uvc-gadget.git
- imported both files and run gst-indent on them

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1304>
2023-06-01 19:19:04 +00:00
Vivia Nikolaidou 395e0c3925 tsmux: Resend PMT whenever the language changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4711>
2023-06-01 17:05:11 +00:00
Víctor Manuel Jáquez Leal 06d793033d vulkan/format: use basic features (v1) as fallback
if vkGetPhysicalDeviceFormatProperties2 isn't available.

This approach assumes that, for basic features flags symbols,
VkFormatFeatureFlagBits and VkFormatFeatureFlagBits2 are binary equivalent.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4746>
2023-06-01 13:58:47 +00:00
Matthew Waters 0a74a967e3 vulkan/format: don't rely on vulkan header version for function availability
e.g. android will have update vulkan.h headers but old platforms will
not contain the function and will result in a link error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4746>
2023-06-01 13:58:47 +00:00
Arun Raghavan d5755744c3 webrtcdsp: Update code for webrtc-audio-processing-1
Updated API usage appropriately, and now we have a versioned package to
track breaking vs. non-breaking updates.

Deprecates a number of properties (and we have to plug in our own values
for related enums which are now gone):

  * echo-suprression-level
  * experimental-agc
  * extended-filter
  * delay-agnostic
  * voice-detection-frame-size-ms
  * voice-detection-likelihood

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2943>
2023-06-01 09:34:37 +00:00
Mathieu Duponchelle 211928ca41 webrtc/nice: put usage of OPTION_CONSENT_FRESHNESS behind check
See https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/257

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4750>
2023-06-01 00:42:28 +00:00
Thibault Saunier 4a4d7821a5 cudabasetransform: Handle video related meta as appropriate
This implements the same logic as GstVideoFilter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4731>
2023-05-31 20:09:42 +00:00
Thibault Saunier 8d3f90eb8d cuda: memory: Enhance debug when CU_GL_DEVICE_LIST_ALL fails
Ensuring error from cuda is logged

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4731>
2023-05-31 20:09:42 +00:00
Colin Kinloch 82c449ce00 waylandsink: Emit "map" signal boarder surface is ready
This allows gtkwaylandsink to queue a draw of its gtk widget at the
correct time, avoiding a race.

Signed-off-by: Colin Kinloch <colin.kinloch@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4722>
2023-05-31 18:57:56 +00:00
Stéphane Cerveau 5873747a59 tools: add bad/ges/omx tools to gst_tools
In static mode, these tools must be built
after the gstreamer-full library to use
the symbol gst_init_static_plugins.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4128>
2023-05-31 15:17:11 +00:00
Stéphane Cerveau dd17beb681 gstreamer-full: add full static support
Allow a project to use gstreamer-full as a static library
and link to create a binary without dependencies.

Introduce the option 'gst-full-target-type' to
select the build type, dynamic(default) or static.

In gstreamer-full/static build configuration gstreamer (gst.c)
needs the symbol gst_init_static_plugins which is defined
in gstreamer-full.
All the tests and examples are linking with gstreamer but the
symbol gst_init_static_plugins is only defined in the gstreamer-full
library. gstreamer-full can not be built first as it needs to know what plugins
will be built.

One option would be to build all the examples and tests after
gstreamer-full as the tools.

Disable tools build in subprojects too as it will be built at the end of
build process.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4128>
2023-05-31 15:17:11 +00:00
Jan Alexander Steffens (heftig) 4008b872bb fdkaacdec: Support up to 5 rear channels
The `switch (n_rear)` supports up to 5 rear channels, but our channel
set only had space for 3. Size the set properly to fix this.

This didn't actually cause any memory unsafety as `PUSH_CHAN` would stop
incrementing `n_rear` if the channel set is already full.

Thanks to @alatiera for noticing this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4712>
2023-05-30 14:18:08 +02:00
Mengkejiergeli Ba a15a16c99b msdkenc: Add a property to insert pic timing SEI for avc and hevc
User can decide whether to insert pic timing sei with pic_struct
syntax via oneVPL API mfxExtCodingOption.PicTimingSEI.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4673>
2023-05-29 02:11:20 +00:00
Jordan Petridis 6032f51162 openjpegenc: do not set bpp field on opj_image_cmptparm_t
It's deprecated in favor of the .prec field which we already set.

https://github.com/uclouvain/openjpeg/pull/1383/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4715>
2023-05-26 20:24:27 +00:00
Víctor Manuel Jáquez Leal 8b75e5fb57 vkvideoutils: fix code-style
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716>
2023-05-26 10:08:27 +02:00
Víctor Manuel Jáquez Leal b982fae9c7 tests: check if vulkan h264 decoding is supported
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716>
2023-05-26 10:08:27 +02:00
Víctor Manuel Jáquez Leal 365454790a vkphysicaldevice: fetch queue family query result support
And merged in a single structure the queue family operations report.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716>
2023-05-26 10:08:27 +02:00