Commit graph

115740 commits

Author SHA1 Message Date
Victor Manuel Jaquez Leal 4cbdf43e7d va: Handle input caps change.
Update output caps if it's notified by baseclass

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3328

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3480>
2022-12-01 18:54:14 +00:00
Victor Manuel Jaquez Leal 19b83bc156 vaav1dec: Use gst_va_base_dec_set_output_state().
And even that vaav1dec doesn't use vabasedec negotiate vmethod, it should align
with the new scheme of using base's width & height for surface size and
output_info structure for downstream display size negotiation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3480>
2022-12-01 18:54:14 +00:00
Victor Manuel Jaquez Leal e5417b2db7 vavp9dec: Use gst_va_base_dec_set_output_state().
As this element reopen the internal decoder differently, it only uses the helper
function to negotiate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3480>
2022-12-01 18:54:14 +00:00
Victor Manuel Jaquez Leal 6dfca46ada vampeg2dec: Streams are progressive by default.
By initializating progressive, then interlaced streams are detected correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3480>
2022-12-01 18:54:14 +00:00
Victor Manuel Jaquez Leal b6538e0560 va: Add and use common decode negotiate vmethod.
This vmethod can be used by decoders with the same VA decoder reopen logic:
same profile, chroma, width and height.

Also a new public method called gst_va_base_dec_set_output_state() with the
common GStreamer code for setting the output state, which is always called by
the negotiate vmethod.

In order to do this refactoring, new variables in vabasedec have to be populated
by the decoders:

* width and height define the resolution set in VA decoder. In the case of H264
  would be de coded_width and codec_height, or max_width and max_height in AV1.
* output_info is the downstream video info used for negotiation in
  gst_va_base_dec_set_output_state().
* input_state, from codec parent class shall be also held by vabasedec

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3480>
2022-12-01 18:54:14 +00:00
Víctor Manuel Jáquez Leal 31c63a6e6c vaav1dec: Use gst_va_base_dec_prepare_output_frame().
And simplify a bit the code flow.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3480>
2022-12-01 18:54:14 +00:00
Víctor Manuel Jáquez Leal 4a8ecc2dba va: Add and use gst_va_base_dec_prepare_output_frame().
This helper will do downstream negotiation and later will
allocate the output frame.

H265 and AV1 decoders don't use this approach since their output
frame allocation is different.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3480>
2022-12-01 18:54:14 +00:00
Víctor Manuel Jáquez Leal f1a9728b30 va: Remove last_ret error handling in decoders.
It was used in the early development of the base classes. Now it
shouldn't be needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3480>
2022-12-01 18:54:14 +00:00
Víctor Manuel Jáquez Leal de5b76a922 va: Add and use gst_va_base_dec_process_output().
This function will copy the frame, if it's needed, and will apply buffer flags.

The function is used by all the decoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3480>
2022-12-01 18:54:14 +00:00
He Junyan 765adf5325 va: Fix the caps memory leak by gst_va_pool_new_with_config().
The gst_va_pool_new_with_config() will ref the caps, and so we need
to unref after that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3503>
2022-12-01 17:31:16 +00:00
Víctor Manuel Jáquez Leal c8a0d706ca va: Add render node name in non-first devices.
There could be multi-GPU setups where the non-first has more
entrypoints than the first one, and the elements names are not
homogeneous, leading to pipeline building error.

This patch add the render node in the elements names when they belong
to the non-first device.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3491>
2022-12-01 16:00:55 +00:00
Victor Manuel Jaquez Leal cccbf1f02d vafilter: Increase the caps for HDR.
As they might be other medatadata types.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3473>
2022-12-01 15:17:49 +00:00
Victor Manuel Jaquez Leal b25b1be70d vafilter: Increase the number of 3DLUT caps to 16.
To fix the warning on Alderlake

vafilter gstvafilter.c:534:gst_va_filter_ensure_filters:<vafilter0>
vaQueryVideoProcFiltersCaps: list argument exceeds maximum number

