Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Initializing gstreamer crashes my Qt Application

Initializing gstreamer crashes my Qt Application

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • musimbateM Offline
    musimbateM Offline
    musimbate
    wrote on last edited by
    #1

    Hi ,
    I am trying to integrate "gstreamer":http://www.gstreamer.freedesktop.org/ into my application as suggested "here ":http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideooverlay.html#GstVideoOverlay ,the problem is that the application crashes with the follwing application output:
    @
    Starting D:\play_ground\build-gstreamerWidget-Qt_4_8_6-Debug\debug\gstreamerWidget.exe...
    The program has unexpectedly finished.
    @

    A section of my main function looks like this:
    @

    #include "widget.h"
    #include <QApplication>
    #include <QTimer>
    #include <QWidget>

    #include <glib.h>
    #include <gst/gst.h>
    #include <gst/video/videooverlay.h>

    int main(int argc, char *argv[])
    {

    if (!g_thread_supported ())
        g_thread_init (NULL);
    
      gst_init (&argc, &argv);//The application crashes here
      QApplication app(argc, argv);
      app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit ()));
    
    
     
      // prepare the pipeline
    
      GstElement *pipeline = gst_pipeline_new ("xvoverlay");
     ...................................
    
      // prepare the ui
    
      QWidget window;
      window.resize(320, 240);
      window.show();
    
     WId xwinid = window.winId();
     gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (sink),
                                           guintptr (xwinid));
    
      run the pipeline
    
      int ret = app.exec();
    
      window.hide();
    gst_element_set_state (pipeline, GST_STATE_NULL);
    gst_object_unref (pipeline);
    
      return ret;
    

    }

    @

    I would appreciate it if somebody helped with the issue.Gstreamer is working within visual studio environment (console and creating its own display window) .I want that window to be a Qt widget within my app.

    I am working with Qt 4.8.6 /vs 2010/win x86 if this is helpful

    Thank you for your time.

    Why join the navy if you can be a pirate?-Steve Jobs

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      If you want to mix both, you should have a look at QtGStreamer, it provides everything you need to mix Qt and gstreamer

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved