Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: A backward compatible solution for the 2GB video file limit



Stefan Huelswitt wrote:
> 
> Hi,
> 
> It is well known that VDR has a 2GB limit for it's video files.
> This is due to the 32-bit signed integer used for the index
> pointer. By now Klaus refuses any change in this area because
> this would require to change the format of the index file and
> wouldn't be backward compatible with the old format. I can
> understand this very well and I'm not going to argument against
> this.
> 
> But I think there is an (relatively) easy AND backward compatible
> way to remove the 2GB limit:
> 
> Each index entry saved to the index file has this format:
> 
> struct tIndex { int offset; uchar type; uchar number; short reserved; };
> 
> "offset" is the file offset in question. As you can see, it's a
> 32-bit signed value. You can see a "reserved" field, too.
> 
> I suggest to change the VDR internal representation of the file
> offset from int to unsigned long long (64-bit). For saving the
> index entry I suggest this format:
> 
> struct tIndex { unsigned int offset; uchar type; uchar number;
>                 unsigned short offsetHi; };
> 
> where "offset" holds the lower 32-bit of the file offset and
> "offsetHi" holds additional 16-bit. This change is backward
> compatible because today the reserved word is zeroed out anyways
> and for file sizes <2GB offsetHi would be zero too. So the index entry
> for files <2GB is exactly the same in both represantations.
> With the high offset the total range would be 48-bit means 256TB.
> 
> Let me know what you think?
> 
> PS: I'm not going to create any code unless there is a high
> chance that this gets included...

It's not as simple as just changing that struct.
This has effects on every place that works with
file indexes, so it might result in all new problems.

At this time I am definitely not going to touch this
area, since this already works fine and changing it
would not add any new functionality (but might break
something that already worked).

Maybe later...

Klaus


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index