QtGStreamer 0.10.1

This weekend I released QtGStreamer 0.10.1, the first stable version of QtGStreamer. This release marks the beginning of the stable 0.10 series of QtGStreamer that will continue for the lifetime of GStreamer 0.10. For those of you that don’t yet know what QtGStreamer is, it is a set of libraries that provide Qt-style C++ bindings for GStreamer, plus extra helper classes and elements for better integration of GStreamer in Qt applications.

I must say thanks a lot to Mauricio, the co-developer of QtGStreamer, who helped me a lot with the design and code, to the GStreamer community, who accepted this project under the GStreamer umbrella with great enthusiasm, to Nokia for sponsoring it, to Collabora for assigning me and Mauricio to work on it and to all those developers who are already using it in their projects and have helped us by providing feedback.

The future

Development of course does not stop here. It just started. We will try to improve the bindings as much as we can by exporting more and more of GStreamer’s functionality, by adding more and more convenience methods/classes and/or gstreamer elements that ease the use of GStreamer in Qt applications and by collecting opinions and ideas from all of you out there that will use this API. This last bit is quite important imho, so, if you have any suggestions to make about things that you don’t like or things that you would like to see implemented, please file a bug to let us know.

Use in KDE

I am quite happy to see that this library already has early adopters in KDE. Apart of course from my telepathy-kde-call-ui (ex kcall), which is the “father” of QtGStreamer, QtGStreamer is also used in kamoso, a cheese-like camera app, whose authors, Alex Fiestas and Aleix Pol, have been very patient waiting for me to release QtGStreamer before they release kamoso and have also been very supportive during all this time (thanks!).

Personal thoughts

I must say this project was fun to develop. During development, I learned a lot about C++ that I didn’t know before and I also learned how GObject works, which I must say is quite interesting, although ugly for my taste. Learning more about C++ was my main source of interest from the beginning of the project, and for some period of time I couldn’t even imagine that this project would ever reach here, but I kept coding it for myself. Obviously, I am more than happy now that this finally evolved into something that is also useful for others and has wide acceptance 🙂

Advertisement

