<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><span style="font-family: verdana, sans-serif; ">Hello,</span><br><br><span style="font-family: verdana, sans-serif; ">Following is code which plays mp3 using playbin</span><br>
<br><i>  /* set up */<br>  play = gst_element_factory_make (&quot;playbin2&quot;, &quot;play&quot;);<br>  g_object_set (G_OBJECT (play), &quot;uri&quot;, &quot;file:///home/basavaraj/Music/JabSeTereNaina.mp3&quot;, NULL);<br>
<br>  bus = gst_pipeline_get_bus (GST_PIPELINE (play));<br>//  gst_bus_add_watch (bus, my_bus_callback, loop);<br>  gst_object_unref (bus);<br><br>  gst_element_set_state (play, GST_STATE_PLAYING);<br></i><br><br><span style="font-family: verdana, sans-serif; ">Following is code which does not play mp3. Please help me what all plugins we need to connect and </span><br style="font-family: verdana, sans-serif; ">
<span style="font-family: verdana, sans-serif; ">how to find their capabilities</span><br style="font-family: verdana, sans-serif; "><br><i>  /* Create gstreamer elements */<br>  GstElement* pipeline = gst_pipeline_new (&quot;audio-player&quot;);<br>
  GstElement* source   = gst_element_factory_make (&quot;filesrc&quot;,       &quot;file-source&quot;);<br>  GstElement* demuxer  = gst_element_factory_make (&quot;mpegdemux2&quot;,      &quot;mpeg-demuxer&quot;);<br>  GstElement* decoder  = gst_element_factory_make (&quot;flump3dec&quot;,     &quot;fluendo-decoder&quot;);<br>
//  GstElement* decoder = gst_element_factory_make(&quot;decodebin&quot;, &quot;decoderbin&quot;);<br>  GstElement* conv     = gst_element_factory_make (&quot;audioconvert&quot;,  &quot;converter&quot;);<br>  GstElement* sink     = gst_element_factory_make (&quot;autoaudiosink&quot;, &quot;audio-output&quot;);<br>
<br>  if (!pipeline || !source || !demuxer || !decoder || !conv || !sink) {<br>    g_printerr (&quot;One element could not be created. Exiting.\n&quot;);<br>    return -1;<br>  }<br><br>  /* Set up the pipeline */<br><br>
  /* we set the input filename to the source element */<br>//  g_object_set (G_OBJECT (source), &quot;uri&quot;, &quot;file:///home/basavaraj/Music/Jab.mp3&quot;, NULL);<br>  g_object_set (G_OBJECT (source), &quot;location&quot;, &quot;/home/basavaraj/Music/Jab.mp3&quot;, NULL);<br>
<br>  /* we add a message handler */<br>  GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));<br>  gst_bus_add_watch (bus, bus_call, loop);<br>  gst_object_unref (bus);<br><br>  /* we add all elements into the pipeline */<br>
  /* file-source | mp3-demuxer | mp3-decoder | converter | alsa-output */<br>  gst_bin_add_many (GST_BIN (pipeline),<br>                    source, demuxer, decoder, conv, sink, NULL);<br><br>  /* we link the elements together */<br>
  /* file-source -&gt; mp3-demuxer ~&gt; mp3-decoder -&gt; converter -&gt; alsa-output */<br>  gst_element_link (source, demuxer);<br>  g_signal_connect (demuxer, &quot;pad-added&quot;, G_CALLBACK (on_pad_added), decoder);<br>
<br>  /* Set the pipeline to &quot;playing&quot; state*/<br>  g_print (&quot;Now playing: %s\n&quot;, argv[1]);<br>  gst_element_set_state (pipeline, GST_STATE_PLAYING);<br></i><br><br style="font-family: verdana, sans-serif; ">
<span style="font-family: verdana, sans-serif; ">Thanks in advance,</span></span><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><span style="font-family: verdana, sans-serif; "></span>Basavaraj</span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><br></span><div><font class="Apple-style-span" color="#888888" face="verdana, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></font></div></div>