Commit graph

112906 commits

Author SHA1 Message Date
Víctor Manuel Jáquez Leal
a9211a5067 va: allocator: No need of fourcc to create surface.
In commits 430aa327 and a119a940 there are a regression since it is
possible to create surfaces without fourcc, only chroma (rtformat) is
required.

This regression is shown on radeonsi driver with certain color
formats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2035>
2021-02-25 12:05:19 +00:00
Víctor Manuel Jáquez Leal
87fe2e321e va: vpp: implement GstColorBalance interface
And modify multiple-vpp example to use it with -r parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2033>
2021-02-25 11:22:53 +00:00
Víctor Manuel Jáquez Leal
5b117045e0 va: filter: add controllable and mutable playing to GParamFlags
Add controllable and mutable playgin to common GParamFlags.

Also use this common flags to video-direction

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2033>
2021-02-25 11:22:53 +00:00
Kristofer Björkström
11b5ebd058 gstrtspconnection: correct data_size when tunneled mode
gst_rtsp_connection_send_messages_usec in tunneled mode does base64
encode messages. When calculating data_size 1 bytes is added, which
results in ending the base64 with a NULL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1051>
2021-02-25 12:21:53 +01:00
Jordan Petridis
bdbef0449c ci_template: build windows image in the ci
Build the images in the ci runners like we do,
for the linux containers.

Kudos to mesa for the powershell script that
reimplements the ci-templates behavior.

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4304

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/392>
2021-02-25 04:25:25 +02:00
Jordan Petridis
8f0481f19a docker/windows: make the powershell scripts more robust
Check the exit codes of various commands and fail
appropriatly upon error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/392>
2021-02-25 04:25:25 +02:00
Robert Rosengren
e99a6f3142 audio: Use GST_BUFFER_PTS instead of deprecated GST_BUFFER_TIMESTAMP
GST_BUFFER_PTS already used in audio code base (e.g. gstaudiodecoder),
so migrate completely from deprecated GST_BUFFER_TIMESTAMP for better
readability, as gstcompat.h defines GST_BUFFER_TIMESTAMP directly to PTS
anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1048>
2021-02-25 02:04:44 +00:00
Jordan Petridis
1f0b3938af ci_template: use meson subproject --rebase for the windows builds as well
Similar to !375

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/382>
2021-02-25 03:32:58 +02:00
Víctor Manuel Jáquez Leal
771645e445 vulkan: Fix elements long name.
Fix vkcoloconvert and vkviewconvert long names.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2034>
2021-02-24 20:15:52 +01:00
Sebastian Dröge
f5381ba9f5 audioaggregator: Log if the sample rate of one sinkpad is not accepted
Otherwise this can silently cause not-negotiated errors without any
direct hint about what went wrong.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1049>
2021-02-24 19:53:02 +02:00
Philipp Zabel
e885e0e1d7 v4l2videodec: fix src side frame rate negotiation
Negotiating v4l2h264dec ! v4l2h264enc transcoding pipelines fails in
case the encoder does not accept framerate=(fraction)0/1.
The acquired caps used for downstream negotiation are determined from
gst_v4l2_object_acquire_format(), which sets the GstVideoInfo::fps_n
and ::fps_d fields to 0.
To fix this, copy the frame rate from the sink side.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/882>
2021-02-24 17:15:49 +01:00
Guillaume Desmottes
3e27558095 miniobject: add GST_TYPE_MINI_OBJECT
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/764>
2021-02-24 13:13:07 +01:00
P H
d41dea6f62 Update toolkit-integration.md for typo in compile command
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/143>
2021-02-24 08:53:31 +00:00
Haihao Xiang
54091d0290 msdk: allow user specify a drm device via an env variable
User may specify the required device via GST_MSDK_DRM_DEVICE

