Generic DMABUF to vaapi h264 encoding

Nicolas Dufresne nicolas.dufresne at collabora.com
Tue Jul 21 08:42:58 PDT 2015


Le mardi 21 juillet 2015 à 14:47 +0200, Volker Vogelhuber a écrit :
> GstBuffer* buffer = gst_buffer_new();
> GstMemory* mem = gst_dmabuf_allocator_alloc( dmaAllocator, fd, height 
> * 
> stride )
> gst_buffer_append_memory(buffer, mem);
> gsize offset[GST_VIDEO_MAX_PLANES] = {0, 0, 0, 0};
> gint stride[GST_VIDEO_MAX_PLANES] = {2048 * 4, 0, 0, 0};
> 
> gst_buffer_add_video_meta_full(
>    buffer,
>    GST_VIDEO_FRAME_FLAG_NONE,
>    GST_VIDEO_FORMAT_xRGB,
>    1920,1080, 1,
>    offset, stride
> );
> 
> but obviously I'm doing something wrong, because if I provide such a 
> buffer
> to the appsrc filter nothing is encoded.

It's not clear if vaapiencode can really import xRGB and encode it. I'd
suggest trying to chance with vaapipostproc before the encoder. It's
likely that these dmabuf are not mappable from user space, so that may
explain why the encoder didn't fallback.

Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150721/38426e26/attachment.sig>


More information about the gstreamer-devel mailing list