no basic properties showing up for playbin

Henry Kaufman henry at tactable.com
Tue Jan 28 15:47:39 PST 2014


Hi Folks,

I am porting a gstreamer 0.10 app to 1.0 and having some basic troubles.

I am on MacOS 10.8.5, with Xcode 5.0.2, and using GStreamer1.0 via macports (i.e. sudo port install gstreamer1….)

I made all the changes from the porting guide, and the app compiles and links fine.

At runtime, I am trying to instantiate a playbin element, but the properties are not showing up, so I can't set the uri property (i.e. I can't set the input file).

Here is the code skeleton (with extra parts removed):

    gst_init( NULL, NULL );
    //g_type_init();
    if (!gst_is_initialized()) {
	// Not reached, so init is OK
        std::cout << "ERROR: Failure to initialize GStreamer (gst_init)" << std::endl;
    }

    guint major, minor, micro, nano;
    gst_version (&major, &minor, &micro, &nano); // returns 1 2 2 0

    /* get factory */
    GstElementFactory *factory = gst_element_factory_find ("playbin");
    if (!factory) {
	// Not reached so playbin is found
        g_print ("You don't have the 'playbin' element installed!\n");
        return -1;
    }

    m_GstPipeline = gst_element_factory_make( "playbin", "pipeline" );  // returns a non-null element

    g_object_set( m_GstPipeline, "uri", strFilename.c_str(), NULL );  /// NOT OK see errors below!

    gchar *name = NULL;
    g_object_get (G_OBJECT (m_GstPipeline), "name", &name, NULL);   // NOT OK - not even the name!
    g_print ("The name of the element is '%s'.\n", name);
    g_free (name);


The m_GstPipeline  is not null, so I assume that the playbin plugin has been found. 

Trying to set the uri fails, with this output:
(process:90553): GLib-CRITICAL **: gpointer g_datalist_id_dup_data(GData **, GQuark, GDuplicateFunc, gpointer): assertion 'key_id != 0' failed

(process:90553): GLib-CRITICAL **: void g_datalist_id_set_data_full(GData **, GQuark, gpointer, GDestroyNotify): assertion 'key_id > 0' failed

(process:90553): GLib-GObject-CRITICAL **: GParamSpec *g_param_spec_pool_lookup(GParamSpecPool *, const gchar *, GType, gboolean): assertion 'pool != NULL' failed

(process:90553): GLib-GObject-WARNING **: g_object_set_valist: object class '(null)' has no property named 'uri'


Even trying to get the name fails, and this is output:
(process:90030): GLib-GObject-CRITICAL **: GParamSpec *g_param_spec_pool_lookup(GParamSpecPool *, const gchar *, GType, gboolean): assertion 'pool != NULL' failed

(process:90030): GLib-GObject-WARNING **: g_object_get_valist: object class '(null)' has no property named 'name'
The name of the element is '(null)'.

When I run gst-inspect-1.0 playbin from the terminal command line I get the full list of properties including "name" and "uri".

I've read through all the manuals and online references I could find, and I am out of ideas to try.
 
Are there some env vars that need to be set in the app for the plugin to be properly loaded?
Could my installation be messed up in some way? 

Any help would be much appreciated!

-Henry
    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140128/4b4817be/attachment.html>


More information about the gstreamer-devel mailing list