[Libva] Problem with vaapipostproc element
Engin Firat
engin.firat at adonissyazilim.com
Fri Dec 12 07:47:52 PST 2014
Hello,
I have a problem related to element called vaapipostproc. The problem is as
follows:
I have a pipeline and for specified time intervals I attempt to change
pipeline dynamically in order to change write location of the filesink. I
have implemented this functionality and everything works well in case I do
not use vaapipostproc element. If I use vaapipostproc element, the pipeline
crashes unexpectedly. An error message is thrown from the element
vaapipostproc: "failed to create output video buffer" at the immediate
point the pipeline is changed dynamically.
My pipeline change strategy is as follows:
0. Create a bin and place mux and filesink elements inside it. Moreover
create a queue element before this bin.
1. For specified intervals, fire a clock event and catch it in a handler
2. In clock handler place a blocking probe to queue's source pad and
register a blocking data handler
3. In blocking data handler unlink queue and bin and send an EOS event to
bin's sink pad.
4. Handle EOS event on bin element. In this handler, destroy bin, create a
new bin with an updated filesink location connect bin with queue. And
remove the blocking probe.
This strategy for dynamic pipeline changing works well when I do not use
vaapipostproc element. But I want to do encoding process on GPU and using
vaapipostproc is a mandatory.
I have inspected the source code gstvaapipostproc.c for element
vaapipostproc and It seem the problem is related to function named as
*GstBuffer
* create_output_buffer(GstVaapiPostproc*)*.
You can find output messages when GST_DEBUG environment variable is set to
4. In addition to this, you can also find my implementation to change the
pipeline dynamically. The implementation won't compile, I just want to
share a pseudo-code for your well understanding of the implementation.
I want to share the most interesting part of the out.log file:
0:00:11.075920072 [334m11325 [00m 0x1dcc720 [36mINFO [00m * [00m
vaapipostproc
gstvaapipluginbase.c:532:gst_vaapi_plugin_base_decide_allocation:<GPUPostProcessing>
[00m no pool or doesn't support GstVaapiVideoMeta, making new pool*
0:00:11.076231088 [334m11325 [00m 0x1dcc720 [36mINFO [00m [00m
vaapivideomemory gstvaapivideomemory.c:627:gst_vaapi_video_allocator_new:
[00m has direct-rendering for NV12 surfaces: no
*0:00:11.076568949 [334m11325 [00m 0x1dcc720 [31;01mERROR [00m [00m
vaapipostproc gstvaapipostproc.c:412:create_output_buffer: [00m
failed to create output video buffer*
0:00:11.076723161 [334m11325 [00m 0x1dcc720 [33;01mWARN [00m [00m
basetransform
gstbasetransform.c:2130:gst_base_transform_handle_buffer:<GPUPostProcessing>
[00m could not get buffer from pool: error
0:00:11.076773273 [334m11325 [00m 0x1dcc720 [36mINFO [00m * [00m
task gsttask.c:300:gst_task_func:<queue0:src> [00m Task going to
paused*
How can I solve this problem? Any help will be appreciated.
Regards.
Engin FIRAT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libva/attachments/20141212/8cd965b5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: out.log
Type: text/x-log
Size: 133772 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libva/attachments/20141212/8cd965b5/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: implementation.c
Type: text/x-csrc
Size: 6869 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libva/attachments/20141212/8cd965b5/attachment-0001.c>
More information about the Libva
mailing list