|
|
Freeing Data
A significant challenge that arises if the buffer manager
allows seek operations is the following: When can we be
certain that a data item will not be accessed anymore in the
future? With a purely sequential stream format — e.g., an
MPEG-2 program stream — the read pointer in the data
buffer will generally be monotonically advanced and data
behind it can be freed. However, with the AVI file format
seek operations do not guarantee a monotonically increasing
read position. Obviously, if read locations are randomly
distributed across the complete file then having a limited
playout buffer will be impossible.
Luckily, seek and read
operations exhibit a localized behaviour. Figure 3 shows
the trace data we obtained from a 10 minute long DivX AVI
movie. After initially reading the frame table at the very
end of the file, all operations take place within a \'sliding
window\' of a few megabytes of data.
To accommodate
this behaviour we implemented a sliding release pointer in
the following way. A maxReadOffset pointer keeps track
of the furthest seek/read position. This pointer only moves
forward, i.e., a seek backwards will leave it unchanged.
A
freeOffset pointer is then made to follow a fixed distance
behind the maxReadOffset, for example by 4 megabytes.
|
Added:14:13 25.08.2006
Sesso Video - www.38th-united-states-congress.wariaci.info - best health only at www.besthealth-care.com health care for you - Blood pressure Best health education Cardioversion - Published Health News Visit US -
|
|
|