Hi,<br>&nbsp; I&#39;m able to play the wav file by using gst-launch as fallows<br><br>gst-launch-0.10&nbsp; filesrc location=~/songs/4voice.wav ! wavparse ! audioconvert ! alsasink<br>Setting pipeline to PAUSED ...<br>Pipeline is PREROLLING ...<br>

Pipeline is PREROLLED ...<br>Setting pipeline to PLAYING ...<br>New clock: GstAudioSinkClock<br>Caught interrupt -- handling interrupt.<br>Interrupt: Setting pipeline to PAUSED ...<br>Execution ended after 1914601000 ns.<br>

Setting pipeline to PAUSED ...<br>Setting pipeline to READY ...<br>Setting pipeline to NULL ...<br>FREEING pipeline ...<br><br><br>I modified the helloworld code to play the wav as<br>1. I created &quot;waveparse&quot; in place of oggdemux and vorbis&nbsp; parser elements<br>

2. Added filesrc, waveparse and alsasink to the pipeline and linked. <br><br>--<br>int<br>main ( int argc, char *argv[] )<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GMainLoop *loop;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GstBus *bus;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gst_init ( &amp;argc, &amp;argv );<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; loop = g_main_loop_new ( NULL, FALSE );<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pipeline = gst_pipeline_new ( &quot;audio-player&quot; );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; source = gst_element_factory_make ( &quot;filesrc&quot;, &quot;file-source&quot; );<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //parser = gst_element_factory_make ( &quot;oggdemux&quot;, &quot;ogg-parser&quot; );<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parser = gst_element_factory_make ( &quot;wavparse&quot;, &quot;wave-parser&quot; );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //decoder = gst_element_factory_make ( &quot;vorbisdec&quot;, &quot;vorbis-decoder&quot; );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; conv = gst_element_factory_make ( &quot;audioconvert&quot;, &quot;converter&quot; );<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sink = gst_element_factory_make ( &quot;alsasink&quot;, &quot;alsa-output&quot; );<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( !pipeline || !source || !parser || !conv || !sink ) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_print ( &quot;One element could not be created\n&quot; );<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return -1;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_object_set (G_OBJECT (source), &quot;location&quot;, argv[1], NULL );<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bus = gst_pipeline_get_bus ( GST_PIPELINE ( pipeline ) );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gst_bus_add_watch ( bus, bus_call, loop );<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gst_object_unref ( bus );<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gst_bin_add_many ( GST_BIN ( pipeline), source, parser,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; conv, sink, NULL );<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //gst_element_link ( source, parser );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gst_element_link_many ( source, parser, conv, sink, NULL );<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_signal_connect ( parser, &quot;pad-added&quot;, G_CALLBACK ( new_pad ), NULL );<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_print ( &quot;Setting to Playing\n&quot; );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gst_element_set_state ( pipeline, GST_STATE_PLAYING );<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_print ( &quot;Running\n&quot; );<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_main_loop_run ( loop );<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_print ( &quot;Returned, stopping playback\n&quot; );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gst_element_set_state ( pipeline, GST_STATE_NULL );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_print ( &quot;Deleting pipeline\n&quot; );<br>

<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gst_object_unref ( GST_OBJECT ( pipeline ) );<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0;<br>}<br>--<br><br><br>When i tried to run the fallowing code, i&#39;m getting fallowing errors<br>--<br>./a.out ~/songs/4voice.wav<br>Setting to Playing<br>

Running<br>Dynamic pad created, linking parser/decoder<br><br>(a.out:20136): GStreamer-CRITICAL **: gst_element_get_static_pad: assertion `GST_IS_ELEMENT (element)&#39; failed<br><br>(a.out:20136): GStreamer-CRITICAL **: gst_pad_link_prepare: assertion `GST_IS_PAD (sinkpad)&#39; failed<br>

