<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="border-collapse: collapse; font-family: Verdana, Geneva, Helvetica, Arial, sans-serif; font-size: 13px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">Hello @ all, <br>
I am developing a media player class using qt on freescale's imx515 processor and i am using playbin2 elent to create the pipeline. I am able to play/stop/pause amy video i want but the problem is that when i am letting a playlist loop for a long time (> 4Hours) in poll_for_state_change() : <br>
<br>int CGStreamer::poll_for_state_change(GstState sRecState, GstElement * elem) <br>{ <br> GTimeVal tfthen, tfnow; <br> GstClockTimeDiff diff; <br> GstStateChangeReturn result = GST_STATE_CHANGE_FAILURE; <br> GstState current; <br>
guint32 timeescap = 0; <br> gchar *ele_name = gst_element_get_name(elem); <br><br> g_get_current_time(&tfthen); <br> result = gst_element_set_state(elem, sRecState); <br><br> if(result == GST_STATE_CHANGE_FAILURE) <br>
{ <br> if( NULL != ele_name ) <br> { <br> g_free(ele_name); <br> } <br> return -1; <br> } <br><br> while(1) <br> { <br> gst_element_get_state(elem, ¤t, NULL, GST_SECOND); <br>
g_get_current_time(&tfnow); <br> diff = GST_TIMEVAL_TO_TIME(tfnow) - GST_TIMEVAL_TO_TIME(tfthen); <br> diff /= (1000 * 1000); <br> timeescap = (unsigned int) diff; <br><br> if( sRecState == current ) <br>
{ <br> break; <br> } <br> else <br> { <br> if (timeescap > 10000) /* 10s */ <br> { <br> printf( "\n%s(): Element %s time out in state transferring from %s to %s\n", <br>
__FUNCTION__, ele_name, <br> gst_element_state_get_name (current), <br> gst_element_state_get_name (sRecState) ); <br> if( NULL != ele_name ) <br> { <br>
g_free(ele_name); <br> } <br> return -1; <br> } <br> } <br> } <br><br> if( NULL != ele_name ) <br> { <br> g_free(ele_name); <br> } <br>
<br> return 0; <br>} <br><br>I get Element playbin20 time out in state transferring from PAUSE to PLAYING. <br><br>Since i am new to the whole gstreamer environment i was really surprised to get a timeout since my application waits for EOS before any state change on the element. <br>
Have you any idea why this might happen ? <br><br>Thanks in advance for your help. <br><br>Best Regards, <br><br>Stavros.</span>