At present, there are many video players that can play a variety of files and streams, but most of them only support one file or one stream. To play multiple files, you need to open multiple players manually. In real-world applications, in order to achieve multi-stream playback, the media stream is actually packaged and input directly into the communication interface of the computer, and played by multiple player processes. This is only suitable for playing unrelated media streams (such as Multi-channel video surveillance, multi-person conference system, etc.). For the associated media stream, such a player cannot control and synchronize multiple video file streams. Based on the research of multi-stream media synchronous playback technology, this paper develops multi-stream media player through the setting of streaming media server. The multi-stream media player can receive and decode the code stream of the multi-stream media server, and simultaneously synchronize the related streams, improving the internal structure of the player and the user interface of the player. After being transplanted into an Active control, it is called on the webpage, and the player is running well by performing a synchronous play test on the four media streams.
1 ActiveX introduces ActiveX as a collection of technologies. With ActiveX, developers can use almost any familiar tool to produce multimedia effects, interactive features, and complex applications. Its advantages are open cross-platform support, can run on Macintosh, Windows and UNIX operating systems, support Visual Basic, Visual C++, Borland Delphi, Borland C++, java and Java-enabled tools and other tools, support HTML, TCP / IP, Java, COM and other industry standards.
ActiveX's technology includes the ability for users to view non-HTML documents (such as word and excel documents) in the browser; objects that can be inserted into web pages or any application called a control container library (such as buttons, stock counters, and histograms). ); the document can be displayed in a frame form throughout the client area; the web content from the database or a program running on the server can be customized; the process can be moved from the server side to the client side [1].
2 synchronization methods, models, technologies
2.1 Streaming Media Synchronization Methods
Currently popular synchronization methods are hierarchical synchronization method and time stamp synchronization method.
The hierarchical synchronization method treats the multimedia stream as a tree structure composed of a serial parallel presentation subtree. There are two operations based on motion-based serial synchronization and parallel synchronization. The advantage is that it is easy to calculate storage and processing, so it is widely used.
Timestamp synchronization is the process of attaching multiple time-dependent media streams to a common timeline. Removing or changing an object does not affect the synchronization of other objects. During the run, study whether the common time axis and local time error exceeds the specified range, if it is exceeded, it needs to be synchronized. Quick Time uses this method. The advantage is that the internal structure of single media objects and nested media objects can be better abstracted.
2.2 Streaming Media Synchronization Model At present, the streaming media synchronization model uses the RTP/RTCP protocol, and uses the layered synchronization method and the timestamp synchronization method. The model structure is shown in Figure 1. The synchronization of human-computer interaction means that the user responds to the media operation and the media. The characteristic of this operation is that the time of occurrence is uncertain. Media-to-media synchronization means that streaming media objects are classified into time-independent media and time-related media based on temporal correlation. Synchronization in the media refers to the time synchronization relationship between media elements in a time-related media stream [2].

This article refers to the address: http://

2.3 Streaming Media Synchronization Technology Currently, there are three kinds of streaming media synchronization technology: (1) Windows Media Tools synchronization method, which uses the ASFINDEXER tool to set tags in the ASF stream, each tag has a corresponding name, in navigation Clicking on the tag name in the zone and using the corresponding call statement will cause the media player to jump to the location of the marker to start playing; (2) Microsoft Producer method, which uses the tool to import the video and split it into several clips (create clips ), drag the clips to the timeline in turn, and then click the sync button to automatically generate the synchronization of the title, audio and video information; (3) SMIL language method, which uses SMIL (Synchronized Multimedia Integration Language) language to describe various media The time synchronization relationship and spatial arrangement relationship between the various media files such as audio, video, text, pictures, etc. are synchronized to achieve synchronization [3].
3 multi-stream player design
3.1 Deployment of Streaming Media Server
Windows Media Server is a streaming media server software provided by Microsoft free of charge. You can select this service when installing Windows 2003. You can also choose to add this service in Windows Add and Remove Programs after Windows is installed.
Media Services 9 can add asf, wmv and other stream files to C:WMPubWMRoot, and then use "mms://address/filename" to access, or re-establish access to the directory.
3.2 Multi-stream player The multi-stream player should have the function of inputting multiple related files/streams into the player and decoding them so that multiple files/streams can be simultaneously displayed in the player window. The system structure is shown in Figure 2.

After a period of development, it was found that the PIN output and PIN input for each Filter can only be single. A player can only encode/decode one stream file. Therefore, playback of multiple pictures cannot be achieved in this way.
Figure 2 is an improvement, and Figure 3 is a structural diagram of the improved system.

This method is under the shell of a player and contains multiple players. In fact, each video window is a separate video player. Multiple media are played under the same shell player. The shape is a player. The internal player is played by multiple players. By setting some application properties, the playback control function can be conveniently realized.
3.3 Playback process of the player The playback process of the player is: open the multi-stream player, load the media control file, determine the number of windows, assign the value of the url of the media stream, the synchronization time to each window, and synchronize the technical playback control. Video, display video, when the user controls, feedback the user, the playback is completed. Figure 4 is a playback flow chart of the player.

