Stream Buffer Engine
from http://msdn.microsoft.com/en-us/library/dd695340%28VS.85%29.aspx
The Stream Buffer Engine enables an application to seek, pause, andrecord a live video stream without interrupting the stream. Transitionsbetween live and recorded content are seamless. Currently, the StreamBuffer Engine supports MPEG-2 video and digital video (DV) sources, atcapture rates up to 20 megabits per second (Mbps).
Applications can use the Stream Buffer Engine to provide VCR-likefunctions, such as pause, seek, and multi-speed play ("trick mode"),while rendering a live video stream. Applications can also use theStream Buffer Engine to record video for later playback.
The Stream Buffer Engine uses two or more independent filter graphs. One filter graph, called the sink graph, captures data from a live source. The other graphs, called sourcegraphs, render the data. Using several filter graphs is more flexibleand scalable than using a single graph for both capture and rendering.The sink graph stores the data in a temporary buffer or in permanentfiles, while the source graphs read the data from those files. Severalsource graphs can read data from the same sink source.
A source graph can:
The Stream Buffer Engine uses multiple filter graphs:
The sink graph can also create permanent recordings, which can beviewed later using the Stream Buffer Source filter. Currently, theStream Buffer Engine supports MPEG-2 video and digital video (DV)sources. The source graph must be on the same computer as the sinkgraph; the source graph cannot read the backing files over a network.
The Stream Buffer Sink filter stores the data that it captures intemporary backing files. By default, it uses six files, each holding 5minutes of data, for a total buffer of 30 minutes. (The defaultsettings can be changed through the IStreamBufferConfigure interface.)
Once the buffer limit is reached, the Stream Buffer Sink filterbegins to delete files, starting from the oldest file. If a sourcegraph is currently reading from that file, the sink filter deletes thenext oldest file instead, creating a "time hole" in the playback. Timeholes are caused when the source graph pauses for too long or seeksbackward to the beginning of the buffer.
When the Stream Buffer Source filter reaches the gap where the filewas deleted, it moves to the next file. However, because thepresentation times haven't changed, the last frame from the older fileis displayed for the duration of the deleted file. The video thereforeappears to freeze for that period of time. To avoid this, the sourcegraph should seek forward to the next valid data.
联系客服