35 thoughts on “QtGStreamer 0.10.1

  1. Hm. Why a hard binding to GStreamer by this in all the apps you mention? What low-level features are you using which are not in the Phonon API?

    1. The purpose of QtGStreamer is to provide all those low-level features that higher level APIs such as Phonon do not provide and will never provide because it’s not what they are meant for. Phonon currently only provides audio/video playback and device detection, nothing more. GStreamer on the other side can do anything (playback, recording, encoding, decoding, streaming to a network, voip, cd ripping, and more).

      1. I’m guessing you’ll have to deal with these “why not Phonon” questions for quite a while, people just don’t seem to get it. Another thing people forget is that you can use GStreamer for other data streams besides audio and video, which Phonon certainly wouldn’t support, not to mention very complicated pipelines.

  2. Congrats for the release and thank you for your work!
    I’m very interested in a nice VoiP (SIP) client for KDE. Do you already have an idea when that could be expected?

      1. I was about to ask the same thing, I’m glad to read your reply. I’ve tried to use SFLphone on Squeeze, but failed miserably :). I can’t wait to try your application!

  3. I am developing application which will stream video over network.GUI is made in qt but i am unable to integrate gstreamer and qtgstreamer in ubuntu 10.04…..can u give me the detail procedure???

    1. Hi,

      I am trying to install qt-gstreamer on 10.04, but could not even build it because of teh gstreamer version dependencies. Has anybody succeeded in doing this? Sayantan?

  4. I can’t build qtgstreamer in Mac OS X 10.6.6 (Snow Leopard) i get this error:

    Linking CXX shared library libQtGLib-2.0.dylib
    ld: library not found for -lgobject-2.0
    collect2: ld returned 1 exit status
    make[2]: *** [src/QGlib/libQtGLib-2.0.0.10.1.dylib] Error 1
    make[1]: *** [src/QGlib/CMakeFiles/QtGLib.dir/all] Error 2
    make: *** [all] Error 2

    But i have libgobject installed …. any idea?

    1. I have never tried this on Mac OS X, so it is highly possible that there is a bug in one of the cmake scripts. Try to run “make VERBOSE=1” and inspect the linker command line, maybe you can spot something weird.

      1. I managed to get the latest version to build on snow leopard, but it won’t run. i am getting a assert error in the reference pointers when i attempt to play a video in the examples player code:

        ASSERT: “ptr.m_class” in file …/qt-gstreamer-0.10.2/src/QGst/Ui/../../QGlib/refpointer.h, line 333
        Abort trap

        i am using the frameworks from the gstreamer SDK website and i know they are working on as i can build c apps against them that work fine. the QT part of the player app also appears to run fine.

        1. This is a known bug of old gcc versions. libstdc++ >= 4.5 (which is part of gcc) is required at runtime, as you can see in the README

          1. I read the readme, didn’t see the specific version sorry. In any case 4.2 is the release compiler for mac os x, so its not old to mac folks 😉 Do you have any idea of the clang 4.2 version works any better than gcc? I guess if i want to use this i will need to build newer gcc. Been there, done that. Usually more pain than its worth if you want to use it with other mac libraries and tools. Thanks for the info.

          2. For those who want to use this package on mac, on os 10.7 (lion) i built using clang compiler and it seems to work correctly on that. execute the following 2 lines before running cmake

            export CC=/usr/bin/clang
            export CXX=/usr/bin/clang++

  5. Finally i success in the compilation …

    I need to build an app to stream (rtsp maybe) a bunch of images ..
    I get the images using OpenCV (image proccessing) and i need to stream this images through network … i read about use appsrc .. but i can’t find a example of how to do that with QGst .. any guideline ???

    Thanks in advance

    1. How have you solved it Matias?
      I am getting the same problem when trying to build qt-gstreamer on mac now. Here’s what make tells (with VERBOSE=1)

      =====

      usr/bin/c++ -Wall -Wextra -Wformat-security -Wundef -Wpointer-arith -Wcast-align -fno-common -fvisibility=hidden -fvisibility-inlines-hidden -dynamiclib -Wl,-headerpad_max_install_names -current_version 0.10.1 -o libQtGLib-2.0.0.10.1.dylib -install_name /Users/artem/twine/twine/twineclient/prototypes/qt-gstreamer/build-mac/src/QGlib/libQtGLib-2.0.0.dylib CMakeFiles/QtGLib.dir/QtGLib_automoc.cpp.o CMakeFiles/QtGLib.dir/quark.cpp.o CMakeFiles/QtGLib.dir/type.cpp.o CMakeFiles/QtGLib.dir/paramspec.cpp.o CMakeFiles/QtGLib.dir/object.cpp.o CMakeFiles/QtGLib.dir/value.cpp.o CMakeFiles/QtGLib.dir/signal.cpp.o CMakeFiles/QtGLib.dir/error.cpp.o CMakeFiles/QtGLib.dir/connect.cpp.o CMakeFiles/QtGLib.dir/wrap.cpp.o CMakeFiles/QtGLib.dir/init.cpp.o CMakeFiles/QtGLib.dir/gen.cpp.o /opt/local/lib/libQtCore.dylib -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lintl
      ld: library not found for -lgobject-2.0
      collect2: ld returned 1 exit status
      make[2]: *** [src/QGlib/libQtGLib-2.0.0.10.1.dylib] Error 1
      make[1]: *** [src/QGlib/CMakeFiles/QtGLib.dir/all] Error 2

  6. Another question…
    i’m test the appsrc/appsink and works good, then i test an application captured frames with OpenCV and push into appsrc works good.. so

    I have an application (modeling with Consumer/Producer) ..
    I read frames with OpenCV push into a Buffer (this is a thread)
    In other thread i process the images in the buffer.. after each processing i push the frame into another buffer.
    And i want in other thread read this buffer and stream the results (pushing the frames into appsrc)… but i can’t make it work

    I create my app using Qt .. The app use QThread and QWaitCondition to solve the Consumer/Producer problem… the write/read/ of both groups of threads (Capture/Processing and Processing/Stream) works good… but not the stream part…

    Any idea of how can i do this???

    Thanks a lot

  7. Hi ,

    am trying to use qt-gstreamer with Qml app , but am finding difficulty in using it .

    is there any application which used qml to play H264(using hw codecs MixVideoSink) media files.

    thanks Br ,
    Amit

  8. Hello Mr. Kiagiadakis,

    I’m trying to develop a simple voIP program, so I decided to see how things work on your voIP example provided with your library. Everything seems OK when i tried to understand the algorithm on the example except for a lack of QGst::init() on the VoipExample constructor. I builded the project and the program sucessfully executed, but when I pressed “Start Call” it crashes with “GStreamer-CRITICAL **: gst_element_factory_make: assertion `gst_is_initialized ()’ failed” message. So i added QGst::init() to the VoipExample constructor and everything worked OK even when i press “Start Call” button.
    The problem now is that i can’t get no audio or video response from this example and I don’t see any simple solutions for this…Can you help me?

    Thank you for the amazing library, it is helping me a lot!

    1. QGst::init() is there in the main() function. If you run the example unmodified, it should work out of the box.

      Regarding its usage, you need to run two instances of it, provide each one with the IP/ports of the other and press “Start Call” in both of them. Then you should see both of them playing video (where each one comes from the other side) as well as audio.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s