Hi pieterg,
that corresponds to what I saw. But I still don't understand why skipping backwards causes a jump to live tv. Skipping backwards shouldn't be a problem.
I added some debug messages to the filepush thread. I can see that the jump backwards works:
current_offset 13475840, new_offset 13475840, last_offset 13475840
current_offset 13475840, new_offset 6595228, last_offset 13475840
current_offset 6691484, new_offset 6691484, last_offset 6691484
current_offset 6787740, new_offset 6787740, last_offset 6787740
...
But then one threads seems to send the EOF event.
eDVBChannel: End of file!
timeshift EOF, so let's go live
SwitchToLive
Which thread it is, I currently don't know. Most probably the timeshift file read thread. Sending EOF can only occur when m_send_pvr_commit is false.
But I also don't understand this (filepush.cpp):
/* in stream_mode, we are sending EOF events
138 over and over until somebody responds.
139
140 in stream_mode, think of evtEOF as "buffer underrun occurred". */
141 sendEvent(evtEOF);
142
143 if (m_stop)
144 break;
145 if (m_stream_mode)
146 {
147 eDebug("reached EOF, but we are in stream mode. delaying 1 second.");
148 sleep(1);
149 continue;
150 }
151 else if (++eofcount < 10)
152 {
153 eDebug("reached EOF, but the file may grow. delaying 1 second.");
154 sleep(1);
155 continue;
156 }
157 break;
Why do you send EOF immediately and not after 10 tries (eofcount)?
I'll debug now a little bit more.
Edited by betacentauri, 27 January 2013 - 19:49.