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>Somebody already posted the similar problem in the mailing list ( <a href="http://lists.maemo.org/pipermail/maemo-developers/2006-August/023007.html">http://lists.maemo.org/pipermail/maemo-developers/2006-August/023007.html</a> ), but solution is not mentioned over there. <br>
<br>It would be of great help if somebody look into this.<br><br>Thanks,<br>Ganesh<br>