Example:
GST_MSDK_DRM_DEVICE=/dev/dri/card0 gst-launch-1.0 videotestsrc ! msdkh264enc
! fakesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1953>
2021-02-24 04:40:14 +00:00
Francisco Javier Velázquez-García
740ea66e73 videotestsrc.c: Correct left shift operator
Use the left shift operator '<<' instead of the mistakenly typed less
than operator '<'.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1047>
2021-02-23 14:53:43 +01:00
He Junyan
e15be4cf0f VA: Add the vaav1dec element as the av1 decoder.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
2021-02-23 13:53:43 +08:00
He Junyan
a119a940e4 VA: Add the aux surface for gst buffer used by decoder.
The AV1 codec needs to support the film grain feature. When the film
grain feature is enabled, we need two surfaces as the output of the
decoded picture, one without film grain effect and the other one with
it. The first one acts as the reference and is needed for later pictures'
reconstruction, and the second one is the real display output.
So we need to attach another aux surface to the gst buffer/mem and make
that aux surface as the target of vaBeginPicture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
2021-02-23 13:52:50 +08:00
He Junyan
e40e78a793 VA: Add a helper function of decoder_add_slice_buffer_with_n_params.
Some codecs such as AV1 needs several parameters associated with one
slice. It may have multi tiles within one slice and each tile needs
its description parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
2021-02-23 13:51:00 +08:00
He Junyan
315b101394 codecs: AV1decoder: Add the AV1 decoder base class.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
2021-02-23 13:50:51 +08:00
He Junyan
430aa327a8 va: allocator: replace assert with error log in va alloc.
We should print error log rather than assert when the forcc or
the rt_format of va allocator is unrecognized.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
2021-02-23 13:47:29 +08:00
Vivia Nikolaidou
1517b7043d video-converter: Don't upsample/downsample/dither invalid lines
This is a fallout from the conversion to support multiple threads.
convert->upsample_p is never NULL now, it's always an allocated array of
n_threads potentially-null pointers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1043>
2021-02-23 03:40:12 +00:00
Seungha Yang
8794f4b713 d3d11: Documentation update
* Update class metadata
  * for wrapper bin elements to be distinguishable from internal element.
  * D3D11 -> Direct3D11 for consistency
* Add missing Since mark everywhere
* Update plugin cache

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2029>
2021-02-23 03:34:11 +09:00
Seungha Yang
6c6237fe50 d3d11: Reorganize class hierarchy of convert elements
AS-IS:
D3D11Convert class is baseclass of D3D11ColorConvert and D3D11Scale
* GstD3D11Convert
  |_ GstD3D11ColorConvert
  |_ GstD3D11Scale

TO-BE:
Introducing a new base class for color conversion and/or rescale elements
* GstD3D11BaseConvert
  |_ GstD3D11Convert
  |_ GstD3D11ColorConvert
  |_ GstD3D11Scale

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2029>
2021-02-23 01:49:54 +09:00
Seungha Yang
ceebdeba41 symbols: Address GType name change of d3d11convert after 1.18 release
GType name of d3d11convert element is GstD3D11Convert now

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/142>
2021-02-23 01:45:26 +09:00
Jeongki Kim
fd41fca7f3 audioresample: Respect buffer layout when drain
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1045>
2021-02-22 15:36:53 +09:00
Seungha Yang
7330ea8dbf d3d11deinterlace: Add missing system memory caps features on templates
This element can support system memory

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2029>
2021-02-21 17:35:40 +09:00
Jordan Petridis
1257e50d49 rpicamsrc: depend on posix threads and vchiq_arm
Could only test on rpi 3b+

Close #839

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/875>
2021-02-21 00:18:34 +00:00
Víctor Manuel Jáquez Leal
2696a2795d va: filter, vpp: process colorimetry
A new filter method were added: gst_va_filter_set_formats(). In this
way the input & output GstVideoInfo are processed only once per stream
negotiation, and not per frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>
2021-02-20 17:03:43 +00:00
Víctor Manuel Jáquez Leal
d4682fa136 va: filter: check if filter is open on set_orientation()
Because the method requires pipeline_caps is filled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>
2021-02-20 17:03:43 +00:00
Víctor Manuel Jáquez Leal
812973fb6b va: filter: human readable background color
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>
2021-02-20 17:03:43 +00:00
Víctor Manuel Jáquez Leal
c6c71c0c0c va: filter: fail immediately if vaBeginPicture() fails
There's no need to try vaRenderPicture() if vaBeginPicture() failed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>
2021-02-20 17:03:43 +00:00
Víctor Manuel Jáquez Leal
b7988b4de8 va: filter: destroy pipeline buffer after destroying filters
In 6ae24948 the pipeline buffer destroy were removing assuming it
wasn't required. Nonetheless, debugging the code it looks like a
buffer leak in iHD driver since the ID of the buffer kept increasing.