3.4 Synchronization method, model and solution technology adopted by streaming media player The multi-stream media player developed in this paper supports 4 streaming media. The synchronization model adopts the model shown in Figure 1. The user interaction operation adopts hierarchical synchronization method, which is time-independent. The layered synchronization method is adopted between the media streams, the time-dependent synchronization method is adopted between the time-related media streams, and the buffer control synchronization method is adopted for the single media stream. The synchronization solution technology combines the three methods described above, and uses the third synchronization technology in Section 2.3 to coordinate the synchronization between the four streaming media by the synchronization information in the decoder decoding file, and simultaneously record the synchronization information using the text file. And tracking the jump time to achieve synchronization between multiple streams. The specific synchronization solution technology is: when four streaming media open the streaming media, synchronously read the time header, synchronize when the streaming media starts playing, and then use the synchronization information recorded by the text file to use the streaming media 1 as the reference time axis, and the other The streaming media detects the synchronization information every 1 000 ms. If it is found that multiple streaming media playback time points are consistent with the recording synchronization information in the text file, no synchronization is required, and the synchronization information recorded by the text file is adjusted. [5-6 ].
3.5 Streaming Media Player Core Program (1) Read Synchronization Point (Save Synchronization Information Point with Array)
Open sycFile For Input As #1
Line Input #1, sycQt
ReDim WMP1time (sycQt), WMP2time (sycQt), WMP3time (sycQt),
WMP4time(sycQt)
For i=1 To sycQt
Input #1, WMP1temp, WMP2temp, WMP3temp, WMP4temp
WMP1time(i)=WMP1temp
WMP2time(i)=WMP2temp
WMP3time(i)=WMP3temp
WMP4time(i)=WMP4temp
Next i
Close #1
Sycponit=1
(2) Determine whether to synchronize by comparing the play time with the synchronization time array
If WMP1time(sycpoint)=curtime Then
WindowsMediaPlayer1.Controls.pause
WindowsMediaPlayer2.Controls.stop
WindowsMediaPlayer3.Controls.stop
WindowsMediaPlayer4.Controls.stop
WindowsMediaPlayer2.Controls.currentPosition=WMP2time(sycpoint)
WindowsMediaPlayer3.Controls.currentPosition=WMP3time(sycpoint)
WindowsMediaPlayer4.Controls.currentPosition=WMP4time(sycpoint)
WindowsMediaPlayer1.Controls.play
WindowsMediaPlayer2.Controls.play
WindowsMediaPlayer3.Controls.play
WindowsMediaPlayer4.Controls.play
Sycpoint = sycpoint + 1
End If
4 Multi-stream media player ActiveX control design summary In order to realize the application of multi-stream media player in the network, the program can be transplanted into an ActiveX control. In this paper, you can create a control by selecting "ActiveX User Control" in the VB new project. The programming is not much different from the multi-stream media player designed above. But the way it opens is different. The program is that the user chooses to open multiple streaming media files and assign values ​​to the four Windows Media Player controls. But in ActiveX controls, assigning values ​​to Windows Media Player is either a website developer assignment or assigning it to a dynamic page.
4.1 Control properties, methods, and events As a control, properties are an embodiment of their main functions. Define an attribute, in addition to considering the naming and function, but also consider the data type of the attribute, whether to allow reading and writing, whether it is allowed to be used at design time or at runtime [4].
Attributes, methods, and events are collectively referred to as members of a control. The interface members of the control are public (public) and private (private). Private members can only be called inside the module, and public members can be called by users of ActiveX controls.
Use the menu "Tools / Add Process" to add members of the control, there are four types: Sub (subprogram), Property (function), Function (function), Event (event). There are two ranges: Public (Public), Private (Private) [7-8].
4.2 Player Properties Settings The user procedures selected by this player are Property and Public. The generated code is:
Public Property Geturl1() As String
End Property
Public Property Let url1(ByVal New_url1 As String)
End Property
Where Property Get() reads the property value of the procedure, and Property Set() assigns a value to this procedure. You can assign values ​​and values ​​to the set user attributes.
In this control, a total of 9 user attributes are set. Assign 4 urls, 4 sync start times, and 1 window number. Set interface attributes startTime1, startTime2, startTime3, startTime4 for file header synchronization; sycFile for synchronization in files.
Figure 5 is a test diagram of multi-window debugging synchronization. When the program is running, the synchronization file is first read, and the number of synchronization points and the synchronization time of the first synchronization point are read. At the same time, each medium is run, and when the first media playing window is played to the synchronization point time, it is judged whether the other three media playing times are the same as the read synchronization time, and the same is not synchronized, and the synchronization starts.

Currently, streaming media players are widely used in networking, teaching, conferencing, and entertainment. This paper analyzes the multi-stream media server setup and multi-stream playback architecture design, and describes the synchronization mode and synchronization technology. The player ActiveX control is designed to provide a new solution for the research of multi-stream media player. .
references
[1] Lu Qiming. DirectShow Development Guide [M]. Beijing: Tsinghua University Press, 2003: 1-3.
[2] Wang Xinxin. Research on streaming media synchronization mechanism based on campus network [J]. Journal of Xiangfan Vocational and Technical College, 2006, 5(6): 7-8.
[3] Zhang Bingzhuo, Su Gong. Establish a network teaching system for Real streaming media technology [J]. China Electro-education Education, 2004 (6): 83-85.
[4] Li Hai. Visual Basic programming advancement, ActiveX control [M]. Beijing: Tsinghua University Press, 2000: 100-120.
[5] GINSBURG M. Late Night ActiveX[M]. Simon and Schuster, 1997: 50-63.
[6] Xu Yan. Synchronous feedback control algorithm for media in storage media [J]. Journal of Electronics, 2002, 39(12): 1675-1680.
[7] Zhang Zhenxin. Design and implementation of streaming media player based on SMIL [J]. Fujian Computer, 2007 (9): 134-136.
[8] DirectShow-based streaming media decoding and playback [EB/OL]. Daily new blog garden. http://

Buffet Warmer

Buffet Warmer,Food Warmer,Stainless Steel Food Warmer,Unter Top Buffet Food Warmer

Shaoxing Haoda Electrical Appliance Co.,Ltd , http://www.zjhaoda.com