Intel® Software Network Knowledge Base Wiki


Constructing Nav Tree
One Moment...

(refresh menu)



 
Welcome, Guest | Quick Login | Register

Design superior apps


Prepare for a Microsoft RTC Session in Windows XP

Version 2, Changed by KYLE LEWIS on 1/2/2008
Created by: KYLEX.S.LEWIS@INTEL.COM

Challenge

Prepare an application to initiate a communication session using Microsoft's real-time communication (RTC) API. The RTC API enables developers to enhance the communication capabilities of any Microsoft Windows* XP-based application. It provides the developer with the building blocks to add instant messaging, voice and video conferencing, and application sharing/collaboration capabilities to applications.

Solution

Add the RTC client interface to the application and select the preferred types of communication and associated devices. First, the RTC client interface must be added to the application. The interface is acquired by CoCreateInstance() using the CLSID_RTCClient (GUID = {7a42ea29-a2b7-40c4-b091-f6f024aa89be}). Once the interface is available, it is possible to determine the communication session capabilities of the platform.

	// Initialize the RTC COM object
	hr = CoCreateInstance (CLSID_RTCClient, NULL,
	CLSCTX_INPROC_SERVER, IID_IRTCClient, 
	(LPVOID *)&m_pClient); 

	// Initialize the client interface 
	hr = m_pClient->Initialize(); 

When the platform capabilities are known, the preferred types of communication and associated devices (e.g., camera, microphone) need to be selected. It is important to note that, if the preferred communication modes are not available on the participant's platform, the RTC client dynamically determines which communication types are used. For this example, all types of communications are preferred.

	m_pClient->SetPreferredMediaTypes ( RTCMT_ALL, VARIANT_TRUE ); 

Which codecs are used by the Windows RTC client to transmit audio and video data between session participants is dependent upon the platform capabilities of the parties involved in the session and the available bandwidth between them.

For video, the Windows RTC client supports the H.261 and H.263 codecs at QCIF (176x144) resolution. These variable-bit rate codecs send video data between the rates of 6KBps and 125KBps. It is possible to influence the targeted spatial and temporal resolution of the video transition through the use of the IRTCClient interface methods MaxBitRate and put_TemporalSpatialTradeOff.

The Windows RTC client supports many audio codecs. The default codec for voice communications is the SIREN codec. The table of audio codecs supported by the Windows RTC client is listed below:

<tbody></tbody>

CODEC

Sampling Rate(Khz)

Bit Rate(Kbps)

Frame Size(msec)

G.711

8

64

20

G.722.1

16

24

20

G.723

8

6.4 

30, 60, or 90

GSM 

8

13

20

DVI4

8

32

20

SIREN

16

16

20 or 40

 

Any adjustments to the communication devices should take place after the preferred communication types and associated devices are selected. The RTC API provides a communication device tuning wizard that walks the user through a series of dialogs that assist with the fine tuning of the camera and microphone. To invoke the tuning wizard, use the method InvokeTuningWizard() of the RTCClient interface.



This item is part of a series about the Microsoft RTC API, which is introduced in the separate item "How to Integrate Real-Time Communications in Windows* XP".

Source


Integrating Rich Client Communications with Microsoft Real-Time Communications API

 



Served
23 Knowledge Bases
605 Pages
Search
Powering Up Search...


Vote on this Page

Tags For This Page
Loading Tags..

Tag This



Additional legal information