<br>(a.out:20136): GStreamer-CRITICAL **: gst_object_unref: assertion `object != NULL&#39; failed<br>Error: Internal data flow error.<br>Returned, stopping playback<br>Deleting pipeline<br>--<br><br>If i do without the dynamic pads, as<br>
--<br>int<br>main (int argc, char *argv[])<br>{<br>&nbsp; GstElement *bin, *filesrc, *decoder, *audiosink;<br>&nbsp; GstElement *conv, *resample;<br><br>&nbsp; gst_init (&amp;argc, &amp;argv);<br><br>&nbsp; if (argc != 2) {<br>&nbsp;&nbsp;&nbsp; g_print (&quot;usage: %s &lt;mp3 file&gt;\n&quot;, argv[0]);<br>
&nbsp;&nbsp;&nbsp; exit (-1);<br>&nbsp; }<br><br>&nbsp; /* create a new bin to hold the elements */<br>&nbsp; bin = gst_pipeline_new (&quot;pipeline&quot;);<br>&nbsp; g_assert (bin);<br><br>&nbsp; /* create a disk reader */<br>&nbsp; filesrc = gst_element_factory_make (&quot;filesrc&quot;, &quot;disk_source&quot;);<br>
&nbsp; g_assert (filesrc);<br>&nbsp; g_object_set (G_OBJECT (filesrc), &quot;location&quot;, argv[1], NULL);<br><br>&nbsp; /* now it&#39;s time to get the decoder */<br>&nbsp; decoder = gst_element_factory_make (&quot;wavparse&quot;, &quot;decode&quot;);<br>
&nbsp; if (!decoder) {<br>&nbsp;&nbsp;&nbsp; g_print (&quot;could not find plugin \&quot;mad\&quot;&quot;);<br>&nbsp;&nbsp;&nbsp; return -1;<br>&nbsp; }<br><br>&nbsp; /* also, we need to add some converters to make sure the audio stream<br>&nbsp;&nbsp; * from the decoder is converted into a format the audio sink can<br>
&nbsp;&nbsp; * understand (if necessary) */<br>&nbsp; conv = gst_element_factory_make (&quot;audioconvert&quot;, &quot;audioconvert&quot;);<br>&nbsp; if (!conv) {<br>&nbsp;&nbsp;&nbsp; g_print (&quot;could not create \&quot;audioconvert\&quot; element!&quot;);<br>
&nbsp;&nbsp;&nbsp; return -1;<br>&nbsp; }<br>&nbsp; resample = gst_element_factory_make (&quot;audioresample&quot;, &quot;audioresample&quot;);<br>&nbsp; if (!conv) {<br>&nbsp;&nbsp;&nbsp; g_print (&quot;could not create \&quot;audioresample\&quot; element!&quot;);<br>
&nbsp;&nbsp;&nbsp; return -1;<br>&nbsp; }<br><br>&nbsp; /* and an audio sink */<br>&nbsp; audiosink = gst_element_factory_make (&quot;alsasink&quot;, &quot;play_audio&quot;);<br>&nbsp; g_assert (audiosink);<br><br>&nbsp; /* add objects to the main pipeline */<br>
&nbsp; gst_bin_add_many (GST_BIN (bin), filesrc, decoder, conv,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resample, audiosink, NULL);<br><br>&nbsp; /* link the elements */<br>&nbsp; gst_element_link_many (filesrc, decoder, conv, resample, audiosink, NULL);<br>&nbsp; g_signal_connect ( decoder, &quot;pad-added&quot;, G_CALLBACK (new_pad), NULL );<br>
<br>&nbsp; /* start playing */<br>&nbsp; gst_element_set_state (bin, GST_STATE_PLAYING);<br><br>&nbsp; /* Run event loop listening for bus messages until EOS or ERROR */<br>&nbsp; event_loop (bin);<br><br>&nbsp; /* stop the bin */<br>&nbsp; gst_element_set_state (bin, GST_STATE_NULL);<br>
<br>&nbsp; exit (0);<br>}<br><br>I&#39;m getting<br>--<br>./a.out ~/songs/4voice.wav<br>Dynamic pad created, linking parser/decoder<br>ERROR: from element /pipeline/decode: Internal data flow error.<br>Additional debug info:<br>
gstwavparse.c(1719): gst_wavparse_loop (): /pipeline/decode:<br>streaming task paused, reason not-linked (-1)<br>--<br><br>It would be of great help if somebody look into this.<br><br><br>/Ganesh