GNOME Bugzilla – Bug 637419
using appsrc through playbin2 does not work
Last modified: 2010-12-17 08:07:23 UTC
Ok so i use the following snippet of code so that i can use the appsrc element for media playback in playbin2. m_playbin is a playbin2. g_object_set(G_OBJECT(m_playbin), "uri", "appsrc://", NULL); g_signal_connect(G_OBJECT(m_playbin), "deep-notify::source", (GCallback) &QGstreamerPlayerSession::appSrcElementReady, this); //static class method void QGstreamerPlayerSession::appSrcElementReady(GObject* object, GObject *orig, GParamSpec *pspec, QGstreamerPlayerSession* _this) { if (_this == 0) return; // get handle to appsrc GstElement *appsrc = 0; g_object_get(orig, "source", appsrc, NULL); if (appsrc == 0) qDebug()<<"appsrc is null "; if (!_this->appsrc()->configure(GST_APP_SRC(appsrc))) { qWarning()<<"could not configure appsrc element"; } } The callback appSrcElementReady is invoked. But i get a NULL appsrc element from the "source" property. I get this warning too: (<unknown>:16850): GLib-GObject-WARNING **: IA__g_object_get_valist: value location for `GstElement' passed as NULL Idea taken from: http://gst-plugins-bad0.10.sourcearchive.com/documentation/0.10.9-1/appsrc-stream2_8c-source.html Are there any work around's for this? Unfortunately I'm constrained to gstreamer-0.10.28 as the later versions are too unstable for us in general.
This is not a bug and bugzilla is not a support forum. Please post problems you have on the mailing-list first. Your code is wrong. This this instead: g_object_get(orig, "source", &appsrc, NULL);