Components reference
Acts as both server and client components and useful for chat (voice, text) applications development.
Set Active property to True to activate Server mode. In this mode component can receive and respond on remote connection requests. Set Active to False to deactivate the Server.
Use Connect and Disconnect methods to interact with remote servers. Whenever you call the Connect method, component will switch to Client mode, and try to connect to remote side. After successful connection, component will stay in this mode until Disconnect method is called, Active property is set to False, or remote side drops the connection. In any case component will switch back to Server mode. The only exception is when you set Active property to False, in which case component will be deactivated.
To send and receive text messages use SendText method and OnReceiveText event.
IMediaGate | default |   |
IvcproMediaGateEvents | default | source |
Methods | |
void OnAcceptClient(long ConnId, bool* accept) | Fires when server accepts new client connection. Set the accept parameter to True to accept connection. Call GetClientParam method to receive client parameters, such as ip-address, port number, etc. |
void OnClientConnect(long ConnId) | Fires when new client connects to server |
void OnClientDisconnect(long ConnId) | Fires when client disconnects from server |
void OnReceiveText(long ConnId, BSTR Text) | Fires when component receives a text from remote side. |
Methods | |
void Connect(BSTR host) | Call this method to switch component to Client mode, and try to connect to remote side |
void Disconnect() | Closes connection with remote side and switches component to Server mode |
void DisconnectClient(long ConnId) | Disconnects client from server using client connection ID |
bool FormatChoose(BSTR Title, long Handle) | Creates an ACM-defined dialog box that enables the user to select a waveform-audio format. Title parameter indicates dialog's title, Handle - parent handle of dialog window. If Handle is 0 then ActiveX component handle is used |
long GetClientConnId(long ClientIndex) | Returns ClientId for given index. ClientIndex may be from 0 to ClientCount - 1 |
BSTR GetClientParam(long ConnId, vcClientParam ParamType) | Returns client parameter such as ip-address, port number etc. using client connection ID and param type |
bool GetInternalActive(vcMediaGateInternal Internal) | Returns True if internal component (WaveIn, CodecIn, IpServer, IpClient, CodecOut, WaveOut) is active |
long GetVolume(bool VolumeIn, long Channel) | Returns current volume value. Result values range is 0...300 (logarithmic scale). VolumeIn parameter indicates recording (True) or playback (False) volume level |
void SendText(long ConnId, BSTR text) | Sends text message to client indicated by ConnId parameter over network. If component is in client mode, ConnId parameter is ignored |
void SetInternalActive(vcMediaGateInternal Internal, bool Active) | Set value for Active property of internal component |
Properties | |
bool Active | Set to true to activate (open) the component. All other properties should be set to proper values before activation. Set to false to deactivate (close) the component |
BSTR BindTo | Specifies the IP address the socket should bind to. Default '0.0.0.0' means that the socket should bind to the first available network interface. |
long BytesReceived | Returns number or bytes component has received from the network |
long BytesSent | Returns number or bytes component has sent to the network |
long ClientCount | Returns current number of clients connected |
BSTR ConversationFileName | File name (.wav) to save conversation in |
bool ConversationSaveToFile | When true saves conversation to .wav file on disk |
long DataSizeIn | Returns data written into but not yet processed by the pipe |
long DataSizeOut | Returns data size available to read from the pipe |
long DeviceId | Specifies device ID for the wave device |
bool EnablePlayback | Enables or disables audio playback |
bool EnableRecording | Enables or disables audio recording |
long FormatTag | Specifies audio format tag for the wave device |
bool IsFormatProvider | When true the component will assign stream format to the consumer (if any). This simplifies the process of distributing stream format among linked components. For example WaveRiff component can assign PCM format to linked WaveOutDevice component, so WAVe file will be played back correctly |
bool IsClientActive | Indicates if client is active |
bool IsServerActive | Indicates if server is active |
long MaxClients | Specifies maximum number of clients that can connect to server. "-1" value means no limit, "0" value means no clients |
long MinActiveTime | Specifies the minimum amount of time (in milliseconds) for recorder to be active once activated |
long MinVolumeLevel | Minimum volume level for recording |
long PcmBitsPerSample | Specifies number of bits per sample for wave device |
long PcmNumChannels | Specifies number of channels per sample for wave device |
long PcmSamplesPerSec | Specifies number of samples per second for wave device |
BSTR Port | Specifies port number for the client/server TCP/IP socket |
unaProtoType Proto | Specifies Proto for the TCP/IP socket (TCP or UDP) |
bool SyncEvents | Specifies whether events calls synchronized through main thread |
Wave processing components:
WaveIn,
WaveOut,
WaveCodec,
WaveRiff,
WaveMixer,
WaveResampler,
Equalizer,
WaveMultiBandSplitter
Legacy IP components:
IpServer,
IpClient,
IpBroadcastServer,
IpBroadcastClient,
ConferenceServer
RTP streaming components:
IPReceiver,
IPTransmitter,
RTPConfClient,
RTPConfServer
Misc. components:
VolumeControl,
DisplayBands