appsrc performance issue
mksafavi
mksafavi at gmail.com
Tue Jan 7 06:16:26 UTC 2020
Hi.
when I push my buffer to appsrc it takes too much time. (about 20ms for each
buffer).
I want this process to be zero-copy.
my data after processing is stored in a physically contiguous array pointer
(data->dest_vptr).
then I wrapped this array on a gst_memory and append it to the out_buffer
which I push to appsrc.
out_buffer = gst_buffer_new();
gst_buffer_append_memory (out_buffer,gst_memory_new_wrapped
(GST_MEMORY_FLAG_READONLY,data->dest_vptr, DEST_BUF_SIZE, 0, DEST_BUF_SIZE,
NULL, NULL));
source = gst_bin_get_by_name(GST_BIN(data->sink), "testsource");
ret = gst_app_src_push_buffer(GST_APP_SRC(source), out_buffer);
return ret;
in my pipeline, I have an accelerator that takes 19ms to finish its job.
filesrc -> decoder -> encoder -> filesink : 10ms per frame
filesrc -> decoder -> appsink -> [accelerator] -> appsrc -> encoder ->
filesink : 50ms per frame ( expecting approximately 30ms)
apprsc parameters:
testsource = gst_bin_get_by_name(GST_BIN(data->sink), "testsource");
g_object_set(testsource, "format", GST_FORMAT_TIME, "block", FALSE,
NULL);
gst_object_unref(testsource);
Am I doing an unnecessary copy somewhere? or having bad appsrc parameter
settings?
I also checked with fake sink directly after appsrc and made sure the appsrc
is bottlenecking.
thanks
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list