I'm working on a QML/C++ app that is deployed to Linux. I'm using a
VideoQML component to play streaming video which uses GStreamer v. 1.x as the backend.
I want to be able to configure the GStreamer backend, specifically by setting properties on the playbin gstelement that is created in
QGstreamerPlayerSessionin QT Multimedia. The way I achieve this now is by patching qgstreamerplayersession.cpp, enabling me to set the properties in the constructor of
Do you have any ideas of a better/cleaner way to do this without patching Qt Multimedia?
Hi and welcome to devnet,
AFAIK, no you can't without patching QtMultimedia. What properties do you need to modify ? Must it be done a construction time ?
If you need to manipulate the GStreamer pipeline the QtGstreamer module might be an interesting alternative.
I've added the following lines to the
flags |= GST_PLAY_FLAG_BUFFERING; g_object_set(G_OBJECT(m_playbin), "buffer-size", 5000000, NULL);
I'm not sure that it has to be done at construction but maybe just before actually playing something. But I don't see a way for me to get access to the
m_playbininstance from outside code.
QtGStreamer looks like a nice alternative, but I would have to integrate it with QML by myself? I also prefer to be working with vanilla Qt.
Indeed, you can't do it without modifying Qt even if you add a control to the plugin to modify that parameter.
QtGstreamer provides a QML sink so you don't have to implement it.