[Bug 788229] plugins: memory:DMABuf only handles planar formats
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Thu Sep 28 13:53:56 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=788229
Konstantin Ripak <konstantin.ripak at cogentembedded.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |konstantin.ripak at cogentembe
| |dded.com
--- Comment #4 from Konstantin Ripak <konstantin.ripak at cogentembedded.com> ---
Actually, when I tried to render NV12 DMA buffer from vaapih264 decoder I faced
with the issue that strides/offsets in GstVideoMeta are wrong. The following
simplified snippet retrieves correct strides/offsets:
GstVaapiVideoMeta *meta = gst_buffer_get_vaapi_video_meta(buf);
GstVaapiSurface *surface = gst_vaapi_video_meta_get_surface(meta);
GstVaapiImage* image = gst_vaapi_surface_derive_image(surface);
VAImage va_image = {0};
gst_vaapi_image_get_image(image, &va_image))
gsize offsets[4] = {va_image.offsets[0],
va_image.offsets[1],
va_image.offsets[2],
0};
gint stride[4] = {va_image.pitches[0],
va_image.pitches[1],
va_image.pitches[2],
0};
GstVideoMeta* vmeta = gst_buffer_add_video_meta_full(outbuf,
GST_VIDEO_FRAME_FLAG_NONE, gst_vaapi_image_get_format(image),
va_image.width, va_image.height, va_image.num_planes, offsets, stride);
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list