GstPushSrc needs to execute part of its _fill routine under the main thread.
Stirling Westrup
swestrup at gmail.com
Wed Dec 11 09:13:02 PST 2013
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.
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.
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.
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.
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.
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.
I've tried everything I can think of, but the QWebView object *insists* on
being run in the main thread.
--
Stirling Westrup
Programmer, Entrepreneur.
https://www.linkedin.com/e/fpf/77228
http://www.linkedin.com/in/swestrup
http://technaut.livejournal.com
http://sourceforge.net/users/stirlingwestrup
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131211/aa76a713/attachment.html>
More information about the gstreamer-devel
mailing list