After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 637419 - using appsrc through playbin2 does not work
using appsrc through playbin2 does not work
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.28
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-12-16 21:44 UTC by qedguy
Modified: 2010-12-17 08:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description qedguy 2010-12-16 21:44:09 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.
Comment 1 Wim Taymans 2010-12-17 08:07:23 UTC
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);