First, the introduction
We know that the key technology of video chat software is to collect video and transmit it to people who chat software online in real time. For the video capture, here is a Microsoft company's digital video software package VFW (for Windows). I believe a lot of people are familiar with it, VFW can enable applications to digital devices from the traditional analog video source to get digital video clips, VFW A key idea is that no dedicated hardware to play. In order to solve the problem of large amount of digital video data, it is necessary to compress the data, and VFW introduced the file standard of AVI. This standard does not stipulate how to capture, compress and play the video, only specify how the video and audio are stored on the hard disk and alternately store the video frame and match the audio data in the AVI file. Through VFW, developers capture, play, and edit video clips by sending messages or setting properties. When a user installs VFW, the installer automatically installs the components needed to configure the video, such as device drivers, video compression programs, and so on. VFW mainly consists of 6 modules. VFW Function Module:
AVICap. DLL contains functions to perform video capture, which provides an advanced interface for I/O processing of AVI files and video and audio device drivers
Msvideo. DLL contains a special set of DRAWDIB functions to handle video operations on the screen
Mciavi. DRV includes drivers for the MCI command interpreter for VFW
Avifile. DLL contains the higher commands provided by the standard multimedia I/O (mmio) function to access. AVI file
ICM compression Manager, for management of video compression/decompression compiler (CODEC)
ACM Audio Compression Manager, providing services similar to ICM for waveform audio
For video transmission, we use UDP to pass, because the UDP transmission speed, TCP is connection-oriented, the two sides need to establish a connection after three times handshake, data transmission is reliable, FTP, Telnet, etc. is based on TCP, UDP is not connected to the issue of information, not required to confirm, But this speed is faster than TCP, but it is possible to lose data, such as SMTP, TFTP and so is based on UDP. In addition, UDP also supports radio, UDP broadcast two kinds, one is directed broadcast, for example, your network segment is 192.168.0.X, you go to 192.168.0.255 hair on it. The other is limited broadcast, the broadcast address is 255.255.255.255