<div dir="ltr"><div><div><div><div><div><div>I am currently working on an element that integrates QT and its port of WebKit into a source element that can be used for browsing.<br><br></div>I have run into a number of issues, mostly due to QT insisting that QApplication, QWebView and other objects run in the main program thread, or they crash.<br>
<br></div>I have managed to find ways around these issues for the most part, but have come across one that has me stumped. When filling out a buffer in the GstPushSrc _fill callback, I need to create a QImage from the buffer, and then call QWebView::render() on that QImage. The problem is that the _fill routines is called in a different thread than QWebView::render needs to be run in.<br>
<br></div>Ideally, I imagine a solution to this problem would be to have a non-blocking routine inserted into the main gst event loop, and each time around the loop that routine would check if there was rendering to do, and if so would perform the render operation.<br>
<br></div>Then the _fill routine would need to set things up for the render operation, somehow trigger the main event loop, and then wait on a 'done' signal of some sort.<br><br></div>Now, I have *NO IDEA* how to achieve this, or even if its a good idea. I fear that suspending the _fill routine in the middle and causing the event-loop to cycle could have all sorts of repercussions I know nothing about, but I've basically run out of other ideas.<br>
<br></div>I've tried everything I can think of, but the QWebView object *insists* on being run in the main thread.<br><br><div><div><div><div><br><br clear="all"><div><div><div><br>-- <br>Stirling Westrup<br>Programmer, Entrepreneur.<br>
<a href="https://www.linkedin.com/e/fpf/77228" target="_blank">https://www.linkedin.com/e/fpf/77228</a><br><a href="http://www.linkedin.com/in/swestrup" target="_blank">http://www.linkedin.com/in/swestrup</a><br><a href="http://technaut.livejournal.com" target="_blank">http://technaut.livejournal.com</a><br>
<a href="http://sourceforge.net/users/stirlingwestrup" target="_blank">http://sourceforge.net/users/stirlingwestrup</a>
</div></div></div></div></div></div></div></div>