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">On Thu, Nov 19, 2009 at 6:40 AM, basavaraj P <span dir="ltr"><<a href="mailto:basavarajp82@gmail.com">basavarajp82@gmail.com</a>></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;"><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 ("playbin2", "play");<br> g_object_set (G_OBJECT (play), "uri", "file:///home/basavaraj/Music/JabSeTereNaina.mp3", 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 ("audio-player");<br>
GstElement* source = gst_element_factory_make ("filesrc", "file-source");<br> GstElement* demuxer = gst_element_factory_make ("mpegdemux2", "mpeg-demuxer");<br> GstElement* decoder = gst_element_factory_make ("flump3dec", "fluendo-decoder");<br>
// GstElement* decoder = gst_element_factory_make("decodebin", "decoderbin");<br> GstElement* conv = gst_element_factory_make ("audioconvert", "converter");<br> GstElement* sink = gst_element_factory_make ("autoaudiosink", "audio-output");<br>
<br> if (!pipeline || !source || !demuxer || !decoder || !conv || !sink) {<br> g_printerr ("One element could not be created. Exiting.\n");<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), "uri", "file:///home/basavaraj/Music/Jab.mp3", NULL);<br> g_object_set (G_OBJECT (source), "location", "/home/basavaraj/Music/Jab.mp3", 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 -> mp3-demuxer ~> mp3-decoder -> converter -> alsa-output */<br> gst_element_link (source, demuxer);<br> g_signal_connect (demuxer, "pad-added", G_CALLBACK (on_pad_added), decoder);<br>
<br> /* Set the pipeline to "playing" state*/<br> g_print ("Now playing: %s\n", 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 color="#888888" face="verdana, sans-serif"><span style="border-collapse: collapse;"><br>
</span></font></div></div>
</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'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><br clear="all"><br>-- <br>"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..."<br>