The difference now is that first the filter buffers are destroy first
and later the pipeline buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2023>
2021-02-20 17:03:43 +00:00
Nicolas Dufresne
bb29b8f8d2 v4l2bufferpool: Silence traces around unsupported source change
Don't be too spamy about unsupported source change flags as these will be
commonly extended in the future.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne
409ea3ac84 v4l2src: Move preferred resolution query before the probe
As we lock the DV_TIMINGS (and standards in the future), we need to probe the
caps after, otherwise, we may endup fixating to an unsupported resolution,
which would lead to a not-negotiated error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne
b530c0ef4e v4l2src: Calculate framerate from DV timings
And use this framerate in our preference. Note that we also flush
the probed caps as it seems that the format enumeration may change
when a new source change event get triggered.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne
25696203c3 v4l2rc: Add DV_TIMINGS query and locking
This adds support to DV_TIMINGS query and locking. The timing width and
height is then used as a preference.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne
b750fb2d5b v4l2src: Force renegotiation on resolution change
As mandated by the specification, make sure to cycle through streamoff
/ streamon regardless if the caps have changed or not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne
7b8fe18d06 v4l2object: Remove unused streaming member
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne
afb412b75d v4l2src: Refactor to use PreferredCapsInfo structure
Avoid passing around a bare structure for the preference, this removes
the need to copy and free that structure and simplify the code. Also
fix a type in the structure name, Prefered -> Preferred.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne
c0fdaffc55 v4l2src: Stub preferred resolution support
This stubs the ability to use preferred resolution from digital
video timings, analog TV standards or driver reported native
resolution.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne
1b21c1b15b v4l2: Subscribe source_change for the current input
When we subscribe for source-change event, we need to specify for which
input. Make sure we subscribe for the current input.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne
c386aa43cc v4l2src: Add input signal status detection
As part of the support to select a preferred size, we can also
detect the signal status. This is a split patch so that feature
is separated to ease review.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne
293abe0675 v4l2: Add helper to query input status
This is a wrapper around ENUM_INPUT renamed for readability.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne
ba3eddebc8 v4l2: Fix input/output index sign
This is an unsigned integer in the kernel API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne
1094e2548e v4l2src: Add source resolution change support
This patch adds support for source resolution change detection.
Resolution change is signaled by drivers when a change in the detected
signal have been detected. This is notably seen on HDMI receivers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne
bb1d9b398e v4l2bufferpool: Handle resolution change event
This patch adds the detection, dequeuing and reporting of the SOURCE_CHANGE
event when the CH_RESOLUTION flag is set. The acquire function will now return
a new custom success called GST_V4L2_FLOW_RESOLUTION_CHANGE. In order to use
this new feature, elements must enable it by calling:

  gst_v4l2_buffer_pool_enable_resolution_change (pool);

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne
4be9bf4085 v4l2object: Add event helpers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 16:02:02 -05:00
Nicolas Dufresne
954e38a6b9 v4l2bufferpool: use FLOW_LAST_BUFFER
This uses the GST_V4L2_FLOW_LAST_BUFFER alias instead of
GST_FLOW_CUSTOM_SUCCESS to make the code more readable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>
2021-02-19 15:22:47 -05:00
Lucas Stach
1b1ad32b90 v4l2object: prefer NV12 over I420
Considering NV12 an 'odd' format is a historical artifact. This format
is now quite common, and usually preferable to I420 due to more memory
friendly access patterns.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/857>
2021-02-19 13:12:54 -05:00
He Junyan
2e9a096282 va: vpp: Add raw buffer copy when needed.
Just like the decoder, the vapostproc also needs to copy the output
buffer to raw buffer if downstream elements only supports raw caps
and does not support the video meta.

The pipeline like:
  gst-launch-1.0 filesrc location=xxxx ! h264parse ! vah264dec ! \
  vapostproc ! capsfilter caps=video/x-raw,width=55,height=128 ! \
  filesink location=xxx
needs this logic to dump the data correctly.

fixes: #1523

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2026>
2021-02-19 23:12:29 +08:00