2012-10-08, 05:51
@janbar
As I mentioned earlier, this feature isn't working yet but I have a question. The block of code that has the 0.5s delay you mentioned is in the cmyth_livetv_chain_switch function. This isn't getting called every read so I don't think it will be called up to 150 times as you said. Was this supposed to be located somewhere different in the code perhaps?
(2012-10-07, 18:41)janbar Wrote: @Aubrien,
I had a timeout on empty buffer to manage your case. It is not related to program break. Just player need to wait refilling buffer. commit is 4bb5093.
I hope it close your issue. Think player retry x150 reads before closing live stream. So waiting 0.5s x 150 ~ 1 minute. At the moment i fixed 0.5s per retry.
br.
As I mentioned earlier, this feature isn't working yet but I have a question. The block of code that has the 0.5s delay you mentioned is in the cmyth_livetv_chain_switch function. This isn't getting called every read so I don't think it will be called up to 150 times as you said. Was this supposed to be located somewhere different in the code perhaps?
Code:
/* JLB: Current buffer is empty on the last file.
* We are waiting refilling the buffer until file data
* connection is up.
* Timeout is 0.5 seconde before release.
*/
else {
cmyth_dbg(CMYTH_DBG_ERROR,
"%s: wait some time before request block\n",
__FUNCTION__);
//for ( i = 0; i < 4; i++ ) {
pthread_mutex_unlock(&mutex);
/* Check file data connection. If up then wait */
if ( cmyth_file_data_conn_fd(rec->rec_livetv_file) == 1 )
usleep(500000);
pthread_mutex_lock(&mutex);
//}
}