[gst-devel] why the state changing is not completed?
volter619 at 163.com
Sun Mar 23 04:29:44 CET 2008
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 application related pipe line is as following:
gst-launch filesrc location=/home/test.mp3 ! mad ! audioresample ! ossink
but when I tried to implment loop playing, I failed the the state commit waiting error,
the way I tried to make it is to change the pipe line's states,that is:
1. create a pile line (filesrc--mad--audioresample--osssink),and set the pipe to GST_STATE_NULL
2 set the element's properties and set the pipe line's state to GST_STATE_PLAYING when receive play instuction from my gui, and the song can be play correctly
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 receive play next song instuction from my gui, but the pipe line not performed as my expected,
,It perform the following state change only:
1st schedule :set to null success,
2nd schedule :set to playing failed:
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 GST_STATE_PAUSED to GST_STATE_PLAYIG
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
Is there any problem in my implementation way?
How to make it give output information by adding my own debug code to the framework with printf fuction?
It seems that the ossink plugin occur an error which made the whole pipe line hanging,is that ture? 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?
My hardware platform is davinci DM644X ,Any ideas?thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gstreamer-devel