The MPEG-1 data received by the web server side must perform a certain amount of buffer before it can be handed over to DirectShow decoding processing. The system dynamically receives data from the network, and the decoding playback of data is performed. Here is a dual buffer queue technology using it.
The working principle of the double buffer queue technology is to establish two queues, one is a POOLLIST, an idle buffer queue to receive storage data; the other is DataList, the data buffer queue that has not been processed, waiting for DirectShow processing. When the network receives data of a packet, remove a buffer, store data, and add this buffer to the tail of Datalist Wait for DirectShow's Filter read. DirectShow outsource from the head area of the DataList queue, reads data, adds the read buffer to the tail of the POOLLIST, waiting to receive data again.
DirectShow is a technology based on a COM system that consists of many modular software components. In this system, the most basic construction module is referred to as a filter. DirectShow divides the process of multimedia data into several steps, each step by a filter. In the application, in order to complete the processing of multimedia data, a plurality of filters need to be connected, one output as another input, and a set of filters connected together is referred to as a filter diagram. Details of data transmission between filters are processed by the plug. The plug is actually a COM object, divided into input plugs and output plugs. The plug is equivalent to the connection between the filter, and the output plug located upstream of the filter and the input plug located in the downstream filter. The plug knows the media type they support and negotiate the media type when the two filters are initially connected. When the media type negotiation is completed, the plug will further discuss how data is transmitted when the filter chart is run. When the original data is added to the filter diagram, whether the data is from the capture card or other data sources, it must be parsed into meaningful units, ie media samples, can be passed in the filter diagram. The management of the filter diagram is completed by a higher level component, which is filter diagram manager. Filter Chart Manager can perform some higher-level calls, such as running, stop, and more. Usually complete DirectShow filter diagrams require three types of filters: source filter, transform filter And implement filters. After receiving the original data, the source filter receives the data processed by the filter output by the transform filter.
Server receives
MPEG-1
The video source is constantly written to the double buffer queue, while
3-14
The filter diagram shown will start running under the filter diagram manager control. This is at this source filter
MPEG
-
1 Source
Downstream
MPEG
-
1stream spliter
A data read request is proposed to the source filter to actively. After receiving the data reading request, the source filter will start to obtain a video packet from the double buffer queue, and pass the package and reorganization.
MPEG-1 Stream Spliter
.
MPEG-1STREAMSPLITER
Conversion filters that are submitted to the downstream of the obtained data
MPEG-1 Video Decoder
, Actually
MPEG-1
decoding. Finally by implementing the filter
Video Render
Export the decompressed video image to the display of the server side.