Increase the number of caps to 16 as vadumpcaps does.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3473>
2022-12-01 15:17:49 +00:00
Bo Elmgreen 1f88f411bc qt: deactivate context if fill_info fails
Now the OpenGL context is deactivated if call to gst_gl_context_fill_info()
fails in gst_qt_get_gl_wrapcontext(), preventing that the context is left
activated, which could lead to invalid memory reads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3492>
2022-12-01 14:21:37 +00:00
Sebastian Dröge 925715c734 av{aud,vid}dec: Report decoding errors to the base class
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1889>
2022-12-01 13:40:53 +00:00
Pawel Stawicki 94ba019397 v4l2: Fix SIGSEGV on 'change state' during 'format change'
Ensure all access to v4l2object->pool imply taking a lock and a hard ref on the pool

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3481>
2022-12-01 12:47:54 +00:00
Edward Hervey 0841e846a3 gst-inspect: Don't leak list
Just iterate the list instead of trying to be smart...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3497>
2022-12-01 06:42:22 +00:00
Víctor Manuel Jáquez Leal 8f96453b0f example: vaenc-dynamic-reconfigure: Support H265.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2036>
2022-12-01 09:45:24 +08:00
He Junyan c365389930 va: Add H265 SCC profile support.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2036>
2022-12-01 09:45:19 +08:00
He Junyan 0952c556dc va: Add extended formats support such as 10/12 bits, 4:2:2 and 4:4:4.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2036>
2022-12-01 09:45:14 +08:00
He Junyan 17c416ca92 va: enable multi tile support for H265 encoder.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2036>
2022-12-01 09:45:07 +08:00
He Junyan 2f8ce208e8 va: enable vah265lpenc for low power mode H265 encoder.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2036>
2022-12-01 09:45:00 +08:00
He Junyan 2677d4c6db va: Add the low-delay-b frame support for H265.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2036>
2022-12-01 09:44:41 +08:00
He Junyan 9ee657cdee va: Add prediction direction attribute support for H265 encoder.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2036>
2022-12-01 09:44:33 +08:00
He Junyan 4e7eddeafe va: Register and enable and the vah265enc plugin.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2036>
2022-12-01 09:44:26 +08:00
He Junyan 3d99f24843 va: Implement the vah265enc plugin for va HEVC encoding.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2036>
2022-12-01 09:44:08 +08:00
Vivia Nikolaidou a0e61539f8 opusdec: Use proper guint/guint8 type conversion
Do not cast, that might yield wrong results.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3494>
2022-11-30 21:11:55 +02:00
Vivia Nikolaidou c9afaf5cd9 opusdec: Negotiate default to 2 channels
In that place, dec->n_channels can still theoretically be 0. Default to
2 in that case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3494>
2022-11-30 20:56:30 +02:00
Vivia Nikolaidou cdf411e82d opusenc: Reverse channel order in template caps
We want to make it so that we prefer a higher, not lower, number of
channels. Otherwise, this pipeline would convert from 2 to 1 channels:

gst-launch-1.0 audiotestsrc ! audio/x-raw,channels=2 ! opusenc ! queue ! opusdec ! queue ! opusenc ! fakesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3494>
2022-11-30 20:52:05 +02:00
Philippe Normand 090cf943ed avviddec: Report flow error when decoder refused packet
In cases where an invalid input packet is submitted to the decoder we emit a
warning but reporting the flow error upstream would also be useful. This came up
with a case were the application interacts directly with the decoder, using a
mechanism similar to GstHarness.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3463>
2022-11-30 11:51:12 +00:00
Philippe Normand fa863b2b7f audiodecoder: Make data processing errors non-fatal by default
The previous default value of `max-errors` was too small and would potentially trigger the
decoder to emit errors too often for most cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3478>
2022-11-30 10:27:50 +00:00
Philippe Normand 9e5cce0ab9 videodecoder: Make data processing errors non-fatal by default
The previous default value of `max-errors` was too small and would potentially trigger the
decoder to emit errors too often for most cases.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3478>
2022-11-30 10:27:27 +00:00
Sebastian Dröge 12aa3925d0 sdpmessage: Annotate SDP message parameters for parse_uri() and parse_buffer() correctly
They are not actually `out` parameters but must be allocated and
initialized to a valid SDP message by the caller. Just allocating them
without initialization will cause memory corruptions because the
functions will try to clear/append to the existing SDP message.

As such they should be just marked as `transfer none`.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3484>
2022-11-29 14:02:55 +02:00
Seungha Yang a3b352c99d mfvideosrc: Fix buffer leak
The allocated buffer should be released

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3479>
2022-11-28 18:50:03 +00:00
Seungha Yang 581481c12f mediafoundation: Chain up from GObject::constructed
... so that GstTracer can trace it

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3479>
2022-11-28 18:50:03 +00:00
Seungha Yang b9b3a9c4e1 d3d11: Use correct ref/unref methods
Those objects are GstObject subclasses

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3479>
2022-11-28 18:50:03 +00:00
Ignacio Casal Quinteiro 2aa34164f6 sdp: use g_strdup instead of strdup
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3475>
2022-11-28 09:36:18 +00:00
Nicolas Dufresne b985c8eadd glimagesink: Fix render rect assertion
Whenever the surface is resized before the stream is negotiated, we endup
with an assertion in libgstvideo.

  gst_video_center_rect: assertion 'src->h != 0' failed

