Chinaunix首页 | 论坛 | 博客
  • 博客访问: 191159
  • 博文数量: 20
  • 博客积分: 1400
  • 博客等级: 上尉
  • 技术积分: 290
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-16 13:08
文章分类

全部博文(20)

文章存档

2010年(1)

2009年(10)

2008年(9)

我的朋友

分类: WINDOWS

2009-10-12 17:41:47


Stream Buffer Engine

from

The Stream Buffer Engine enables an application to seek, pause, and record a live video stream without interrupting the stream. Transitions between live and recorded content are seamless. Currently, the Stream Buffer Engine supports MPEG-2 video and digital video (DV) sources, at capture rates up to 20 megabits per second (Mbps).

Applications can use the Stream Buffer Engine to provide VCR-like functions, such as pause, seek, and multi-speed play ("trick mode"), while rendering a live video stream. Applications can also use the Stream 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 source graphs, render the data. Using several filter graphs is more flexible and scalable than using a single graph for both capture and rendering. The sink graph stores the data in a temporary buffer or in permanent files, while the source graphs read the data from those files. Several source graphs can read data from the same sink source.

A source graph can:

  • Seek forward or backward within the stored content.
  • Pause playback, without interrupting the data coming from the capture graph.
  • Play faster or slower than normal.
  • Play in reverse.

The Stream Buffer Engine uses multiple filter graphs:

  • A sink graph captures data and stores it in temporary backing files. The sink graph uses the filter.
  • One or more source graphs read the data from the backing files. The source graphs use the filter.

 

Stream Buffer Engine filter graphs

 

The sink graph can also create permanent recordings, which can be viewed later using the Stream Buffer Source filter. Currently, the Stream Buffer Engine supports MPEG-2 video and digital video (DV) sources. The source graph must be on the same computer as the sink graph; the source graph cannot read the backing files over a network.


The Stream Buffer Sink filter stores the data that it captures in temporary backing files. By default, it uses six files, each holding 5 minutes of data, for a total buffer of 30 minutes. (The default settings can be changed through the interface.)

Once the buffer limit is reached, the Stream Buffer Sink filter begins to delete files, starting from the oldest file. If a source graph is currently reading from that file, the sink filter deletes the next oldest file instead, creating a "time hole" in the playback. Time holes are caused when the source graph pauses for too long or seeks backward to the beginning of the buffer.

 

Time holes in stream buffer content

 

When the Stream Buffer Source filter reaches the gap where the file was deleted, it moves to the next file. However, because the presentation times haven't changed, the last frame from the older file is displayed for the duration of the deleted file. The video therefore appears to freeze for that period of time. To avoid this, the source graph should seek forward to the next valid data.




阅读(1644) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~