fixed recplayer issues with large TS files (>4GB)

This commit is contained in:
Frank Schmirler 2014-10-24 12:29:49 +02:00
parent dd556ee7fd
commit 7df7185e1a
3 changed files with 7 additions and 3 deletions

View File

@ -226,3 +226,6 @@ hivdr
hummel99 hummel99
for reporting and helping to debug channel switch issues with priority > 0 for reporting and helping to debug channel switch issues with priority > 0
for reporting a race condition when switching the server's LiveTV device for reporting a race condition when switching the server's LiveTV device
Henrik Niehaus
for fixing replay of large TS files on 32-bit systems

View File

@ -1,6 +1,7 @@
VDR Plugin 'streamdev' Revision History VDR Plugin 'streamdev' Revision History
--------------------------------------- ---------------------------------------
- fixed recplayer issues with large TS files (>4GB)
- Don't abort externremux when internal read buffer is empty - Don't abort externremux when internal read buffer is empty
- Implemented remuxing of recordings - Implemented remuxing of recordings
- Make ChannelChange retune only if CA IDs changed (thanks to Oliver Wagner) - Make ChannelChange retune only if CA IDs changed (thanks to Oliver Wagner)

View File

@ -75,7 +75,7 @@ void RecPlayer::scan()
segments[i] = new Segment(); segments[i] = new Segment();
segments[i]->start = totalLength; segments[i]->start = totalLength;
fseek(file, 0, SEEK_END); fseek(file, 0, SEEK_END);
totalLength += ftell(file); totalLength += ftello(file);
totalFrames = indexFile->Last(); totalFrames = indexFile->Last();
//log->log("RecPlayer", Log::DEBUG, "File %i found, totalLength now %llu, numFrames = %lu", i, totalLength, totalFrames); //log->log("RecPlayer", Log::DEBUG, "File %i found, totalLength now %llu, numFrames = %lu", i, totalLength, totalFrames);
segments[i]->end = totalLength; segments[i]->end = totalLength;
@ -176,7 +176,7 @@ unsigned long RecPlayer::getBlock(unsigned char* buffer, uint64_t position, unsi
uint32_t yetToGet = amount; uint32_t yetToGet = amount;
uint32_t got = 0; uint32_t got = 0;
uint32_t getFromThisSegment = 0; uint32_t getFromThisSegment = 0;
uint32_t filePosition; uint64_t filePosition;
while(got < amount) while(got < amount)
{ {
@ -290,7 +290,7 @@ uint32_t RecPlayer::frameNumberFromPosition(uint64_t position)
if ((position >= segments[segmentNumber]->start) && (position < segments[segmentNumber]->end)) break; if ((position >= segments[segmentNumber]->start) && (position < segments[segmentNumber]->end)) break;
// position is in this block // position is in this block
} }
uint32_t askposition = position - segments[segmentNumber]->start; uint64_t askposition = position - segments[segmentNumber]->start;
return indexFile->Get((int)segmentNumber, askposition); return indexFile->Get((int)segmentNumber, askposition);
} }