<br>Hello Katcipis,<br><br>Following is the on_pad_added function.<br> <br><i>static void<br>on_pad_added (GstElement *element,<br>              GstPad     *pad,<br>              gpointer    data)<br>{<br>  GstPad *sinkpad;<br>
  GstElement *decoder = (GstElement *) data;<br><br>  /* We can now link this pad with the mp3-decoder sink pad */<br>  g_print (&quot;Dynamic pad created, linking demuxer/decoder\n&quot;);<br><br>  sinkpad = gst_element_get_static_pad (decoder, &quot;sink&quot;);<br>
<br>  gst_pad_link (pad, sinkpad);<br><br>  gst_object_unref (sinkpad);<br>}<br></i><br><br>Thanks,<br>Basavaraj<br><br><br><br><div class="gmail_quote">On Thu, Nov 19, 2009 at 3:11 PM, Tiago Katcipis <span dir="ltr">&lt;<a href="mailto:katcipis@inf.ufsc.br">katcipis@inf.ufsc.br</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">It would be easier if you show your on_pad_added function, and if you tell exactly what error messages do you get when you run your application.<br>
<br>To investigate the capabilities of a element you can use gst-inspect. <br>
<br>On a terminal you can type for example:<br>gst-inspect flump3dec<br><br>it will give an complete specification of the flump3dec element.<br><br>best regards,<br>Katcipis<br><br><div class="gmail_quote"><div><div></div>
<div class="h5">On Thu, Nov 19, 2009 at 6:40 AM, basavaraj P <span dir="ltr">&lt;<a href="mailto:basavarajp82@gmail.com" target="_blank">basavarajp82@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5"><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 style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;"><span style="font-family: verdana,sans-serif;"></span>Basavaraj</span></div>

<font color="#888888">
<div><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;"><br></span><div><font face="verdana, sans-serif" color="#888888"><span style="border-collapse: collapse;"><br>
</span></font></div></div>
</font><br></div></div>------------------------------------------------------------------------------<br>
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day<br>
trial. Simplify your report design, integration and deployment - and focus on<br>
what you do best, core application coding. Discover what&#39;s new with<br>
Crystal Reports now.  <a href="http://p.sf.net/sfu/bobj-july" target="_blank">http://p.sf.net/sfu/bobj-july</a><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br>&quot;Se você se perder na selva africana, não precisa se desesperar. Basta sentar em uma pedra e começar a instalar GNU/Linux em seu laptop. Em menos de 5 minutos aparecerá alguém pra discordar de sua escolha de distribuição, do particionamento, do gerenciador de janelas, do ambiente de desktop, do editor de textos...&quot;<br>


</font><br>------------------------------------------------------------------------------<br>
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day<br>
trial. Simplify your report design, integration and deployment - and focus on<br>
what you do best, core application coding. Discover what&#39;s new with<br>
Crystal Reports now.  <a href="http://p.sf.net/sfu/bobj-july" target="_blank">http://p.sf.net/sfu/bobj-july</a><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br>