<DIV>Hi all,</DIV>
<DIV>&nbsp;&nbsp; I have make a simple mp3 player with gstreamer framework , I can play one song a time ,while play the next song I had to restart the application,the&nbsp;application related&nbsp;pipe line is as following:<BR>gst-launch filesrc location=/home/test.mp3 ! mad ! audioresample ! ossink</DIV>
<DIV>&nbsp;</DIV>
<DIV>but when I tried to implment loop playing, I failed the the state commit waiting error,</DIV>
<DIV>the way I tried to make it is to change the pipe line's states,that is:</DIV>
<DIV>1. create a pile line (filesrc--mad--audioresample--osssink),and&nbsp; set the pipe to GST_STATE_NULL&nbsp;</DIV>
<DIV>2&nbsp;&nbsp;set the element's properties and set the pipe line's state to GST_STATE_PLAYING when&nbsp;receive play instuction from my gui, and the song can be play correctly</DIV>
<DIV>3. set the pipe line's state to GST_STATE_NULL first ,reset the element's properties and then set to GST_STATE_PLAYING when&nbsp;receive play next song instuction from my gui, but the pipe line not performed as my expected,</DIV>
<DIV>,It perform the following state change only:</DIV>
<DIV>&nbsp; </DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; 1st schedule :set to&nbsp;null success,</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; GST_STATE_PLAYIG---GST_STATE_PAUSED----GST_STATE_READY---GST_STATE_NULL</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2nd schedule :set to playing failed:</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; GST_STATE_NULL(success)---GST_STATE_READY(success)---GST_STATE_PAUSED(success)--- .....then,it pended here waiting for the 1st elmement osssink to complete the state change from&nbsp;&nbsp;GST_STATE_PAUSED to GST_STATE_PLAYIG</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; I tried to make some changes to the ossink plugin and gstbasesink by adding some printf code the place where state change procesing,then rebuild the element but when rerun my application it give nothing of the output information</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;Is there any&nbsp;problem in&nbsp;my implementation way?</DIV>
<DIV>&nbsp;&nbsp;&nbsp; How to&nbsp;make it give output information by adding&nbsp;my&nbsp;own debug code to the framework with printf&nbsp;fuction?</DIV>
<DIV>&nbsp;&nbsp;&nbsp; It&nbsp;seems&nbsp;that the&nbsp;ossink plugin&nbsp;occur an&nbsp;error which made the&nbsp;whole pipe line hanging,is that ture?&nbsp;how to efficiently trace it(I have tried use --gst-debug-level option and gdb ,neither of them could take me to the code where the error occur? </DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; My hardware platform is davinci DM644X ,Any ideas?thank you!</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;Volter</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp; </DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</DIV><br><!-- footer --><br><hr>
<a style="font-size:14px;line-height:15px; color:#000; text-decoration:none" href="http://event.mail.163.com/chanel/click.htm?from=NO_26&domain=163" target="_blank"><span style="text-decoration:underline; color:blue">中 国 最 强 网 游 --- 网 易 梦 幻 西 游 ,166 万 玩 家 同 时 在 线</span> </a>