Not getting EOS from gstreamer

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Not getting EOS from gstreamer

2,994 次查看
shrimanthramesh
Contributor I

Dear Technical Support Team,

Am using L2.6.35_1.1.0_130130_source in imx28 custom board, I have a c-application as shown below and I like to play audio files continuously one after the other from pen-drive using gstreamer.

Am facing the one issue, songs will be playing one after the other continuously but after 2 or 3 hours it doesn't go to next song automatically .

Even If i try to play next song by seek option, it plays song but with old metadata & after completing that song again it wont go to next song automatically.

I tried to debug the issue in gst-fsl-plugins-3.0.6/tools/gplay/mfw_gplay_core.c file by putting some debug prints & below are my observation:

- In normal working condition, once song is completed it comes inside my_bus_callback() function & goes inside GST_MESSAGE_EOS case condition.

- But in NOT working condition,once song is completed it doesn't come inside my_bus_callback() function.

- I am not getting why my_bus_callback() is not getting called after few hours.

Could you please kindly help us as early as possible in resolving the above issue i.e, the song should play continuously one after the other

--------------------------------------------------------

OUR  APPLICATION CODE SNIPPET

To monitor the end of song(EOS) I am running a thread where it checks pplayer->klass->wait_message() for FSL_PLAYER_SUCCESS.

But in NOT working condition we are not getting FSL_PLAYER_SUCCESS even when song is finished playing.

Below is part of our code snippet 

void gstreamer_notification_thread_fun(fsl_player_handle handle)

{

    pplayer = (fsl_player*)handle;

    fsl_player_ui_msg msg;

    fsl_player_ret_val ret_val = FSL_PLAYER_SUCCESS;

    fsl_player_u64 totalDuration = 0, elapsedDuration = 0;

 

    printf("Audio Handler:Gstreamer notification thread created \n");

    while(1)

    {

        if( FSL_PLAYER_SUCCESS == pplayer->klass->wait_message( handle, &msg, FSL_PLAYER_FOREVER) )

        {

            switch( msg.msg_id )

            {

                case FSL_PLAYER_UI_MSG_EOS:

                    printf(" Audio Handler:FSL_PLAYER_UI_MSG_EOS\n");

                  

                      pplayer->klass->stop(pplayer);

     

            // Wait until eos message has been processed completely. Fix the bug of play/stop hang problem.

                    pplayer->klass->post_eos_semaphore(handle);             

                    pplayer->klass->stop(pplayer);

                        /* Stop elapsed timer & reset it */

                        pthread_cancel(threadElapsedTime);

                        g_pSysConfigSettings->usb1mediaSettings.elapsedTime =0;

                        iThreadFlag = 0;

        // always move forward while in playlist send direction value as 1

                    play_next_song(1); // SEEK FORWARD

        break;

         case FSL_PLAYER_UI_MSG_EXIT:

                                        printf("   Gstreamer Notification  FSL_PLAYER_UI_MSG_EXIT \n" );

                case FSL_PLAYER_UI_MSG_INTERNAL_ERROR:

                                        printf("  Gstreamer Notification  FSL_PLAYER_UI_MSG_INTERNAL_ERROR \n" );

                default:

                                        printf("   Gstreamer Notification  default %d\n",msg.msg_id );

                                      

                                        // Wait until eos message has been processed completely. Fix the bug of play/stop hang problem.

                        pplayer->klass->post_eos_semaphore(handle);

                                         

            }

    }

   }      

Awaiting for your replies,

Please provide us with your inputs as early as possible,

Thanks in advance again  

标签 (3)
0 项奖励
回复
5 回复数

1,851 次查看
enmaniamusic
Contributor I

Have you ever wondered where to download free ringtones online? Many people don't know where to start looking when downloading ringtones. Fortunately, kostenloseklingeltone.de is always ready to help. 

0 项奖励
回复

2,223 次查看
jamesbone
NXP TechSupport
NXP TechSupport

Can you find out which file caused EOS isn't sent out? Try play that file individually to see if it can quit playback automatically.

If yes, please send the file to us for checking.

0 项奖励
回复

2,223 次查看
shrimanthramesh
Contributor I

Thnaks Jamesbone,

>> Can you find out which file caused EOS isn't sent out? Try play that file individually to see if it can quit playback automatically.

- Song/file for which EOS isn't sent out is not fixed. It can happen to any file/song. It is random.

I tried to debug the issue in gst-fsl-plugins-3.0.6/tools/gplay/mfw_gplay_core.c file

by putting some more debug prints & below are my observation:

- In normal working condition, once the song starts playing it will come inside fsl_player_wait_message() & once it is completed it comes inside my_bus_callback() function & goes inside ' GST_MESSAGE_EOS ' case condition. Then it goes into fsl_player_wait_message() function & it will check pproperty->queue.klass->get() & return FSL_PLAYER_SUCCESS.

- But in NOT working condition,once the song starts playing it wont come inside fsl_player_wait_message() & once song is completed it comes inside my_bus_callback() function & goes inside ' GST_MESSAGE_EOS ' case condition. But it doesnot go inside fsl_player_wait_message() function.

In my application code, to play song one after the other automatically we ae running one thread where we are waiting for EOS i.e pplayer->klass->wait_message( handle, &msg, FSL_PLAYER_FOREVER).

Since it is not going inside fsl_player_wait_message() function in gst-fsl-plugins-3.0.6/tools/gplay/mfw_gplay_core.c file, So we are not getting response in application i.e pplayer->klass->wait_message() is continously waiting for response.

Please let us know why fsl_player_wait_message() is not getting called after 2/3 hours of continous running of song one after the other.

Please reply ASAP

Note : Attached log.txt file & fsl_player_wait_message() with debug print added

Thanks & Rgds

Shrimanth

0 项奖励
回复

2,223 次查看
jamesbone
NXP TechSupport
NXP TechSupport

Can you please share the media file example ( mp3 file)  that it is causing this problem?

0 项奖励
回复

2,223 次查看
jamesbone
NXP TechSupport
NXP TechSupport

We are reviewing your case internally, I believe the problem maybe related to the source of the songs,  since the USB peripheral need to be mux with the AUDMUX but the weird is that it is working for 2 hours. Have seen if this happening from another source lets say SDCard?

0 项奖励
回复