Search code examples
computer-science

What are high and low water marks in bit streaming


I am studying CS and when I studied about buffers, I got confused with high water marks and low water marks. Can someone explain what are they.

img


Solution

  • A buffer is used to temporarily store some amount of data. Buffers can have a limited size, or be unlimited (considering the RAM in your computer is limited, one could argue that every buffer is limited). In your picture, the buffer is limited, which means it is only able to store some amount of data, for example 100 or 1000 data packages.

    The buffer gets filled by data sent from the Media Server. How should the media server know, how much data it should send? Typically, if the buffer contains less items than the "low-water mark", the Media Player can tell the Media Server over the Control data channel something like "send me more data". If the buffer is then filled up and contains more than "high-water mark" items, the media player can signal "send me less data".

    So, the high- and low-water marks can be interpreted as fill-percentages of the buffer where the buffer might no longer operate successfully, either because it might soon be empty (being at the low-water mark or even lower), or because it might soon be full and thus no longer able to store more items (when being at or over the high-water mark).