Use SBE to implement Time Shifting

xiaoxiao2021-03-05  19

1. Overview of the Stream Buffer Engine (hereinafter referred to as SBE) provided by Windows XP Service Pack1 allows applications to locate, suspend, recording, fast forward, and reverse operations for video streams (including Live Source and File Source). With SBE, the application can simply quickly implement the TIME Shifting function. Currently, SBE is only available in Windows XP Service Pack 1/2, and only MPEG2 Stream and DV Stream are supported. Second, implementing the Stream Buffer Sink Filter and Stream Buffer Source Filter provided by SBE, the application can build two graphs. Then use IStreamBuffersource :: setStreamSink () to associate two graphs, so that Stream Buffer Source Filter reads the output of the Stream Buffer Sink Filter. To set the play rate, fast forward and reverse feature can be set by iStreamBufferMediaseeking :: setRate (). BTW: Two graphs can be in different processes (at this point two graphs from the iFilesourceFilter :: LOAD () of Stream Buffer Source Filter; additional, Sink Filter and Source Filter can also be in the same graph. Third, let's take a look at the My TV of Windows XP Media Center Edition: The leftmost is Stream Buffer Source Filter. Below, let's see how to realize the Time Shifting function on Live Source (File Source is similar to Live Source, which is no longer detailed). Check how the connection Stream Buffer Sink Filter: MPEG-2 stream into a Video Stream and Audio Stream by MPEG-2 Demultiplexer, which is directly connected to the Audio Stream Stream Buffer Sink Filter, Video Stream connected by MPEG-2 Video Stream Analyzer after Stream Buffer Sink Filter. Take a look at the connection method of Stream Buffer Source Filter: Four, the code needs to be implemented in the code in order to make the Stream Buffer Source Filter's output of the Stream Buffer Sink Filter. Here is pseudo code: iStreamBuffersink :: loadprofile (null); // must first lockprofile. If you want to set relevant properties, you must be iStreamBuffersource :: setStreamSink (ISTREAMBUFFERSINK) before Lockprofile; OK, run these two graphs, ok! You can configure relevant parameters (such as Buffer file size, path, etc.) by interfaces, iStreamBufferConfig, etc., and ISTREAMBUFFERCONFIG. If these steps are omitted, SBE will use the provincial parameters.

转载请注明原文地址:https://www.9cbs.com/read-38504.html

New Post(0)