2012-10-08, 11:01
(2012-10-08, 05:51)Aubrien Wrote: @janbarHi aubrien. When data block are requested and backend return 0 bytes available then at each time we try to switch file. So every time you have zero bytes it pass by this way. Only here we know exactly what to do: wait or switch next file if exists.
(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);
//}
}
Retry with extra log like previous and we ll see what it does. Also please can you have a look on your mythbackend log to try to understand what is it doing at this moment and why it doesn t push data. It will be interesting. You can post logs to me. Thanks.
Also you can try dteirney solution to see what happen.
@dteirney: hi, yes it could run. But it set a constant delay even if it is not required. With this solution spawn and swicth get 5 or 10 second more. Please read my previous post where i explained what happen during program break. I finished the merge with cfetzer and i requested to pull my last change containing the resolution of program breaks based on mythfrontend strategy. Br