Age | Commit message (Collapse) | Author | Files | Lines |
|
It seems "GST_VAAPI_PLUGIN_BASE_SRC_PAD_CAN_DMABUF (decode)" will
return false even if this platform support the mem_type dma buffer.
And media-driver will return GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF2
on Gen12(such as TGL).
Without this patch, The command such as:
gst-launch-1.0 videotestsrc num-buffers=100 ! video/x-raw, format=I420 ! \
x264enc ! h264parse ! vaapih264dec ! video/x-raw\(memory:DMABuf\) ! fakesink
will return not-negotiated.
Signed-off-by: Zhang Yuankun <yuankunx.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/437>
|
|
Just like what we do in VA plugins. The display can be seen as a
generic gst object and we can add a property to get the internal
VA handle.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/435>
|
|
Just like what we do in VA plugins, the GST_MAP_VAAPI can directly
peek the surface of the VA buffers. The old flag 0 just peek the
surface proxy, which may not be convenient for the users who do not
want to include our headers.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/435>
|
|
This reverts commit 7a25c5d4ec95aefeca6515ac023b23c5dd330194.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/436>
|
|
We call gst_vaapiencode_drain() in gst_vaapiencode_change_state(),
whose context does not hold the stream lock of the encoder. The
current gst_vaapiencode_drain inside unlock/lock pair adds a extra
lock count to the stream lock of encoder and causes hang later.
We just remove the gst_vaapiencode_drain() and expand its logic
correctly according to the lock/unlock context.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/433>
|
|
One of the main reasons of vaapidecodebin was because it mitigated the
possible surface exhaustion. But that problem is currently
solved. Nowadays, vaapidecodebin brings more problems than it
solves. Thus this patch demotes vaapidecodebin to NONE rank while
bumping PRIMARY + 1 the most common decoders.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/426>
|
|
Since almost all video filters have rank NONE, these both elements
should be NONE too.
This is useful for autovideoconvert and other bins, and users might
force to use these by setting the environment variable
GST_PLUGIN_FEATURE_RANK.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/429>
|
|
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead. GCC 11 has started warning about using volatile
with atomic operations.
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/418>
|
|
We should query the downstream element to answer a precise allocation
query when the passthrough mode is enabled.
The current way still decides the allocation by the postproc itself. The
pipeline such as:
gst-launch-1.0 -v filesrc location=xxx.264 ! h264parse ! vaapih264dec ! \
vaapipostproc ! fakevideosink silent=false sync=true
will lose some info such as the GST_VIDEO_META_API_TYPE.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/413>
|
|
Attributes for drm backend:
- va-display : ponter of VADisplay
- drm-device-fd : the DRM device file descriptor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/409>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/191>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/406>
|
|
The current encoder will hang when EOS comes. When we call the
gst_vaapi_encoder_encode_and_queue(), we should release the stream
lock, just like what we do in gst_vaapiencode_handle_frame().
The deadlock happens when: The input thread holding the stream lock
is using gst_vaapi_encoder_create_coded_buffer() to acquire a coded
buffer, while the output thread which holding the coded buffer resource
is acquiring the stream lock in _push_frame() to push the data to
down stream element.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/404>
|
|
We store the allowed profiles list to encoder in set_config().
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/380>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/380>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/390>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/390>
|
|
If the pad is already fixed the caps query have to be reply with the
current fixed caps. Otherwise the query has to be replied with the
autogeneratd src caps.
This path fix this by falling back to the normal caps query processing
if the pad is already fixed. Otherwise it will fetch the allowed src
pad caps.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/397>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/392>
|
|
When an element upstream changes settings (e.g. crop), new caps are sent
to vaapisink. When vaapisink was rotating the image, it needs to
re-evaluate if the sink needs to rotate the image.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/389>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/385>
|
|
We do not need to ref the allocator when creating GstVaapiVideoMemory
kind memory, and then release it in _free(). The framework already
does it for us.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/383>
|
|
Since commit 9f627ef2 if the user sets level in the encoder src caps
the caps negotiation is rejected.
But since the same commit the same encoder set the autoconfigured
level in caps. Some change in the base class might fixed the operation
order so now the caps are set and later negotiated.
This patch removes the level check.
Fixes: #273
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/382>
|
|
Since nobody uses it, just remove it.
Thus extract_allowed_surface_formats() is refactored to attend only
gst_vaapi_plugin_base_get_allowed_sinkpad_raw_caps().
Now a surface is created when the image chorma is different from the
previous one. And if the driver has the quirk, it outputs all the
supported image formats without trying them.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/381>
|
|
The try-and-error approach for getting the possible image formats from
a surface has brought several problems in different drivers, from
crashes to drop in performance.
Instead of that we change the algorithm to determine the possible
image formats based in the surface chroma: only those available image
formats with same chroma are exposed as possible raw caps.
Do this is important to avoid performance degrading in raw sinks
which doesn't handle NV12 but it does YV12 or I420.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/381>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/378>
|
|
Implements new vmethod gst_vaapi_window_set_render_rectangle,
which is doing set the information of the rendered rectangle set by
user.
This is necessary on wayland at least to get exact information of
external surface.
And vaapisink calls this when gst_video_overlay_set_render_rectangle is
called.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/342>
|
|
Implements gst_vaapisink_wayland_create_window_from_handle() to support
using external wl_surface.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/342>
|
|
This utility function is called internally by
gst_vaapi_build_caps_from_formats() and can be used outside.
This function sets frame size and framerates ranges.
Also gst_vaapi_build_caps_from_formats() is simplified.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/374>
|
|
We should collect all allowed profiles and pass them to the inside
encoder, rather than just calculate the max profile idc.
The allowed profiles should also be supported by the HW.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/349>
|
|
We should collect all allowed profiles and pass them to the inside
encoder, rather than just calculate the max profile idc.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/349>
|
|
In h265, bigger profile idc may not be compatible with the small profile
idc. And more important, there are multi profiles with the same profile
idc. Such as main-422-10, main-444 and main-444-10, they all have profile
idc 4.
So recording the max profile idc is not enough, the encoder needs to know
all allowed profiles when deciding the real profile.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/349>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/371>
|
|
Generalize the way how the preferred color format is chosen. Also
use new GStreamre API as syntatic sugar.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/370>
|
|
There is no need to get a profile from the caps and then convert
that profile into codec type. We can get the codec type by caps's
name easily.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/358>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/188>
|
|
Change its name to encoder_get_profiles_from_caps(). Other codecs such
as VP9 also needs to use this function.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/188>
|
|
This commit fixes a regression of e962069d, where if the profile's
caps doesn't have a caps profile, it's ignored.
This patch add a conditional jump if the caps doesn't have a profile
field to merge it.
Fixes: #271
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/368>
|
|
This fix pipelines without vaapipostproc after vaapi decoder, such as
gst-launch-1.0 filesrc location=~/file.mp4 ! parsebin ! vaapih264dec ! glimagesink
On EGL platforms, so DMABuf is used.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/366>
|
|
Instead of using just the template caps use the current allowed
srcpad caps, which is created considering the current decoder
context.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/366>
|
|
Instead of generating allowed srcpad caps with generic information,
now it takes the size an formats limits from the decoder's context.
This is possible since srcpad caps are generated after the internal
decoder is created.
The patch replaces gst_vaapi_decoder_get_surface_formats() with
gst_vaapi_decoder_get_suface_attributes().
From these attributes, formats are only used for VASurface memory
caps feature. For system memory caps feature, the old
gst_vaapi_plugin_get_allowed_srcpad_caps() is still used, since
i965 jpeg decoder cannot deliver mappable format for gstreamer.
And for the other caps features (dmabuf and texture upload) the
same static list are used.
This patch also adds DMABuf caps feature only if the context
supports that memory type. Nonetheless, we keep the pre-defined
formats since they are the subset of common derive formats formats
supported either by amd/gallium and both intel drivers, since,
when exporting the fd through vaAcquireBufferHandle()/
vaReleaseBufferHandle(), the formats of the derivable image cannot
be retriebable from the driver. Later we'll use the attribute
formats for the DMABuf feature too, when the code be ported to
vaExportSurfaceHandle().
Finally, the allowed srcpad caps are removed if the internal decoder
is destroyed, since context attribues will change.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/366>
|
|
Since negotiation depends on caps order, first is VA, then DMABuf,
later GLUploadTexture (deprecated) and finally raw.
Also, for decoders, the possible available color formats for DMABuf
is extended to all the possible VA color formats.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/366>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/365>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/354>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/354>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/354>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/354>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/354>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/354>
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/354>
|