why the state changing is not completed?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

why the state changing is not completed?

Volter Yen
Hi all,
   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,
     GST_STATE_PLAYIG---GST_STATE_PAUSED----GST_STATE_READY---GST_STATE_NULL
 
     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!
 
    Volter
 
  
 
     



中 国 最 强 网 游 --- 网 易 梦 幻 西 游 ,166 万 玩 家 同 时 在 线
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel