<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Folks,<div><br></div><div>I am porting a gstreamer 0.10 app to 1.0 and having some basic troubles.</div><div><br></div><div>I am on MacOS 10.8.5, with Xcode 5.0.2, and using GStreamer1.0 via macports (i.e. sudo port install gstreamer1….)</div><div><br></div><div>I made all the changes from the porting guide, and the app compiles and links fine.</div><div><br></div><div>At runtime, I am trying to instantiate a <b>playbin</b> 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).</div><div><br></div><div>Here is the code skeleton (with extra parts removed):</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo; "><span style="color: #3d1d81"> gst_init</span>( <span style="color: #bb2ca2">NULL</span>, <span style="color: #bb2ca2">NULL</span> );</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0); "><span style="color: #000000"> </span>//g_type_init();</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><span style="color: #000000"> </span><span style="color: #bb2ca2">if</span><span style="color: #000000"> (!</span>gst_is_initialized<span style="color: #000000">()) {</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span>// Not reached, so init is OK</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(209, 47, 27); "><span style="color: #000000"> </span><span style="color: #703daa">std</span><span style="color: #000000">::</span><span style="color: #703daa">cout</span><span style="color: #000000"> << </span>"ERROR: Failure to initialize GStreamer (gst_init)"<span style="color: #000000"> << </span><span style="color: #703daa">std</span><span style="color: #000000">::</span><span style="color: #3d1d81">endl</span><span style="color: #000000">;</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; "> }</div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; "><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; "><div style="margin: 0px; "> <span style="color: #703daa">guint</span> major, minor, micro, nano;</div><div style="margin: 0px; "> <span style="color: #3d1d81">gst_version</span> (&major, &minor, µ, &nano); // returns 1 2 2 0</div><div><br></div></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 132, 0); "><span style="color: #000000"> </span>/* get factory */</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><span style="color: #000000"> </span><span style="color: #703daa">GstElementFactory</span><span style="color: #000000"> *factory = </span>gst_element_factory_find<span style="color: #000000"> (</span><span style="color: #d12f1b">"playbin"</span><span style="color: #000000">);</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; "> <span style="color: #bb2ca2">if</span> (!factory) {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>// Not reached so playbin is found</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(209, 47, 27); "><span style="color: #000000"> </span><span style="color: #3d1d81">g_print</span><span style="color: #000000"> (</span>"You don't have the 'playbin' element installed!\n"<span style="color: #000000">);</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; "> <span style="color: #bb2ca2">return</span> -<span style="color: #272ad8">1</span>;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; "> }</div></div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><span style="color: #4f8187"> m_GstPipeline</span><span style="color: #000000"> = </span>gst_element_factory_make<span style="color: #000000">( </span><span style="color: #d12f1b">"playbin"</span><span style="color: #000000">, </span><span style="color: #d12f1b">"pipeline"</span><span style="color: #000000"> ); // returns a non-null element</span></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><span style="color: #000000"><br></span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><div style="margin: 0px; "> g_object_set( <span style="color: #4f8187">m_GstPipeline</span>, <span style="color: #d12f1b">"uri"</span>, strFilename.c_str(), <span style="color: #bb2ca2">NULL</span> ); /// <b>NOT OK see errors below!</b></div><div><br></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><div style="margin: 0px; "> <span style="color: #703daa">gchar</span> *name = <span style="color: #bb2ca2">NULL</span>;</div><div style="margin: 0px; "> g_object_get (<span style="color: #78492a">G_OBJECT</span> (<span style="color: #4f8187">m_GstPipeline</span>), <span style="color: #d12f1b">"name"</span>, &name, <span style="color: #bb2ca2">NULL</span>); // <b>NOT OK - not even the name!</b></div><div style="margin: 0px; color: rgb(209, 47, 27); "><span style="color: #000000"> </span><span style="color: #3d1d81">g_print</span><span style="color: #000000"> (</span>"The name of the element is '%s'.\n"<span style="color: #000000">, name);</span></div><div style="margin: 0px; "> g_free (name);</div><div><br></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><span style="color: #000000"><br></span></div><div style="margin: 0px; "><span style="color: rgb(0, 0, 0); font-family: Menlo; font-size: 11px; ">The </span><span style="color: rgb(79, 129, 135); font-family: Menlo; font-size: 11px; ">m_GstPipeline</span><font color="#3d1d81" face="Menlo"><span style="font-size: 11px;"> </span></font><font face="Menlo"><span style="font-size: 11px;">is not null, so I assume that the playbin plugin has been found. </span></font></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><span style="color: #000000"><br></span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><span style="color: #000000">Trying to set the <b>uri</b> fails, with this output:</span></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><div style="margin: 0px; "><b>(process:90553): GLib-CRITICAL **: gpointer g_datalist_id_dup_data(GData **, GQuark, GDuplicateFunc, gpointer): assertion 'key_id != 0' failed</b></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><div style="margin: 0px; min-height: 13px; "><br></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><div style="margin: 0px; "><b>(process:90553): GLib-CRITICAL **: void g_datalist_id_set_data_full(GData **, GQuark, gpointer, GDestroyNotify): assertion 'key_id > 0' failed</b></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><div style="margin: 0px; min-height: 13px; "><br></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><div style="margin: 0px; "><b>(process:90553): GLib-GObject-CRITICAL **: GParamSpec *g_param_spec_pool_lookup(GParamSpecPool *, const gchar *, GType, gboolean): assertion 'pool != NULL' failed</b></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><div style="margin: 0px; min-height: 13px; "><br></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><div style="margin: 0px; "><b>(process:90553): GLib-GObject-WARNING **: g_object_set_valist: object class '(null)' has no property named 'uri'</b></div></div></blockquote><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><div style="margin: 0px; min-height: 13px; "><br><b></b></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129); "><span style="color: #000000"><br></span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; ">Even trying to get the <b>name</b> fails, and this is output:</div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div style="margin: 0px; font-size: 11px; font-family: Menlo; "><div style="margin: 0px; "><b>(process:90030): GLib-GObject-CRITICAL **: GParamSpec *g_param_spec_pool_lookup(GParamSpecPool *, const gchar *, GType, gboolean): assertion 'pool != NULL' failed</b></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; "><div style="margin: 0px; min-height: 13px; "><br></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; "><div style="margin: 0px; "><b>(process:90030): GLib-GObject-WARNING **: g_object_get_valist: object class '(null)' has no property named 'name'</b></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; "><div style="margin: 0px; "><b>The name of the element is '(null)'.</b></div></div></blockquote><div style="margin: 0px; font-size: 11px; font-family: Menlo; "><div style="margin: 0px; min-height: 13px; "><b></b></div></div><div style="margin: 0px; "><div style="font-family: Menlo; font-size: 11px; margin: 0px; "><b><br></b></div><div style="margin: 0px; "><span style="font-family: Menlo; font-size: 11px; ">When I run </span><font face="Menlo"><span style="font-size: 11px;"><b>gst-inspect-1.0 playbin</b> from the terminal command line I get the full list of properties including "name" and "uri".</span></font></div><div style="margin: 0px; "><font face="Menlo"><span style="font-size: 11px;"><br></span></font></div><div style="margin: 0px; "><font face="Menlo"><span style="font-size: 11px;">I've read through all the manuals and online references I could find, and I am out of ideas to try.</span></font></div><div style="margin: 0px; "><font face="Menlo"><span style="font-size: 11px;"> </span></font></div><div style="margin: 0px; "><font face="Menlo"><span style="font-size: 11px;">Are there some env vars that need to be set in the app for the plugin to be properly loaded?</span></font></div><div style="margin: 0px; "><font face="Menlo"><span style="font-size: 11px;">Could my installation be messed up in some way? </span></font></div><div style="margin: 0px; "><font face="Menlo"><span style="font-size: 11px;"><br></span></font></div><div style="margin: 0px; "><font face="Menlo"><span style="font-size: 11px;">Any help would be much appreciated!</span></font></div><div style="margin: 0px; "><font face="Menlo"><span style="font-size: 11px;"><br></span></font></div><div style="margin: 0px; "><font face="Menlo"><span style="font-size: 11px;">-Henry</span></font></div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; "> </div></body></html>