Hi everybody !
I'm toying with OF on Raspberry3 with ofVideoGrabber. Everything is fine, captured frames are drawn on screen.
Now, just for my own understanding I would like to setup things myself, and initialize ofGstVideoGrabber's pipeline with the same settings than those provided by ofVideoGrabber. If I understand how the process works I would be able to tweak and experiment with ofGstVideoGrabber
So, I modified my app::init source code with
ofGstVideoUtils *gstUtil = gstGrabber->getGstVideoUtils();
"v4l2src name=video_source device=/dev/video0 ! video/x-raw,format=RGB,width=640,height=480,framerate=30/1 ", OF_PIXELS_RGB, false, 640, 380);
During app's startup, the logged string pipeline is exactly the same that I got with barebone ofVideoGrabber
[notice ] ofGstUtils: setPipelineWithSink(): gstreamer pipeline: v4l2src name=video_source device=/dev/video0 ! video/x-raw,format=RGB,width=640,height=480,framerate=30/1 ! appsink name=ofappsink enable-last-sample=0 caps="video/x-raw, format=RGB, width=640, height=380"
But the initialization fails with two errors
[ error ] ofGstUtils: setPipelineWithSink(): couldn't create pipeline: could not link video_source to ofappsink
[ error ] ofGstUtils: gstHandleMessage(): embedded video playback halted for plugin, module video_source reported: Internal data flow error.
I've digged into ofVideoGrabber::setup and ofGstVideoGrabber::setup source code but I don't understand what I'm missing...
Any idea ?