And for me switch to live tv don't always work while fast forwarding.
probably because I limited the file offset to end-of-file + 1MB
http://openpli.git.s...c7ac638011fc887
when the distance between end of file samples is more than 1MB, it might happen that skipping to end-of-file + 1MB does not cause a switch to the live point.
This is what I found out: When fast forward reaches file end (it must be > 8x fast forward!) this happens:[list]
[*]In eDVBChannel::getNextSourceSpan m_tstools.findNextPicture fails and "frame skipping failed, reverting to byte-skipping" is visible in the logs.
[*]m_tstools.findFrame (also in getNextSpan) is then executed with offset = current_offset + align(m_skipmode_m, , blocksize);
New offset is bigger than filesize!
[*]In findFrame a frame is found with offset < _offset(function parameter)
[/list]
So a frame is found, but the found offset is smaller than the given offset. (I hope you understand it. Here is how it looks in the logs):
we are at 210397192, and we try to skip 32+0 frames from here trying to move 32 frames at 210397192 trying to find iFrame at 210397192 result: offset=210548384, len: 43044 we moved 10, 22 to go frames (now at 210548384) result: offset=210548734, len: 42694 we moved 0, 22 to go frames (now at 210548734) trying to find iFrame at 210548734 result: offset=210739392, len: 45300 we moved 10, 12 to go frames (now at 210739392) trying to find iFrame at 210739392 result: offset=210739554, len: 45138 we moved 0, 12 to go frames (now at 210739554) trying to find iFrame at 210739554 result: offset=210925700, len: 46804 we moved 10, 2 to go frames (now at 210925700) trying to find iFrame at 210925700 result: offset=210925862, len: 46642 we moved 0, 2 to go frames (now at 210925862) trying to find iFrame at 210925862 [eMPEGStreamInformation] index 12078 is past EOF getStructureEntryNext failed, no data findFrame failed! frame skipping failed, reverting to byte-skipping we are at 212197104, and we try to find the iframe here: trying to find iFrame at 212197104 result: offset=210328210, len: 69014The last 4 lines are important. We start with offset 212197104 and find a frame with offset 210328210 (it's a fast forward!!!).
According to tstools.h "findFrame will look for the specified frame type starting at the given position, moving forward (when direction is >0) or backward (when direction is <0)" I would say that the result is not correct.
I would add at the end of findFrame something like this:
if ((direction >= 0 && start < _offset) || (direction < 0 && start > _offset)) then return -1;A very short test, worked here.
Edited by betacentauri, 18 February 2013 - 23:34.