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

QCamera "GLib-GObject-CRITICAL" Error



  • Hello,

    I have developed a simple application to record the video from laptop's camera. I've used the following classes:

    #include <QCamera>
    #include <QCameraInfo>
    #include <QMediaRecorder>
    #include <QUrl>
    #include <QCameraViewfinder>
    #include <QCameraImageCapture>

    It works and it can show the video and I am able to still an image but, when I try to record a video using "QMediaRecorder" I face the following error:

    (videoD:19102): GLib-GObject-CRITICAL **: 13:01:07.717: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

    The operation system is Ubuntu 18 and I have installed libpulse-dev.

    I hope someone can help me.


  • Lifetime Qt Champion

    Hi,

    What version of Qt ?
    What version of GStreamer ?
    How did you install both ?
    Can you record from the camera if you use GStreamer directly ?



  • Hi,

    the QT version is 5.9.5

    In terms of GStreamer honestly I have newer used it before. Should I install it?


  • Lifetime Qt Champion

    If you didn't have GStreamer installed then you would not have anything on your GUI with regard to the camera.



  • I just checked it and It is 1.0 as far as I understood .

    I used dpkg -l | grep gstreamer and I get list of packages:

    i gir1.2-gstreamer-1.0:amd64 1.14.5-0ubuntu1~18.04.1 amd64 GObject introspection data for the GStreamer library
    ii gstreamer1.0-alsa:amd64 1.14.5-0ubuntu1~18.04.1 amd64 GStreamer plugin for ALSA
    ii gstreamer1.0-clutter-3.0:amd64 3.0.26-1 amd64 Clutter PLugin for GStreamer 1.0

    ....
    ...


  • Lifetime Qt Champion

    Is the Qt version you are using the one provided by your distribution ?


Log in to reply