This fixes it, by following the style aready in place, which is to ensure
surfaces have a minimum size of 1x1.

Fixes #1139

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3467>
2022-11-28 07:52:25 +00:00
Tim-Philipp Müller dec3aa55e9 audioconvert, audioresample, audiofilter: fix divide by 0 for input buffer without caps
gst-launch-1.0 audiotestsrc ! udpsink host=127.0.0.1
gst-launch-1.0 udpsrc ! audioconvert ! autoaudiosink

would crash with a floating point exception when clipping the input
buffer owing to a division by zero because no caps event was received.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3469>
2022-11-26 08:47:49 +00:00
Seungha Yang 468b049a04 win32ipcvideosrc: Fix property name and enum value mismatch
Make them consistent

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3465>
2022-11-25 15:50:33 +00:00
Seungha Yang 20e83fa45b win32ipcvideosrc: Protect pipe from flush thread
The pipe object must be protected against GstBaseSrc::unlock()
thread.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3465>
2022-11-25 15:50:33 +00:00
He Junyan 25f90c828a h264parser: Fix a typo in pred_weight_table parsing.
When setting default values, the reference list number of l1 is wrong.

Fix: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/336
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3464>
2022-11-25 14:13:46 +00:00
Ma, Mingyang 66087b6276 msdkdec: Update decoding pts
Update frame pts before calling gst_video_decoder_finish_frame, or frames may be lost when transcoding in specific stream

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3449>
2022-11-25 01:42:58 +00:00
Xavier Claessens 4c3bb001f5 Install meson from git when MESON_COMMIT variable is set
When starting manually a CI pipeline with MESON_COMMIT variable defined,
install the specified version of Meson. This can be used to help the
Meson project smoke testing RC releases or investigate eventual
regressions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3036>
2022-11-24 16:17:08 +00:00
Seungha Yang 4f846540cb win32ipc: Add WIN32 shared memory videosrc/sink elements
Windows supports various IPC methods but that's completely
different form that of *nix from implementation point of view.
So, instead of adding shared memory functionality to existing
shm plugin, new WIN32 shared memory source/sink elements
are implemented in this commit.

Each videosink (server) and videosrc (client) pair will communicate
using WIN32 named pipe and thus user should configure unique/proper
pipe name to them (e.g., \\.\pipe\MyPipeName).
Once connection is established, videosink will create named shared memory
object per frame and client will be able to consume the object
(i.e., memory mapped file handle) without additional copy operation.

Note that implementations under "protocol" directory are almost
pure C/C++ with WIN32 APIs except for a few defines and debug functions.
So, applications can take only the protocol part so that the application
can send/receive shared-memory object from/to the other end
even if it's not an actual GStreamer element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3441>
2022-11-24 12:41:18 +00:00
Matt Crane ca7f66f9b5 rtpsession: Support disabling late adjustment of ntp-64 header ext
Currently in rtp_session_send_rtp(), the existing ntp-64 RTP header
extension timestamp is updated with the actual NTP time before sending
the packet. However, there are some circumstances where we would like
to preserve the original timestamp obtained from reference timestamp
buffer metadata.

This commit provides the ability to configure whether or not to update
the ntp-64 header extension timestamp with the actual NTP time via the
update-ntp64-header-ext boolean property. The property is also exposed
via rtpbin. Default property value of TRUE will preserve existing
behavior (update ntp-64 header ext with actual NTP time).

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3451>
2022-11-24 08:23:03 +00:00
Matthew Waters 18972fc942 add new plugin for Qt 6 rendering inside a QML scene
- Based heavily on the existing Qt5 integration however:
  - The sharing of OpenGL resources is slightly different
  - The integration with the scengraph is a bit different
- Wayland, XCB and KMS have been smoke tested.  Android, MacOS/iOS,
  Windows may or may not work.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3281>
2022-11-24 16:11:04 +11:00
Jan Lorenz 47b8762774 mfvideosrc: check HRESULT of CreateClassEnumerator correctly
Fixes a crash during direct show device enumeration

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1599
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3460>
2022-11-23 14:45:50 +00:00
Elliot Chen 63ff99ca8e v4l2: bypass check some transfer types in colorimetry
v4l2 will report fail for some streams whose colorimetry value such as 2:4:8:3.
Can bypass check these transfer types in colorimetry to avoid error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3440>
2022-11-23 13:06:29 +00:00
Edward Hervey 65e142c6ed docs/design: Add document detailing the new gapless/instant-uri changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3457>
2022-11-23 12:19:22 +00:00