|
WINDEV and the streams - Use example
In this example, the application must manage a video conference between two computers. This application allows you to: - view the video currently broadcasted by the web camera installed on the current computer.
- view the video currently broadcasted by the web camera installed on the connected computer.
- transmit the voice of the current user to the connected user.
- hear the voice of the connected user.
Versions 20 and laterFrom version 20, Conference controls are supported in Windows Vista and later. If you want to use the Conference control with an earlier Windows version: - Open the control description window.
- In the "UI" tab, check "Use the TAPI 3.x APIs / Windows XP (for compatibility)".
- Validate.
New in version 20From version 20, Conference controls are supported in Windows Vista and later. If you want to use the Conference control with an earlier Windows version: - Open the control description window.
- In the "UI" tab, check "Use the TAPI 3.x APIs / Windows XP (for compatibility)".
- Validate.
From version 20, Conference controls are supported in Windows Vista and later. If you want to use the Conference control with an earlier Windows version: - Open the control description window.
- In the "UI" tab, check "Use the TAPI 3.x APIs / Windows XP (for compatibility)".
- Validate.
To develop this application: - Create a blank window:
- Click
in the quick access buttons. - The element creation window appears: click "Window" then "Window".
- Create two Conference controls in this window: on the "Creation" tab, in the "Graphic controls" group, expand "Video and capture" and select "Conference". In our example, the first control is named "CONF_Reception" and the second control is named "CONF_Transmission".
Remark: WINDEV automatically associates these two controls in the same stream. By default, the first created control is used to view the incoming video while the second created control is used to view the outgoing video. - Display the EVENTS associated with the stream ("Code of associated stream" from the popup menu of one of the Conference controls).
Reminder: The event "Request for connecting a new stream" is run when a new stream attempts to connect with the current application. This event accepts one parameter. To handle this parameter, a procedure is automatically declared in the "Request for connecting a new stream" event. - Add the following code lines into the event "Request for connecting a new stream":
// Procédure de détection d'un nouveau flux // nIDFlux est une variable de type entier contenant // l'identifiant du flux détecté PROCÉDURE NouveauFlux(nIDFlux) // Connaître le nom de l'appelant NomAppelant is string = StreamInfo(nIDFlux, StreamCallerName) // Accepter le flux entrant? IF YesNo(NomAppelant + "souhaite entrer en conférence avec vous", ... "Acceptez-vous?") = Yes THEN StreamAccept(nIDFlux, Réception) ELSE StreamReject(nIDFlux) END
- In the window:
- create a button named "BTN_Call": on the "Creation" tab, in the "Usual controls" group, click
. This button will be used to connect the stream to a recipient. - create an edit control named "EDT_RecipientAddress": on the "Creation" tab, in the "Usual controls" group, click
. This control will be used to enter the name of the person called. - create a button named "BTN_Terminer".: on the "Creation" tab, in the "Usual controls" group, click
. This button will be used to end the reception or the broadcast of a stream. - create an edit control named "EDT_UserName": on the "Creation" tab, in the "Usual controls" group, click
. This control will be used to enter the name of the current user.
- Write the following code in the event "Click BTN_Call":
// Spécifier le nom de l'appelant Flux1.Identifiant = SAI_NomUtilisateur // Connecter le flux StreamConnect(Flux1, AdresseCorrespondant) // équivalent à: // Flux1.Adresse = AdresseCorrespondant
- Write the following lines of code in the event "Click BTN_Done":
// Déconnecter le flux StreamDisconnect(Flux1)
Remark: To operate, this application must run on two different computers.
Related Examples:
|
Complete examples (WINDEV): WD Video Conference
[ + ] This example uses the Conference control and presents the use of sockets via an instant messaging. WD Video conference enables you to start a conference (sound + video) with a remote user. Furthermore, with instant messaging, you have the ability to send a file to your contact and to dialog with him.
|
This page is also available for…
|
|
|
| |
| Click [Add] to post a comment |
|
| |
|
| |
| |
| |
| |
| |
| |
| | |
| |