Fwd: framerate very slow pushing samples to appsrc

Blaine Bell blaine at blainebell.org
Mon Jun 11 13:41:40 UTC 2018


Hi all,

I am using appsrc to push video samples at a frequency of 20-30 frames
per second.  I have tried many things, but currently the video server's
pipeline is this:

appsrc is-live=true name=mysrc ! multiudpsink clients=10.178.1.130:5002

and receiving the video is this:

gst-launch-1.0 udpsrc port=5002 ! jpegparse ! avdec_mjpeg ! videoconvert
! fpsdisplaysink

For some reason displaying the video produces a video that is around 1
frame per second.  I have also tried to do some of the video
computations on the server with little success.

The code I am using to push the samples onto the appsrc is:

       pair<void*,int> sampleData = gstreamerVideoSrc->allSamples.front();
       GstBuffer *buffer;
       dplong curtime = getCurrentTime();
       buffer = gst_buffer_new_wrapped(sampleData.first, sampleData.second);
       GstSample *sample = gst_sample_new(buffer, NULL, NULL, NULL);
       GstFlowReturn ret = gst_app_src_push_sample(gstreamerVideoSrc->appsrc, sample);

I am getting a correct return value (i.e.,ret=0) from  gst_app_src_push_sample.
I have also tried to do these gst_app_src_push_sample() calls in a
separate thread, with the same results.  Does anyone know what I am
doing wrong?

Thanks in advance!

Blaine




More information about the gstreamer-devel mailing list