wpe: Crash adding a 2nd WPE src to a running pipeline
I have a use case where an app is creating pipelines with wpesrc in them doing software rendering. The first always works, 2nd or subsequent pipelines are racy and sometimes fail with the src->view->buffer () in gst_wpe_src_create() returning NULL.
I'm testing git master with threading fixes from !1484 (merged) plus EGL/GLX context fixes from #1385 (closed) - plus a patch to not crash when the WPEView fails to generate a buffer.
0:00:29.170420205 262471 0x7fb4e8002360 INFO wpesrc gstwpesrc.cpp:253:gst_wpe_src_start:<vsrc> Starting up
0:00:29.170429124 262471 0x7fb4e8002360 DEBUG wpesrc gstwpesrc.cpp:265:gst_wpe_src_start:<vsrc> Will fill GLMemories: 0
0:00:29.170435831 262471 0x7fb4e8002360 DEBUG wpesrc WPEThreadedView.cpp:169:createWPEView: context (nil) display (nil), size (1920,1080)
0:00:29.170469229 262471 0x7fb548006460 DEBUG wpesrc WPEThreadedView.cpp:247:WPEView: FDO SHM initialisation result: 1
0:00:29.170637661 262471 0x7fb548006460 DEBUG wpesrc WPEThreadedView.cpp:443:setDrawBackground: Disabling background rendering
0:00:29.170646897 262471 0x7fb548006460 DEBUG wpesrc WPEThreadedView.cpp:420:loadUriUnlocked: loading https://facebook.com/
0:00:29.176492986 262471 0x7fb4e8002360 DEBUG wpesrc WPEThreadedView.cpp:192:createWPEView: waiting load to finish
0:00:29.192339514 262471 0x7fb548006460 TRACE wpesrc WPEThreadedView.cpp:505:operator(): Dispatch release exported buffer 0x7fb53c08b290
0:00:29.192415188 262471 0x7fb58808a580 TRACE wpesrc WPEThreadedView.cpp:408:frameComplete: frame complete
0:00:29.192441960 262471 0x7fb548006460 TRACE wpesrc WPEThreadedView.cpp:410:operator(): dispatching
0:00:29.196072473 262471 0x7fb58808a580 LOG wpesrc gstwpesrc.cpp:202:gst_wpe_src_create:<vsrc> Created buffer from SHM buffer: 0x7fb550008120, pts 0:00:07.440000000, dts 99:99:99.999999999, dur 0:00:00.040000000, size 8294400, offset 186, offset_end 187, flags 0x0
0:00:29.204181476 262471 0x7fb548006460 TRACE wpesrc WPEThreadedView.cpp:545:handleExportedBuffer: SHM buffer 0x7fb53c03c4f0 wrapped in buffer buffer: 0x7fb53c075360, pts 99:99:99.999999999, dts 99:99:99.999999999, dur 99:99:99.999999999, size 8294400, offset none, offset_end none, flags 0x0
0:00:29.204298527 262471 0x7fb4e8002360 DEBUG wpesrc WPEThreadedView.cpp:196:createWPEView: done
0:00:29.204541648 262471 0x7fb4e8002360 TRACE wpesrc WPEThreadedView.cpp:369:buffer: pending (NULL) (0) committed (NULL) (0)
locked_buffer was NULL
0:00:29.204581174 262471 0x7fb4e8002360 WARN wpesrc gstwpesrc.cpp:181:gst_wpe_src_create:<vsrc> error: WPE View did not render a buffer