Generic DMABUF to vaapi h264 encoding
Volker Vogelhuber
v.vogelhuber at digitalendoscopy.de
Tue Jul 21 05:47:03 PDT 2015
I'm currently trying to get a DMABUF file descriptor I received
by using Mesa's eglExportDMABUFImageMESA into the appsrc
filter for encoding the data using an E3845 intel processor.
So far a gstreamer pipe for encoding dummy images is already
working but I wonder what would be the right way to get DMABUFs
into the pipe. As this is not a V4L2 exported DMABUF I guess the
usual samples using DMABUF-import from the V4L2 plugins do not work.
I started with the following:
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.
Regards,
Volker
More information about the gstreamer-devel
mailing list