Commit graph

113094 commits

Author SHA1 Message Date
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
Jan Schmidt
22528c4d96 Update check_keyframes_in_compositor_two_sources
Update the validate expectation for videoconvert caps changes in
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1033

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/229>
2021-02-19 21:01:29 +11:00
Jan Schmidt
ebad39b865 videoconvert: Only prefer upstream chroma-site with same subsampling.
If converting YUV formats with different chroma-subsampling, there's
probably no good reason to prefer the upstream chroma-siting so just use
the default for the output format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1033>
2021-02-19 09:45:07 +00:00
Jan Schmidt
eabb2c1802 videoconvert: Implement more sophisticated colorimetry caps transfer
Implement a more sophisticated transfer of colorimetry and
chroma-site fields to output caps when fixating.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1033>
2021-02-19 09:45:07 +00:00
Jan Schmidt
98bdc76fa5 videoconvert: Forward colorimetry and chroma-site from upstream.
If downstream has expressed no preference for particular colorimetry
and chroma-site configuration, transfer them from the input caps.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/614

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1033>
2021-02-19 09:45:07 +00:00
Stéphane Cerveau
8bf7816790 decodebin3: change stream selection message owner
In order to select the streams on GST_MESSAGE_STREAM_COLLECTION,
the app needs to send the select-streams event
to the decodebin and not to the parsebin.

The message should be always owned by the decodebin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1014>
2021-02-19 08:01:57 +00:00
Tim-Philipp Müller
438449db69 sdpsrc: fix double free if sdp is provided as string via the property
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1532

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2025>
2021-02-19 00:05:41 +00:00
Guillaume Desmottes
1796f3f5e4 wavparse: fix seeking in READY state
wavparse claims to be able to support seeking in the READY state by
saving the pending seek event and actually seeking later after having parsed the
header.
Problem was that this seek event was reset on the READY to PAUSED
transition, making all this code useless. Fixing it by stop resetting
on READY to PAUSED transition as we already reset on PAUSED to READY
and when initiating the element.

Note that DTS marker detection isn't support in such scenario as
gst_type_find_helper_for_buffer() needs a buffer containing the
beginning of the stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/879>
2021-02-18 16:32:24 +01:00
Seungha Yang
8d1a79e520 wasapi2device: Make wasapi2 device distinguishable from wasapi device
Both wasapi2 and wasapi plugins use WASAPI API. So "device.api=wasapi"
would make sense for the wasapi2 plugin as well. But people would be
confused by the identical "device.api=wasapi" property if intended
plugin is wasapi, not wasapi2. This change will make them distinguishable
by using "device.api" device property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2024>
2021-02-18 21:46:08 +09:00
Seungha Yang
6da109cdb0 wasapi2: Always build if Windows 10 SDK is available
Add support for building wasapi2 plugin if Windows 10 SDK is
available on system

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1951>
2021-02-18 19:46:17 +09:00
Guillaume Desmottes
4aa39da2d3 tests: wavparse: factor out create_pipeline()
No semantic change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/879>
2021-02-18 10:38:18 +01:00
Vivia Nikolaidou
2527c8f9f8 libs: audio: Handle meta changes in gst_audio_buffer_truncate
Set timestamp and duration to GST_CLOCK_TIME_NONE unless trim==0,
because that function doesn't know the rate and therefore can't
calculate them. Set offset and offset_end to appropriate values. Make it
clear in the documentation that the caller is responsible for setting
the timestamp and duration.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/869

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1039>
2021-02-18 11:25:32 +02:00
Nirbheek Chauhan
2c0ab5f8a1 gitlab/cerbero: Don't fail when there's no macOS cache
`test -d "${CERBERO_HOME}/dist/${ARCH}"` will cause the build to error
out if the dist dir doesn't exist, which will happen if there's no
cache, for example:
https://gitlab.freedesktop.org/seungha.yang/gst-plugins-bad/-/jobs/7405565

What we actually want to do, is to not perform the rsync if there's no
cache, since it means we want to rebuild from scratch; for instance,
if the current MR uses a custom cerbero branch of the same name which
won't have a prebuilt cache.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/398>
2021-02-18 14:52:32 +05:30