Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to replace playbin with rtspsrc in QtMultiMedia



  • I play rtsp video with QMediaPlayer(Qt5.6.2). There is some latency on my machine. But when I play the video with gst-launch-1.0 rtspsrc, it is better. So I want to replace playbin with rtspsrc in QtMultiMedia.
    I simply change the macro "QT_GSTREAMER_PLAYBIN_ELEMENT_NAME" in src/multimedia/gsttools_headers/qgstutils_p.h from "playbin" to "rtspsrc". But it is not so simple. QtMediaPlayer would not play anything. Could someone tell me how to do this?


  • Lifetime Qt Champion

    Hi,

    If you want to switch "on demand" you will have to implement that yourself.



  • HAHA. Thank you! I am trying. Maybe I should not deprecate "playbin", I should use rtspsrc when playing rtsp video.


Log in to reply