Note that there are some explanatory texts on larger screens.

plurals
  1. POQML and QtGStreamer within plugin
    text
    copied!<p>I'm trying to prepare QML plugin to play video on embedded device in a way that other developers can use it without much hassle. However the way it is currently proposed requires almost always writing some C++ wrapper around your QML application. I'm refering to this example: <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/examples_2qmlplayer_2main_8cpp-example.html" rel="nofollow">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/examples_2qmlplayer_2main_8cpp-example.html</a></p> <p>I would like to be able to have plugin and simply write:</p> <pre><code>import AwesomeVideoPlugin 1.0 Rect { AwesomeVideo { width: 320 height: 240 url: "./myvideo.avi" // ... some minor stuff like mouse click handling, controls, etc. } } </code></pre> <p>Currently QtGStreamer requires to provide videoSurface property to VideoItem. The only way to do this is to create and set context for additional property in rootContext(). And to create GraphicsVideoSurface I need QGraphicsView (QDeclarativeView fills this role).</p> <p>Is it possible to:</p> <ol> <li><p>Get QDeclarativeView from within QDeclarativeItem (to which I have only access from QML plugin) in a way that it can be later used to feed GraphicsVideoSurface? My guess is no - however I've found path QFraphicsItem::scene() ==> <em>QGraphScene ==> QGraphScene::views() ==> QList of QGraphicsView</em> - it looks like VERY bad programming but maybe somebody got it to work (I'm getting segfault)</p></li> <li><p>Is there other way to provide video sink for QtGStreamer from within QDeclarativeItem ?</p></li> </ol> <p>Greetz</p> <p>Yatsa</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload