CONFERENCING
Introduction
Now the train has reached the station of video conferencing, Where we are going to have a tour together in Video Conferencing project as a first step which enables any one wants to work in this field to overcome the first problem which may face any body when working in a new project without having a background about it .
This project can he handled through Several points :
The first point which indicates our aim is to declare the mean of video-conferencing
Video is a voice and picture , So we want to transfer the picture and voice but the picture must be transmitted in frames to give the feel of motion
So as a first step to any one want to work in this field is knowing The Technique of transfer. This is obtained using Protocols to transfer between either two computers or through network , and that result in making our first point in talking to be about Networking Background , then When we want to transfer data in a short period of time so we have to use technique to compress these data . As an easy example when compressing text we can use a certain mark replace spaces and repeated characters to compress sent data .Then we use any programming language to translate these ideas into code which complete our main object .
15.1 NETWORKING BACKGROUND
15.1.1 Transmission Control Protocol / Internet Protocol ( TCP/IP)
TCP/IP is the foundation for all the other protocols . It’s really two protocol standards that work in union.
15.1.2 What is TCP/IP ?
Datagrams
Data transmission on the Internet usually occurs in chunks known as datagrams .
A datagram is just a specific number of bytes that is sent together at one time .
Data are broken into relatively small chunks that is in order not to consume a large amount of bandwidth for quite a long time , also If a host detected an error in the transmission, the datagram in which error exist will only be sent .
The size of a datagram is dependent upon the capabilities of the hosts on each end of the transmission.
If, For example, one host can support 1,500 - byte datagrams and the other only support 1,000 - byte datagrams, both sides will use 1,000 - byte datagrams.
Datagrams are a special case of packets, referring to the Internet Protocol.
An IP module adds its own header to the datagram in addition to the TCP header . The main fields of this new header are the source and the destination addresses, the checksum, the protocol, and the time to live.
The source address tells a receiving IP module the host from which this datagram came. The destination address tells an IP module, or an intermediate gateway, where to send this datagram.The IP checksum is used to ensure that IP header is not damaged, While the TCP checksum checks the accuracy of the datagram. The Protocol field is needed to specify to which protocol this datagram goes.
15.1.3 Transmission Control Protocol ( TCP)
TCP main responsibilities are :
The fields of the TCP header are the source port number, the destination port number , and the sequence number.
TCP port is just a number signifying the conversion to which the incoming datagram belongs.
The source and destination port numbers simply tell where the datagram comes from
( the source) and where the datagram is going (the destination)
The sequence number tells the destination TCP module where the datagram belongs when the file
(or whatever the datagrams represent) is reconstructed into its original form on the receiving host.
This number is important because the Internet Protocol considers each datagram to be separate entity not part of large group.
Three other fields of the TCP header are mostly involved with management of the datagrams. These fields include the checksum, the acknowledgment number, and the window.
The checksum is used to verify that the datagram arrived at its destination in exactly the same form as it left the sender.
The acknowledgment number is used to confirm the receipt of a datagram.
If the sending TCP module does not get this acknowledge in a timely manner, it assumed that the datagram was lost somewhere and resends the datagram.
Because waiting for the acknowledge of each datagram before sending any more would slow down transmission considerably, TCP uses a windowing system. This system allows the sending TCP module to send additional datagrams without having to wait for acknowledgment of each datagram it has sent to come back from the receiving TCP module . The amount of data that can be in transmit at any time is known as The window size.
The TCP header uses the window field to indicate how much data a host TCP module can still receive before its window is full.
The receiving TCP module can relay both an acknowledgment and a change of window size in one single datagram to reduce the amount of time the whole transmission takes.
15.1.4 Internet Protocol (IP)
IP is responsible for getting a datagram from point A to point B.
It doesn’t care about the contents of the datagram or the contents of the TCP header attached to the datagram . Its main concern is to find a route to the destination and so send the datagrams.
15.1.5 The Client - Server Model
TCP/IP applications generally utilize the client-server model.
To understand the need for those roles and their differences consider the problem of initially synchronizing any communication activity involving two parties. For example, To talk to someone on the phone one person has to initiate the connection by calling the other person and this other person must be listening for the phone ring. Similarly, To communicate over a network one computer must request to use a service on a remote machine . In order to process this request the remote machine must be expecting or listening for such a request.
The server side of a network application waits for requests from clients.
The client side initiates a request to the server using the server machine’s IP address
and the well-known or agreed-upon port value. Usually the client application prompts the user for the name of the server machine and resolves this name to its associated IP address. The server responds to the client’s request, and the required application data transfer can proceed.
After the server has received and responded to the client’s initial request, communication can continue according to the service protocol with either or both sides making requests and sending responses . It is important to emphasize that the server application must be running before the client request arrives.
Often machines that provide services automatically start the server applications when the machine is turned on so that, these services will always be available. Often server application can handle requests from multiple clients while client applications generally handle only one user. Thus server applications can be more difficult to write than client software.
15.1.6 Default Gateway
If the source and destination machine are the same network, data can be delivered directly to the destination machine. However, in internetworking configurations this is not necessarily the case.
Data is routed from one network to another using a gateway machine .which has an IP address for each network and can receive data from one network and send it out to another.
IP address values are used to determine if destination address is on the local network. If the network identifier portion of the destination IP address matches the network identifier in the IP address of the
local machine, data can be sent directly to the destination machine . Otherwise, it is sent to the default gateway. Data may be routed through several default gateways before reaching its final destination.
15.2 WINDOWS SOCKETS
The key to internet programming for windows is sockets. Sockets, in general means a set of functions to handle two-way communication using TCP/IP or other protocols.
15.2.1 What are sockets ?
Sockets came fromUNIX, and specifically from Berkeley UNIX (BSD) around 1980.
A socket is a piece of software that can both send and receive data over TCP/IP network.
There are three important pieces of information about a socket :
There are two types of sockets:
The TCP communication proceeds like this: the two machines form a connection, data is exchanged over the connection , the connection is closed.
Stream sockets implement TCP as it is used when the applications are going to exchange a lot of data.
15.3 AUDIO MANAGEMENT
13.3.1 What Is Sound ?
Sound is made up of air vibrates that transmitted forward in space . For example, if you were to pluck a string on a guitar , the movement of the string back and forth would disturb the surrounding air molecules, this disturbance would move out and away from the guitar in waves.
Generally, sound waves are generated by vibrating strings or surfaces, or by vibrations of air in pipes or cavities. The audio process begins with recording, when sound is converted into electrical signals.
The microphone would convert the vibrations from the guitar string into electrical vibrations.
Audio transmission and recording work because of the relationship between electricity and magnetism. Where there is electricity, there is magnetism, because electrical current flowing through a wire causes a magnetic field around the wire and vice versa.
A good audio system treats all audio frequencies equally, and does not allow noise to pollute the audio signal.
Distortion is any deviation in the electrical signal from the sound vibrations.Distortion can include alien sounds, which are sounds that should not be present, resulting from inadequacies in the audio system.
The amplifier should add no noise, and in the most powerful parts, neither the amplifier nor the speaker should limit the original signal.
The loudspeaker, in contrast to the microphone, uses incoming electrical signals to generate physical motion (sound vibrations). The incoming electrical signal, which is an identical electrical version of the original sound, is transmitted to the voice coil.The voltage generated in the coil by the magnetic field causes the coil to move forward and backward . The funnel-shaped cone attached to the coil moves in sympathy with the coil and causes the surrounding air to vibrate, so the original sound is reproduced.
Volume is sound intensity . It depends on the amplitude of the medium creating the sound , such as the string of a guitar or a loudspeaker cone. The amplitude of the wave is how far away the top or bottom of the wave is away from the average value. The louder the sound, the higher the amplitude.
15.3.2 Measuring loudness-Decibels
The decibel is the unit of measurement in the loudness table . Loudness is also referred to as sound pressure. The basic unit of sound pressure is the Bel (B), each unit being divided into 10 decibels
(1B = 10 dB) . The decibel is used to measure relative changes in loudness. A difference of 1 db is the smallest change which the human ear can detect.
A loudness increase of 10 db means an intensity increase of 10 times.
Our ears respond to proportional changes in sound levels, not the actual amounts. For example we may hear the difference between a door slam and an explosion . The ear also interprets loudness changes differently at different frequencies, especially at high and low frequencies.
You may see a volume control on an amplifier marked from 0 db ( maximum) to - 80db (minimum) and wonder how negative decibels can represent sound. This is because the decibel does not have a fixed value, like an inch, but is relative; it has an assumed value.
15.4 SOME OTHER IMPORTANT AUDIO TERMS
Acoustics
Refers to the qualities of listening room which influence the sound we hear.
Detail
Is the element of sound produced by a specific instrument, which allows us to identify the sound, and position it in relation to other instruments.
Fundamental tone
Is the dominant tone we hear.
Harmonics (or overtones )
Are multiples of the basic waveform of the Fundamental tone, which are layered over the Fundamental tone. We can’t hear them separately , as they are out of our audible range, but they affect the final sound we hear. For example when a ‘C’ is played on the piano and then on a violin, the Fundamental tone is the same, but we hear a different sound because of the harmonics.
Transients
Sudden leaps or impulses, such as drum beats or firm strokes on a guitar.
A piano tone of 1 Khz is to the ear just as high as a violin tone of the same frequency. The pitch is equal, but the sound is not. It is the harmonics which determine an instrument’s characteristic sound, or timbre. The fundamental tone is also called the first harmonic. If the fundamental tone has a frequency of 1 Khz, then the second harmonic has a frequency of 2 Khz, the third has 3 Khz, and so on.
Bass
Although the mid-range of the frequency spectrum is easy to reproduce well, both the low and the high ranges require special attention.Low tones behave differently than high tones. The low tones
( up to approximately 150 Hz ) are less spherically. Wherever loudspeakers are positioned, the low tones can be heard throughout the room.
By either increasing or decreasing the distance between the loudspeaker and the wall and/or the floor, bass reproduction can be changed substantially.
Powerful bass reproduction may seem attractive, but it does have negative consequences. The reflected low tones join the original ones with a time delay , so that the initial impulse is slightly blurred . The reflected sound waves from the wall and the floor that have joined the original vibrations form a new complete signal with a different waveform. This is considered as distortion.
Treble
In contrast to low tones, high tones are propagating in straight lines. As high tones constitute an important part of the stereo effect, it is essential for the speakers to be positioned in such a way that high tones can always be heard in a straight line from a wide listening area . For that reason speakers should not be obstructed by furniture or curtains Imperfect treble reproduction has an adverse affect on harmonics.
Sound Blaster 16
Sound Blaster 16 is a 16-bit audio board that provides you with CD quality sound for your PC.This card comes equipped with a Panasonic interface, and an option to upgrade with a Wave Blaster II, allowing you to experience the multimedia world.
15.5 VIDEO MANAGEMENT
15.5.1 What is video?
Video is a combination of light and sound, both are made up of vibrations: Visible, audible and many other kinds.
Sound spectrum ranges from 20 to 20,000 Hz . Light range from 370 trillion ( 10^12) to 750 trillion Hz .
As a result of very high frequencies and the speed at which light travels , the wave length is short. The higher the vibration the shorter the wave length. we perceive the various wavelengths as different colors, the longest wavelength is seen as the color red followed by the known colors of the rainbow. White is a combination of the other colors. The infrared and ultraviolet rays nowadays used for such applications as remote control devices.
15.5.2 Visible light as part of the electromagnetic spectrum.
Visible light is only visible because we can see the source and the objects being illuminated . The light beam itself cannot be seen.
Luminosity
Luminosity depends on the amount of available light . It can be measured and recorded in a numeric value. Nowadays Lux is used to express the amount of luminosity.
Luminosity is the basic principle of the black and white television.
Color Mixing
There are two kinds: additive and subtractive . Color T.V. is based on the principle of additive color mixing.
The three primary colors: Red, Green, Blue . All the other colors can be produced by combining these colors. [ EX: 30% red + 59% green + 11% blue = White ].
Light Refraction
Light refraction is the reverse process of color mixing. A prism is used to demonstrate refraction which is a piece of glass that is polisin a triangular shape. A rainbow is a perfect example of the principle of light refraction in nature .
Color Temperature
When an object is heated, It will emit a color related to the temperature of that object. In reality color temperatures range from 1900 K up to 25,000 K.
Video Blaster SE100
Video Blaster SE100 allows you to integrate video images from video cameras , and laser discs with your PC applications.
Understanding Bitmaps
The video System contains a “ hard-coded “ set of shapes that represent the standard character set. A character is displayed by sending the system as an ASCII or ANSII character code.Bitmaps can describe multi-colored images. The number of bits per pixel determines the number of different colors that can appear in a single bitmap.(Knowing that anything and everything displayed on the screen is made up of pixels somewhere in memory.)
Color and the PC display system
The system supported today come in three classes : VGA , Super VGA (SVGA) , and the true color.
The standard VGA system can display 16 color with a resolution of 640 * 480 Pixels. Super VGA provides more colors and/or greater resolution, and the true color provides sufficient colors resolution to display images that look like color photographs , As memory prices continue to fall , more systems will include 24 bit color-display.However, right now most of the PC’s sold as windows system come equipped with 8-bit color displays.
15.6 COMPRESSION TECHNIQUES
15.6.1 GSM Audio Compression
Developed at the University Of Berlin in 1992, GSM is one of the most complex audio compression methods in use, it provides a compression ratio of 10 to 1 . The GSM algorithm is based on the Global System for mobile telecommunication protocol that is currently the most popular European protocol for digital cellular phones.
The input to GSM consist of frames of 160 signed, sampled at 8 K Hz. GSM code available on the public domain, provides C library which can be used to a GSM object.
An uncompressed 16 bit/sample speech stream at 8 K Hz. would require 128 kilo bits/sec of bandwidth for transmission over the network. If compressed using GSM , the 16 bit/sample speech require only 13.2K bits/sec providing compression ratio of 128/13.2= 9.7 ( nearly 10 : 1)
Despite its great performance, The GSM compression method cannot be used along with the rest of the E-Phone code for Linux because in order to record or play speech in real time under Linux , The size of sound buffers need to be set at the smallest possible value.
That this buffer accept a value 2^x where x is 7 .. So, The smallest value for possible speech buffer would thus be set to 2^7 or 128 byte.
15.6.2 Run Length Video Compression
A pair of routines exists to perform run length encoding and decoding of character data. Depending on the nature of the data, substantial amounts of space can be saved using run length encoding.
Encoded Data Format
The encoded format is quite simple . An encoded data array is broken up into a series of runs, consisting of either a set of bytes which all have the same value, or a set of literal data.Each run begins with a single byte, which indicates the type of run, and the length of the run.
15.7 VIDEO COMPRESSION MANAGER
The video compression manager (vcm) provides access to the interface used by compressors that can’t be installed to handle real-time data. Applications can use installable compressors to perform the following tasks:
· Compress and decompress video data.
· Send a renderer compressed video data and have it draw it to the display.
· Compress, decompress, or draw data with application-defined renderers.
· Use renderers to handle text and custom data.
15.7.1 VCM ARCHITECTURE
VCM is an intermediary between an application and compression and decompression drivers. The compression and decompression drivers compress and decompress individual frames of data. When an application makes a call to VCM, VCM translates the call into a message.
The message is sent by using the ICSendMessage function to the appropriate compressor or decompressor, which compresses or decompresses the data. VCM receives the return value from the compression or decompression driver and then returns control to the application.
If a macro is defined for a message, the macro expands to an ICSendMessage function call supplying appropriate parameters for that message.
If a macro is defined for a message your application should use it rather than the message. In this overview these macros follow messages in parentheses.
15.7.2 DETERMINING A COMPRESSOR'S OUTPUT FORMAT
The following example uses the ICCompressGetFormat size macro to determine the buffer size needed for the data specifying the compression format allocates a buffer of the appropriate size using the GlobalAlloc function and retrieves the compression format information using the ICCompressGetFormat macro.
LPBITMAPINFOHEADER
lpbiIn, lpbiOut;.
. // *lpbiIn must be initialized to the input format.
.
dwFormatSize = ICCompressGetFormatSize(hIC, lpbiIn);
h = GlobalAlloc(GHND, dwFormatSize);
lpbiOut = (LPBITMAPINFOHEADER)GlobalLock(h);
ICCompressGetFormat(hIC, lpbiIn, lpbiOut);
The following example uses the ICCompressQuery macro to determine if a compressor can handle the input and output formats.
LPBITMAPINFOHEADER
lpbiIn, lpbiOut;// Both *lpbiIn and *lpbiOut must be initialized to the respective
if (ICCompressQuery(hIC, lpbiIn, lpbiOut) == ICERR_OK){
.
. // Format is supported; use the compressor.
.
}
The following example uses the ICCompressGetSize macro to determine the buffer size and allocates a buffer of that size using GlobalAlloc.
// Find the worst-case buffer size.
dwCompressBufferSize = ICCompressGetSize(hIC, lpbiIn, lpbiOut);
// Allocate a buffer and get lpOutput to point to it.
h = GlobalAlloc(GHND, dwCompressBufferSize);
lpOutput = (LPVOID)GlobalLock(h);
15.7.3 COMPRESSING DATA
The following example compresses image data for use in an AVI file. It assumes the compressor does not support the VIDCF_CRUNCH or VIDCF_TEMPORAL flags, but it does support VIDCF_QUALITY. The example uses the ICCompressBegin macro, the ICCompress function, and the ICCompressEnd macro.
DWORD dwCkID;
DWORD dwCompFlags;
DWORD dwQuality;
LONG lNumFrames, lFrameNum;
// Assume dwNumFrames is initialized to the total number of frames.
// Assume dwQuality holds the proper quality value (0-10000).
// Assume lpbiOut, lpOut, lpbiIn, and lpIn are initialized properly.
// If OK to start, compress each frame.
if (ICCompressBegin(hIC, lpbiIn, lpbiOut) == ICERR_OK){
for ( lFrameNum = 0; lFrameNum < lNumFrames; lFrameNum++){
if (ICCompress(hIC, 0, lpbiOut, lpOut, lpbiIn, lpIn,
&dwCkID, &dwCompFlags, lFrameNum,
0, dwQuality, NULL, NULL) == ICERR_OK){
// Write compressed data to the AVI file.
.
. // Set lpIn to the next frame in the sequence.
.
}
else {
// Handle compressor error.
}
}
ICCompressEnd(hIC); // terminate compression
}
else {
// Handle the error identifying the unsupported format.
}
15.7.4 DECOMPRESSING DATA
The following example shows how an application can initialize a decompressor using the ICDecompressBegin macro, decompress a frame sequence using the ICDecompress function, and terminate decompression using the ICDecompressEnd macro.
LPBITMAPINFOHEADER lbpiIn, lpbiOut;
LPVOID lpIn, lpOut;
LONG lNumFrames, lFrameNum;
// Assume lpbiIn and lpbiOut are initialized to the input and output
// format and lpIn and lpOut are pointing to the buffers.
if (ICDecompressBegin(hIC, lpbiIn, lpbiOut) == ICERR_OK){
for (lFrameNum = 0; lFrameNum < lNumFrames, lFrameNum++){
if (ICDecompress(hIC, 0, lpbiIn, lpIn, lpbiOut,
lpOut) == ICERR_OK)
{
// Frame decompressed OK so we can process it as required.
} else {
// Handle the decompression error that occurred.
}
}
ICDecompressEnd(hIC);
} else {
// Handle the error identifying an unsuppformat.
}
15.7.5 PREPARING TO DRAW DATA
The following example shows the initialization sequence that instructs the decompressor to draw full-screen. It uses the ICDrawBegin and ICDrawEnd macros.
// Assume lpbiIn has the input format, dwRate has the data rate.
if (ICDrawBegin(hIC, ICDRAW_QUERY | ICDRAW_FULLSCREEN, NULL, NULL,
NULL, 0, 0, 0, 0, lpbiIn, 0, 0, 0, 0, dwRate,
dwScale) == ICERR_OK)
{
// Decompressor supports this drawing so set up to draw.
ICDrawBegin(hIC, ICDRAW_FULLSCREEN, hPal, NULL, NULL, 0, 0, 0,
.
. // Start decompressing and drawing frames.
.
// Drawing done. Terminate procedure.
ICDrawEnd(hIC);
} else {
.
. // Use another renderer to draw data on the screen;
. // ICDraw does not support the format.
}
15.8 ABOUT VIDEO CAPTURE
AVICap supports streaming video capture and single-frame capture in real-time. In addition, AVICap provides control of video sources that are Media Control Interface (MCI) devices so the user can control (through an application) the start and stop positions of a video source, and augment the capture operation to include step frame capture.
The windows you create by using the AVICap window class can perform the following tasks:
· Capture audio and video streams to an audio-video interleaved (AVI) file.
· Connect and disconnect video and audio input devices dynamically.
· View a live incoming video signal by using the overlay or preview methods.
· Specify a file to use when capturing and copy the contents of the capture file to another file.
· Set the capture rate.
· Display dialog boxes that control the video source and format.
· Create, save, and load palettes.
· Copy images and palettes to the clipboard.
· Capture and save a single image as a device-independent bitmap (DIB).
ERROR
A capture window uses error notification messages to notify your application of AVICap errors, such as running out of disk space, attempting to write to a read-only file, failing to access hardware or dropping too many frames. The content of an error notification includes a message identifier and a formatted text string ready for display. Your application can use the message identifier to filter the notifications and limit the messages to present to the user. A message identifier of zero indicates a new operation is starting and the callback function should clear any displayed error message.
Frame
A capture window uses frame callback notification messages to notify your application when a new video frame is available. The capture window enables these callback notifications only if the preview rate is non-zero and streaming capture is not in progress.
15.9 FINALLY
If you have ever attended a video conference, you know that it can go in long way toward bridging distance and building relationships. But Video conferencing has always been expensive . Internet video Conferencing offers a very low cost altenative to traditional proprietary systems. Video data is much denser than audio, and transmitting both sound and video requires bandwidth for two codes output.
15.9.1 CineVideo/Direct
Cine Video/ Direct is a two party conferencing system that provides good video quality across a wide range of bandwidths. It works across a modem connection TCP/IP network, and it proved to be exceedingly easy to use, as in this method Frame quality remains consistently high in all tests and at all bandwidths.
15.9.2 Capturing
The capture window is the local video screen, which contains all audio and video configuration options.
Your only video options are frame rate and the choice of color or mono video, and only audio control is toggle between the radio and the phone options.
15.9.3 Windows Features
The programs windows remain in the foreground even when you select other applications on the desktop , which makes it difficult to work with other programs during the conference.
15.9.4 Videophone
The connectix videophone now aims to be a top performance in its own right . It boasts strong high bandwidth performance, but it is confusing to set up and operate, and bit unstable and a poor low bandwidth performer.
VideoPhone provides point to point and point to multipoint transmissions, It works over the Internet, over IPX networks in modems.
VideoPhone provides icon and menu bars above a small video window. The self-view is a free floating window that displays raw camera output, useful for positioning the camera.
15.9.5 VdoPhone Internet
A veteran player in the Internet video market, VDOnet has funnelled its considerable technology and application experience into VDOPhone Internet, an innovative product with an exceptionally easy to ues interface.
VDOPhone gives audio priority over video so it can remain unbroken even at low bandwidths.
VDOPhone doesn’t have a watchdog to take calls when the program is not loaded
15.10 REFRENCES
1.Internet working with TCP/IP (volume III)
Doglus e.comer
2.Network programming with windows sockets
Pat bonner
3.Visual C++ books online