GstBaseSrc calling create twice per frame?
Over at https://github.com/asajeffrey/my-gst-plugin/blob/master/src/myglsrc.rs I've got a gstreamer source that uses GstBaseSrcImpl
. Running it in a pipeline, it looks like create
is being called twice per frame? For example:
GST_DEBUG=myglsrc:4 gst-launch-1.0 myglsrc ! videorate ! video/x-raw\(memory:GLMemory\),framerate=50/1,width=512,height=512 ! glimagesink
produces output:
$ GST_DEBUG=myglsrc:4 GST_PLUGIN_PATH=target/gstplugins gst-launch-1.0 myglsrc ! videorate ! video/x-raw\(memory:GLMemory\),framerate=50/1,width=512,height=512 ! glimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayCocoa\)\ gldisplaycocoa0";
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.157872000 83500 0x7f947e9129e0 INFO myglsrc src/myglsrc.rs:254:gstmyplugin::myglsrc:<myglsrc0> fps = 0
WARNING: from element /GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLImageSink:sink: Pipeline construction is invalid, please add queues.
Additional debug info:
gstbasesink.c(1218): gboolean gst_base_sink_query_latency(GstBaseSink *, gboolean *, gboolean *, GstClockTime *, GstClockTime *) (): /GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLImageSink:sink:
Not enough buffering available for the processing deadline of 0:00:00.015000000, add enough queues to buffer 0:00:00.015000000 additional data. Shortening processing latency to 0:00:00.000000000.
0:00:01.151471000 83500 0x7f947e9129e0 INFO myglsrc src/myglsrc.rs:254:gstmyplugin::myglsrc:<myglsrc0> fps = 95
0:00:02.146986000 83500 0x7f947e9129e0 INFO myglsrc src/myglsrc.rs:254:gstmyplugin::myglsrc:<myglsrc0> fps = 97
0:00:03.151184000 83500 0x7f947e9129e0 INFO myglsrc src/myglsrc.rs:254:gstmyplugin::myglsrc:<myglsrc0> fps = 98
0:00:04.147028000 83500 0x7f947e9129e0 INFO myglsrc src/myglsrc.rs:254:gstmyplugin::myglsrc:<myglsrc0> fps = 98
0:00:05.147226000 83500 0x7f947e9129e0 INFO myglsrc src/myglsrc.rs:254:gstmyplugin::myglsrc:<myglsrc0> fps = 99
0:00:06.147184000 83500 0x7f947e9129e0 INFO myglsrc src/myglsrc.rs:254:gstmyplugin::myglsrc:<myglsrc0> fps = 99
0:00:07.147384000 83500 0x7f947e9129e0 INFO myglsrc src/myglsrc.rs:254:gstmyplugin::myglsrc:<myglsrc0> fps = 99
0:00:08.147300000 83500 0x7f947e9129e0 INFO myglsrc src/myglsrc.rs:254:gstmyplugin::myglsrc:<myglsrc0> fps = 99
0:00:09.147404000 83500 0x7f947e9129e0 INFO myglsrc src/myglsrc.rs:254:gstmyplugin::myglsrc:<myglsrc0> fps = 99