QtGStreamer: Segmentation fault when calling query function

Benjamin Federau Benjamin.Federau at basyskom.com
Thu Apr 25 05:18:46 PDT 2013


 

Benjamin Federau <Benjamin.Federau at basyskom.com> hat am 25. April 2013 um 13:29
geschrieben:

>  
>
>
> Mandeep Sandhu <mandeepsandhu.chd at gmail.com> hat am 25. April 2013 um 12:15
> geschrieben:
>
>
> >
> > On Wed, Apr 24, 2013 at 8:07 PM, bfederau <benjamin.federau at basyskom.com
> > [mailto:benjamin.federau at basyskom.com] >wrote:
> >
> > > Hi,
> > >
> > > I have implemented the following Qt function
> > >
> > > QTime Player::getPosition()
> > > {
> > >     if (m_pipeline) {
> > >         QGst::PositionQueryPtr query =
> > > QGst::PositionQuery::create(QGst::FormatTime);
> > >         m_pipeline->query(query);
> > >         return QGst::ClockTime(query->position()).toTime();
> > >     } else {
> > >         return QTime();
> > >     }
> > > }
> > >
> > > When it comes to the m_pipeline->query(query) line the app crashes with a
> > > Segmentation fault.
> > >
> > > The backtrace is:
> > > #0  0x00000011 in ?? ()
> > > #1  0xb335b41d in QGlib::RefPointer<QGst::PositionQuery>::clear() () from
> > > /home/meego/mediaplayer/libMediaPlayer.so
> > > #2  0xb335a7c6 in QGlib::RefPointer<QGst::PositionQuery>::~RefPointer() ()
> > > from /home/meego/mediaplayer/libMediaPlayer.so
> > > #3  0xb3359489 in Player::getPosition() () from
> > > /home/meego/mediaplayer/libMediaPlayer.so
> > > .....
> > >
> > > And on console I get a:
> > > GLib-GObject-CRITICAL **: g_value_get_int64: assertion
> > > `G_VALUE_HOLDS_INT64
> > > (value)' failed
> > >
> > >
> > > Can somebody give me a hint whats going wrong here?
> > >
> Can you share a sample program that illustrates this issue. I can try it
> locally
> here.
> >
> >
> > -mandeep
> >
> >
> >
> >
>
>  
> I forgot to say that I'm using the Qt5 ported version of qt-gstreamer that I
> have found at
> https://code.launchpad.net/~phablet-team/phablet-extras/qt-gstreamer
>  
> The problem was that the Qt5 QML plugin was not ported yet, because of the
> change from Graphics View (Qt4) to Scene Graph (Qt5). For my purpose I have
> ported the QML plugin using the PaintedItem (Painter API). In my C++ part I
> have
> implemented the player functions like play, pause, stop and the a getPostion
> function. Play, pause and stop is working, but the getPosition function causes
> the described seg fault.
>  
 
A simple Qt5 app that causes that seg fault: http://pastie.org/7716435
 
>
> >
> >  
> >
> > >
> > > Cheers
> > > -
> > > Benjamin Federau
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > > http://gstreamer-devel.966125.n4.nabble.com/QtGStreamer-Segmentation-fault-when-calling-query-function-tp4659657.html
> > > Sent from the GStreamer-devel mailing list archive at Nabble.com.
> > > _______________________________________________
> > > gstreamer-devel mailing list
> > > gstreamer-devel at lists.freedesktop.org
> > > [mailto:gstreamer-devel at lists.freedesktop.org]
> > > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> > >
>
> >
> >
> >
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list