TeamTalk 5 Java DLL  Version 5.15A
TeamTalk.cs
1 /*
2  * Copyright (c) 2005-2018, BearWare.dk
3  *
4  * Contact Information:
5  *
6  * Bjoern D. Rasmussen
7  * Kirketoften 5
8  * DK-8260 Viby J
9  * Denmark
10  * Email: contact@bearware.dk
11  * Phone: +45 20 20 54 59
12  * Web: http://www.bearware.dk
13  *
14  * This source code is part of the TeamTalk SDK owned by
15  * BearWare.dk. Use of this file, or its compiled unit, requires a
16  * TeamTalk SDK License Key issued by BearWare.dk.
17  *
18  * The TeamTalk SDK License Agreement along with its Terms and
19  * Conditions are outlined in the file License.txt included with the
20  * TeamTalk SDK distribution.
21  *
22  */
23 
24 using System;
25 using System.Collections.Generic;
26 using System.Text;
27 using System.Windows.Forms;
28 using System.Drawing;
29 using System.Drawing.Imaging;
30 using System.Threading;
31 using System.Diagnostics;
32 using System.Reflection;
33 using System.Runtime.InteropServices;
34 using c_tt;
35 
36 namespace BearWare
37 {
43  [Flags]
44  public enum StreamType : uint
45  {
47  STREAMTYPE_NONE = 0x00000000,
50  STREAMTYPE_VOICE = 0x00000001,
53  STREAMTYPE_VIDEOCAPTURE = 0x00000002,
56  STREAMTYPE_MEDIAFILE_AUDIO = 0x00000004,
59  STREAMTYPE_MEDIAFILE_VIDEO = 0x00000008,
62  STREAMTYPE_DESKTOP = 0x00000010,
66  STREAMTYPE_DESKTOPINPUT = 0x00000020,
78  STREAMTYPE_CHANNELMSG = 0x00000040,
85 
92  STREAMTYPE_CHANNELMSG,
93  }
106  public enum SoundSystem : uint
107  {
109  SOUNDSYSTEM_NONE = 0,
111  SOUNDSYSTEM_WINMM = 1,
113  SOUNDSYSTEM_DSOUND = 2,
121  SOUNDSYSTEM_ALSA = 3,
134  SOUNDSYSTEM_WASAPI = 5,
158  }
159 
164  [Flags]
165  public enum SoundDeviceFeature : uint
166  {
167  SOUNDDEVICEFEATURE_NONE = 0x0000,
173  SOUNDDEVICEFEATURE_AEC = 0x0001,
179  SOUNDDEVICEFEATURE_AGC = 0x0002,
194  }
195 
208  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
209  public struct SoundDevice
210  {
216  public int nDeviceID;
220  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
221  public string szDeviceName;
226  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
227  public string szDeviceID;
244  public int nWaveDeviceID;
247  public bool bSupports3D;
249  public int nMaxInputChannels;
251  public int nMaxOutputChannels;
255  [MarshalAs(UnmanagedType.ByValArray, SizeConst = TeamTalkBase.TT_SAMPLERATES_MAX)]
256  public int[] inputSampleRates;
260  [MarshalAs(UnmanagedType.ByValArray, SizeConst = TeamTalkBase.TT_SAMPLERATES_MAX)]
261  public int[] outputSampleRates;
263  public int nDefaultSampleRate;
270  }
271 
272 
281  public struct SoundDeviceEffects
282  {
298  public bool bEnableAGC;
315  public bool bEnableDenoise;
332  }
333 
336  public struct SoundDeviceConstants
337  {
340  public const int TT_SOUNDDEVICE_ID_REMOTEIO = 0;
346  public const int TT_SOUNDDEVICE_ID_VOICEPREPROCESSINGIO = (1 | (int)TT_SOUNDDEVICE_ID_SHARED_FLAG);
351  public const int TT_SOUNDDEVICE_ID_OPENSLES_DEFAULT = 0;
356  public const int TT_SOUNDDEVICE_ID_OPENSLES_VOICECOM = 1;
365  public const int TT_SOUNDDEVICE_ID_TEAMTALK_VIRTUAL = 1978;
366 
367 
381  public const uint TT_SOUNDDEVICE_ID_SHARED_FLAG = 0x00000800;
382 
387  public const uint TT_SOUNDDEVICE_ID_MASK = 0x000007FF;
388  }
389 
393  public struct SoundLevel
394  {
400  public const int SOUND_VU_MAX = 100;
406  public const int SOUND_VU_MIN = 0;
414  public const int SOUND_VOLUME_MAX = 32000;
422  public const int SOUND_VOLUME_DEFAULT = 1000;
428  public const int SOUND_VOLUME_MIN = 0;
437  public const int SOUND_GAIN_MAX = 32000;
447  public const int SOUND_GAIN_DEFAULT = 1000;
456  public const int SOUND_GAIN_MIN = 0;
457  }
458 
473  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
474  public struct AudioBlock
475  {
479  public int nStreamID;
481  public int nSampleRate;
483  public int nChannels;
487  public System.IntPtr lpRawAudio;
489  public int nSamples;
497  public uint uSampleIndex;
511  }
512 
521  public enum MediaFileStatus : uint
522  {
523  MFS_CLOSED = 0,
525  MFS_ERROR = 1,
527  MFS_STARTED = 2,
529  MFS_FINISHED = 3,
531  MFS_ABORTED = 4,
533  MFS_PAUSED = 5,
536  MFS_PLAYING = 6
537  }
538 
542  public enum AudioFileFormat : uint
543  {
545  AFF_NONE = 0,
558  AFF_WAVE_FORMAT = 2,
571  }
572 
580  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
581  public struct AudioFormat
582  {
586  public int nSampleRate;
588  public int nChannels;
589  }
590 
601  public enum FourCC : uint
602  {
604  FOURCC_NONE = 0,
607  FOURCC_I420 = 100,
610  FOURCC_YUY2 = 101,
613  FOURCC_RGB32 = 102
614  }
615 
622  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
623  public struct VideoFormat
624  {
627  public int nWidth;
630  public int nHeight;
634  public int nFPS_Numerator;
638  public int nFPS_Denominator;
641  }
642 
650  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
651  public struct VideoFrame
652  {
655  public int nWidth;
658  public int nHeight;
664  public int nStreamID;
669  public bool bKeyFrame;
671  public System.IntPtr frameBuffer;
674  public int nFrameBufferSize;
675  }
676 
686  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
687  public struct VideoCaptureDevice
688  {
690  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
691  public string szDeviceID;
693  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
694  public string szDeviceName;
707  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
708  public string szCaptureAPI;
710  [MarshalAs(UnmanagedType.ByValArray, SizeConst = TeamTalkBase.TT_VIDEOFORMATS_MAX)]
714  public int nVideoFormatsCount;
715  }
716 
724  public enum BitmapFormat : uint
725  {
727  BMP_NONE = 0,
733  BMP_RGB8_PALETTE = 1,
736  BMP_RGB16_555 = 2,
740  BMP_RGB24 = 3,
744  BMP_RGB32 = 4
745  }
746 
751  public enum DesktopProtocol : uint
752  {
756  }
757 
764  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
765  public struct DesktopWindow
766  {
768  public int nWidth;
770  public int nHeight;
775  public int nBytesPerLine;
782  public int nSessionID;
786  public IntPtr frameBuffer;
789  public int nFrameBufferSize;
790  }
791 
795  public enum DesktopKeyState : uint
796  {
798  DESKTOPKEYSTATE_NONE = 0x00000000,
800  DESKTOPKEYSTATE_DOWN = 0x00000001,
802  DESKTOPKEYSTATE_UP = 0x00000002,
803  }
804 
812  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
813  public struct DesktopInput
814  {
818  public ushort uMousePosX;
822  public ushort uMousePosY;
828  public uint uKeyCode;
833  public DesktopInput(bool set_defaults)
834  {
835  if (set_defaults)
836  {
837  uMousePosX = uMousePosY = (ushort)DesktopInputConstants.DESKTOPINPUT_MOUSEPOS_IGNORE;
839  uKeyState = DesktopKeyState.DESKTOPKEYSTATE_NONE;
840  }
841  else
842  {
843  uMousePosX = uMousePosY = 0;
844  uKeyCode = 0;
845  uKeyState = DesktopKeyState.DESKTOPKEYSTATE_NONE;
846  }
847  }
848  }
849 
851  public struct DesktopInputConstants
852  {
860  public const uint DESKTOPINPUT_KEYCODE_IGNORE = 0xFFFFFFFF;
861 
869  public const ushort DESKTOPINPUT_MOUSEPOS_IGNORE = 0xFFFF;
870 
877  public const uint DESKTOPINPUT_KEYCODE_LMOUSEBTN = 0x1000;
878 
885  public const uint DESKTOPINPUT_KEYCODE_RMOUSEBTN = 0x1001;
886 
893  public const uint DESKTOPINPUT_KEYCODE_MMOUSEBTN = 0x1002;
894  }
895 
908  [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Unicode)]
909  public struct SpeexCodec
910  {
913  [FieldOffset(0)]
914  public int nBandmode;
917  [FieldOffset(4)]
918  public int nQuality;
928  [FieldOffset(8)]
929  public int nTxIntervalMSec;
935  [FieldOffset(12)]
936  public bool bStereoPlayback;
937  }
938 
944  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
945  public struct SpeexVBRCodec
946  {
949  public int nBandmode;
952  public int nQuality;
959  public int nBitRate;
963  public int nMaxBitRate;
967  public bool bDTX;
976  public int nTxIntervalMSec;
982  public bool bStereoPlayback;
983  }
984 
986  public struct SpeexConstants
987  {
989  public const int SPEEX_BANDMODE_NARROW = 0;
991  public const int SPEEX_BANDMODE_WIDE = 1;
993  public const int SPEEX_BANDMODE_UWIDE = 2;
995  public const int SPEEX_QUALITY_MIN = 0;
997  public const int SPEEX_QUALITY_MAX = 10;
1000  public const int SPEEX_NB_MIN_BITRATE = 2150;
1003  public const int SPEEX_NB_MAX_BITRATE = 24600;
1006  public const int SPEEX_WB_MIN_BITRATE = 3950;
1009  public const int SPEEX_WB_MAX_BITRATE = 42200;
1012  public const int SPEEX_UWB_MIN_BITRATE = 4150;
1015  public const int SPEEX_UWB_MAX_BITRATE = 44000;
1018  public const int DEFAULT_SPEEX_BANDMODE = 1;
1021  public const int DEFAULT_SPEEX_QUALITY = 4;
1024  public const int DEFAULT_SPEEX_DELAY = 40;
1027  public const bool DEFAULT_SPEEX_SIMSTEREO = false;
1030  public const int DEFAULT_SPEEX_BITRATE = 0;
1033  public const int DEFAULT_SPEEX_MAXBITRATE = 0;
1036  public const bool DEFAULT_SPEEX_DTX = true;
1037  }
1038 
1041  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1042  public struct OpusCodec
1043  {
1046  public int nSampleRate;
1048  public int nChannels;
1052  public int nApplication;
1055  public int nComplexity;
1058  public bool bFEC;
1061  public bool bDTX;
1065  public int nBitRate;
1067  public bool bVBR;
1070  public bool bVBRConstraint;
1077  public int nTxIntervalMSec;
1081  public int nFrameSizeMSec;
1082  }
1083 
1085  public struct OpusConstants
1086  {
1089  public const int OPUS_APPLICATION_VOIP = 2048;
1092  public const int OPUS_APPLICATION_AUDIO = 2049;
1095  public const int OPUS_MIN_BITRATE = 6000;
1098  public const int OPUS_MAX_BITRATE = 510000;
1099 
1102  public const int OPUS_MIN_FRAMESIZE = 2; /* Actually it's 2.5 */
1105  public const int OPUS_MAX_FRAMESIZE = 60;
1109  public const int OPUS_REALMAX_FRAMESIZE = 120;
1110 
1111  public const int DEFAULT_OPUS_APPLICATION = OPUS_APPLICATION_VOIP;
1112  public const int DEFAULT_OPUS_SAMPLERATE = 48000;
1113  public const int DEFAULT_OPUS_CHANNELS = 1;
1114  public const int DEFAULT_OPUS_COMPLEXITY = 10;
1115  public const bool DEFAULT_OPUS_FEC = true;
1116  public const bool DEFAULT_OPUS_DTX = false;
1117  public const bool DEFAULT_OPUS_VBR = true;
1118  public const bool DEFAULT_OPUS_VBRCONSTRAINT = false;
1119  public const int DEFAULT_OPUS_BITRATE = 32000;
1120  public const int DEFAULT_OPUS_DELAY = 20;
1121  }
1122 
1140  [StructLayout(LayoutKind.Explicit)]
1141  public struct SpeexDSP
1142  {
1150  [FieldOffset(0)]
1151  public bool bEnableAGC;
1154  [FieldOffset(4)]
1155  public int nGainLevel;
1159  [FieldOffset(8)]
1160  public int nMaxIncDBSec;
1165  [FieldOffset(12)]
1166  public int nMaxDecDBSec;
1170  [FieldOffset(16)]
1171  public int nMaxGainDB;
1174  [FieldOffset(20)]
1175  public bool bEnableDenoise;
1179  [FieldOffset(24)]
1199  [FieldOffset(28)]
1204  [FieldOffset(32)]
1205  public int nEchoSuppress;
1209  [FieldOffset(36)]
1211 
1212  public SpeexDSP(bool set_defaults)
1213  {
1214  if (set_defaults)
1215  {
1221 
1222  bEnableDenoise = SpeexDSPConstants.DEFAULT_DENOISE_ENABLE;
1223  nMaxNoiseSuppressDB = SpeexDSPConstants.DEFAULT_DENOISE_SUPPRESS;
1224 
1225  bEnableEchoCancellation = SpeexDSPConstants.DEFAULT_ECHO_ENABLE;
1226  nEchoSuppress = SpeexDSPConstants.DEFAULT_ECHO_SUPPRESS;
1227  nEchoSuppressActive = SpeexDSPConstants.DEFAULT_ECHO_SUPPRESS_ACTIVE;
1228  }
1229  else
1230  {
1231  bEnableAGC = false;
1232  nGainLevel = 0;
1233  nMaxIncDBSec = 0;
1234  nMaxDecDBSec = 0;
1235  nMaxGainDB = 0;
1236 
1237  bEnableDenoise = false;
1238  nMaxNoiseSuppressDB = 0;
1239 
1240  bEnableEchoCancellation = false;
1241  nEchoSuppress = 0;
1242  nEchoSuppressActive = 0;
1243  }
1244  }
1245  }
1246 
1249  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1250  public struct TTAudioPreprocessor
1251  {
1255  public int nGainLevel;
1257  public bool bMuteLeftSpeaker;
1259  public bool bMuteRightSpeaker;
1260  }
1261 
1271  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1273  {
1275  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1276  public struct Preamplifier
1277  {
1280  public bool bEnable;
1282  public float fFixedGainFactor;
1283  }
1285 
1288  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1289  public struct EchoCanceller
1290  {
1296  public bool bEnable;
1297  }
1299 
1302  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1303  public struct NoiseSuppression
1304  {
1306  public bool bEnable;
1309  public int nLevel;
1310  }
1312 
1314  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1315  public struct VoiceDetection
1316  {
1326  public bool bEnable;
1327  }
1329 
1332  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1333  public struct GainController2
1334  {
1337  public bool bEnable;
1340  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1341  public struct FixedDigital
1342  {
1345  public float fGainDB;
1346  }
1348 
1350  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1351  public struct AdaptiveDigital
1352  {
1353  /* @brief Enable saturation protector where saturation
1354  * margin is 2 dB. */
1355  public bool bEnable;
1356  /* Range: 0 <= x <= 100. Default: 20 dB */
1358  /* Range: 0 <= x <= 100. Default: 2 dB */
1360  /* Range: 0 < x < infinite. Default: 3 dB/sec */
1362  /* Range: -infinite < x < 0. Default: -50 */
1364  }
1366  }
1368 
1370  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1371  public struct LevelEstimation
1372  {
1378  public bool bEnable;
1379  }
1381 
1382  public WebRTCAudioPreprocessor(bool set_defaults)
1383  {
1384  if (set_defaults)
1385  {
1388 
1390 
1393 
1395 
1398 
1404 
1406  }
1407  else
1408  {
1409  preamplifier.bEnable = false;
1410  preamplifier.fFixedGainFactor = 0.0f;
1411 
1412  echocanceller.bEnable = false;
1413 
1414  noisesuppression.bEnable = false;
1415  noisesuppression.nLevel = 0;
1416 
1417  voicedetection.bEnable = false;
1418 
1419  gaincontroller2.bEnable = false;
1420  gaincontroller2.fixeddigital.fGainDB = 0.0f;
1421 
1422  gaincontroller2.adaptivedigital.bEnable = false;
1423  gaincontroller2.adaptivedigital.fInitialSaturationMarginDB = 0.0f;
1424  gaincontroller2.adaptivedigital.fExtraSaturationMarginDB = 0.0f;
1425  gaincontroller2.adaptivedigital.fMaxGainChangeDBPerSecond = 0.0f;
1426  gaincontroller2.adaptivedigital.fMaxOutputNoiseLevelDBFS = 0.0f;
1427 
1428  levelestimation.bEnable = false;
1429  }
1430  }
1431  }
1432 
1434  public struct WebRTCConstants
1435  {
1436  public const bool DEFAULT_WEBRTC_PREAMPLIFIER_ENABLE = false;
1437  public const float DEFAULT_WEBRTC_PREAMPLIFIER_GAINFACTOR = 1.0f;
1438  public const bool DEFAULT_WEBRTC_VAD_ENABLE = false;
1439  public const bool DEFAULT_WEBRTC_LEVELESTIMATION_ENABLE = false;
1440  public const bool DEFAULT_WEBRTC_GAINCTL_ENABLE = false;
1441  public const float DEFAULT_WEBRTC_GAINDB = 15;
1442  public const bool DEFAULT_WEBRTC_SAT_PROT_ENABLE = false;
1443  public const float DEFAULT_WEBRTC_INIT_SAT_MARGIN_DB = 20;
1444  public const float DEFAULT_WEBRTC_EXTRA_SAT_MARGIN_DB = 2;
1445  public const float DEFAULT_WEBRTC_MAXGAIN_DBSEC = 3;
1446  public const float DEFAULT_WEBRTC_MAX_OUT_NOISE = -50;
1447  public const bool DEFAULT_WEBRTC_NOISESUPPRESS_ENABLE = false;
1448  public const int DEFAULT_WEBRTC_NOISESUPPRESS_LEVEL = 2;
1449  public const bool DEFAULT_WEBRTC_ECHO_CANCEL_ENABLE = false;
1450  public const float WEBRTC_GAINCONTROLLER2_FIXEDGAIN_MAX = 49.9f;
1451  }
1452 
1456  public enum AudioPreprocessorType : uint
1457  {
1468  };
1469 
1471  [StructLayout(LayoutKind.Explicit)]
1472  public struct AudioPreprocessor
1473  {
1475  [FieldOffset(0)]
1478  [FieldOffset(4)]
1481  [FieldOffset(4)]
1484  [FieldOffset(4)]
1486  }
1487 
1489  public struct SpeexDSPConstants
1490  {
1491  public const bool DEFAULT_AGC_ENABLE = true;
1492  public const int DEFAULT_AGC_GAINLEVEL = 8000;
1493  public const int DEFAULT_AGC_INC_MAXDB = 12;
1494  public const int DEFAULT_AGC_DEC_MAXDB = -40;
1495  public const int DEFAULT_AGC_GAINMAXDB = 30;
1496  public const bool DEFAULT_DENOISE_ENABLE = true;
1497  public const int DEFAULT_DENOISE_SUPPRESS = -30;
1498  public const bool DEFAULT_ECHO_ENABLE = true;
1499  public const int DEFAULT_ECHO_SUPPRESS = -40;
1500  public const int DEFAULT_ECHO_SUPPRESS_ACTIVE = -15;
1501  }
1502 
1507  [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Unicode)]
1508  public struct WebMVP8Codec
1509  {
1511  [FieldOffset(0)]
1512  public int nRcTargetBitrate;
1518  [FieldOffset(0)]
1519  public int rc_target_bitrate;
1527  [FieldOffset(4)]
1528  public uint nEncodeDeadline;
1529  }
1530 
1532  {
1535  public const int WEBM_VPX_DL_REALTIME = 1;
1538  public const int WEBM_VPX_DL_GOOD_QUALITY = 1000000;
1541  public const int WEBM_VPX_DL_BEST_QUALITY = 0;
1542  }
1543 
1548  public enum Codec : uint
1549  {
1551  NO_CODEC = 0,
1554  SPEEX_CODEC = 1,
1557  SPEEX_VBR_CODEC = 2,
1559  OPUS_CODEC = 3,
1561  WEBM_VP8_CODEC = 128
1562  }
1563 
1567  [StructLayout(LayoutKind.Explicit)]
1568  public struct AudioCodec
1569  {
1572  [FieldOffset(0)]
1573  public Codec nCodec;
1576  [FieldOffset(4)]
1580  [FieldOffset(4)]
1584  [FieldOffset(4)]
1585  public OpusCodec opus;
1586  }
1587 
1601  [StructLayout(LayoutKind.Explicit)]
1602  public struct AudioConfig
1603  {
1605  [FieldOffset(0)]
1606  public bool bEnableAGC;
1608  [FieldOffset(4)]
1609  public int nGainLevel;
1610 
1611  public AudioConfig(bool set_defaults)
1612  {
1613  if (set_defaults)
1614  {
1615  bEnableAGC = true;
1617  }
1618  else
1619  {
1620  bEnableAGC = false;
1621  nGainLevel = 0;
1622  }
1623  }
1624  }
1625 
1626  public struct AudioConfigConstants
1627  {
1628  public const int DEFAULT_AGC_GAINLEVEL = 8000;
1629  public const int DEFAULT_AGC_INC_MAXDB = 12;
1630  }
1631 
1633  [StructLayout(LayoutKind.Explicit)]
1634  public struct VideoCodec
1635  {
1639  [FieldOffset(0)]
1640  public Codec nCodec;
1641  [FieldOffset(4)]
1643  }
1654  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1655  public struct MediaFileInfo
1656  {
1661  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
1662  public string szFileName;
1668  public uint uDurationMSec;
1670  public uint uElapsedMSec;
1671  }
1680  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1681  public struct MediaFilePlayback
1682  {
1687  public uint uOffsetMSec;
1689  public bool bPaused;
1692  }
1693 
1696  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1697  public struct AudioInputProgress
1698  {
1700  public int nStreamID;
1703  public uint uQueueMSec;
1706  public uint uElapsedMSec;
1707  }
1708 
1725  [Flags]
1726  public enum UserRight : uint
1727  {
1730  USERRIGHT_NONE = 0x00000000,
1733  USERRIGHT_MULTI_LOGIN = 0x00000001,
1735  USERRIGHT_VIEW_ALL_USERS = 0x00000002,
1743  USERRIGHT_MODIFY_CHANNELS = 0x00000008,
1746  USERRIGHT_TEXTMESSAGE_BROADCAST = 0x00000010,
1748  USERRIGHT_KICK_USERS = 0x00000020,
1751  USERRIGHT_BAN_USERS = 0x00000040,
1754  USERRIGHT_MOVE_USERS = 0x00000080,
1757  USERRIGHT_OPERATOR_ENABLE = 0x00000100,
1759  USERRIGHT_UPLOAD_FILES = 0x00000200,
1762  USERRIGHT_DOWNLOAD_FILES = 0x00000400,
1765  USERRIGHT_UPDATE_SERVERPROPERTIES = 0x00000800,
1768  USERRIGHT_TRANSMIT_VOICE = 0x00001000,
1771  USERRIGHT_TRANSMIT_VIDEOCAPTURE = 0x00002000,
1774  USERRIGHT_TRANSMIT_DESKTOP = 0x00004000,
1777  USERRIGHT_TRANSMIT_DESKTOPINPUT = 0x00008000,
1793  USERRIGHT_LOCKED_NICKNAME = 0x00040000,
1796  USERRIGHT_LOCKED_STATUS = 0x00080000,
1799  USERRIGHT_RECORD_VOICE = 0x00100000,
1801  USERRIGHT_VIEW_HIDDEN_CHANNELS = 0x00200000,
1804  USERRIGHT_TEXTMESSAGE_USER = 0x00400000,
1807  USERRIGHT_TEXTMESSAGE_CHANNEL = 0x00800000,
1808 
1810  USERRIGHT_ALL = 0xFFFFFFFF & ~USERRIGHT_LOCKED_NICKNAME & ~USERRIGHT_LOCKED_STATUS
1811  }
1812 
1819  [Flags]
1820  public enum ServerLogEvent : uint
1821  {
1823  SERVERLOGEVENT_NONE = 0x00000000,
1825  SERVERLOGEVENT_USER_CONNECTED = 0x00000001,
1827  SERVERLOGEVENT_USER_DISCONNECTED = 0x00000002,
1829  SERVERLOGEVENT_USER_LOGGEDIN = 0x00000004,
1831  SERVERLOGEVENT_USER_LOGGEDOUT = 0x00000008,
1833  SERVERLOGEVENT_USER_LOGINFAILED = 0x00000010,
1835  SERVERLOGEVENT_USER_TIMEDOUT = 0x00000020,
1837  SERVERLOGEVENT_USER_KICKED = 0x00000040,
1839  SERVERLOGEVENT_USER_BANNED = 0x00000080,
1841  SERVERLOGEVENT_USER_UNBANNED = 0x00000100,
1843  SERVERLOGEVENT_USER_UPDATED = 0x00000200,
1845  SERVERLOGEVENT_USER_JOINEDCHANNEL = 0x00000400,
1847  SERVERLOGEVENT_USER_LEFTCHANNEL = 0x00000800,
1849  SERVERLOGEVENT_USER_MOVED = 0x00001000,
1859  SERVERLOGEVENT_CHANNEL_CREATED = 0x00020000,
1861  SERVERLOGEVENT_CHANNEL_UPDATED = 0x00040000,
1863  SERVERLOGEVENT_CHANNEL_REMOVED = 0x00080000,
1865  SERVERLOGEVENT_FILE_UPLOADED = 0x00100000,
1867  SERVERLOGEVENT_FILE_DOWNLOADED = 0x00200000,
1869  SERVERLOGEVENT_FILE_DELETED = 0x00400000,
1871  SERVERLOGEVENT_SERVER_UPDATED = 0x00800000,
1873  SERVERLOGEVENT_SERVER_SAVECONFIG = 0x01000000,
1874  }
1875 
1887  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1888  public struct ServerProperties
1889  {
1891  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
1892  public string szServerName;
1895  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
1896  public string szMOTD;
1905  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
1906  public string szMOTDRaw;
1909  public int nMaxUsers;
1912  public int nMaxLoginAttempts;
1938  public bool bAutoSave;
1940  public int nTcpPort;
1942  public int nUdpPort;
1945  public int nUserTimeout;
1947  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
1948  public string szServerVersion;
1950  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
1960  public int nLoginDelayMSec;
1964  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
1965  public string szAccessToken;
1972  }
1973 
1981  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
1982  public struct ServerStatistics
1983  {
1986  public long nTotalBytesTX;
1989  public long nTotalBytesRX;
1992  public long nVoiceBytesTX;
1995  public long nVoiceBytesRX;
2004  public long nMediaFileBytesTX;
2007  public long nMediaFileBytesRX;
2010  public long nDesktopBytesTX;
2013  public long nDesktopBytesRX;
2015  public int nUsersServed;
2017  public int nUsersPeak;
2020  public long nFilesTx;
2023  public long nFilesRx;
2025  public long nUptimeMSec;
2026  }
2027 
2033  [Flags]
2034  public enum BanType : uint
2035  {
2037  BANTYPE_NONE = 0x00,
2041  BANTYPE_CHANNEL = 0x01,
2043  BANTYPE_IPADDR = 0x02,
2045  BANTYPE_USERNAME = 0x04
2046  };
2047 
2052  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2053  public struct BannedUser
2054  {
2056  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2057  public string szIPAddress;
2059  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2060  public string szChannelPath;
2062  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2063  public string szBanTime;
2065  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2066  public string szNickname;
2068  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2069  public string szUsername;
2073  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2074  public string szOwner;
2075  }
2076 
2080  [Flags]
2081  public enum UserType : uint
2082  {
2085  USERTYPE_NONE = 0x0,
2087  USERTYPE_DEFAULT = 0x01,
2089  USERTYPE_ADMIN = 0x02
2090  }
2091 
2100  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2101  public struct AbusePrevention
2102  {
2112  public int nCommandsLimit;
2115  }
2116 
2125  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2126  public struct UserAccount
2127  {
2129  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2130  public string szUsername;
2132  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2133  public string szPassword;
2143  public int nUserData;
2145  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2146  public string szNote;
2151  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2152  public string szInitChannel;
2156  [MarshalAs(UnmanagedType.ByValArray, SizeConst = TeamTalkBase.TT_CHANNELS_OPERATOR_MAX)]
2157  public int[] autoOperatorChannels;
2169  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2170  public string szLastModified;
2171  }
2195  [Flags]
2196  public enum Subscription : uint
2197  {
2199  SUBSCRIBE_NONE = 0x00000000,
2202  SUBSCRIBE_USER_MSG = 0x00000001,
2205  SUBSCRIBE_CHANNEL_MSG = 0x00000002,
2208  SUBSCRIBE_BROADCAST_MSG = 0x00000004,
2211  SUBSCRIBE_CUSTOM_MSG = 0x00000008,
2213  SUBSCRIBE_VOICE = 0x00000010,
2215  SUBSCRIBE_VIDEOCAPTURE = 0x00000020,
2217  SUBSCRIBE_DESKTOP = 0x00000040,
2221  SUBSCRIBE_DESKTOPINPUT = 0x00000080,
2224  SUBSCRIBE_MEDIAFILE = 0x00000100,
2227  SUBSCRIBE_INTERCEPT_USER_MSG = 0x00010000,
2230  SUBSCRIBE_INTERCEPT_CHANNEL_MSG = 0x00020000,
2231  /* unused SUBSCRIBE_INTERCEPT_BROADCAST_MSG = 0x00040000 */
2234  SUBSCRIBE_INTERCEPT_CUSTOM_MSG = 0x00080000,
2239  SUBSCRIBE_INTERCEPT_VOICE = 0x00100000,
2244  SUBSCRIBE_INTERCEPT_VIDEOCAPTURE = 0x00200000,
2249  SUBSCRIBE_INTERCEPT_DESKTOP = 0x00400000,
2250  /* unused SUBSCRIBE_INTERCEPT_DESKTOPINPUT = 0x00800000, */
2255  SUBSCRIBE_INTERCEPT_MEDIAFILE = 0x01000000,
2256  }
2257 
2261  [Flags]
2262  public enum UserState : uint
2263  {
2265  USERSTATE_NONE = 0x0000000,
2269  USERSTATE_VOICE = 0x00000001,
2271  USERSTATE_MUTE_VOICE = 0x00000002,
2274  USERSTATE_MUTE_MEDIAFILE = 0x00000004,
2279  USERSTATE_DESKTOP = 0x00000008,
2284  USERSTATE_VIDEOCAPTURE = 0x00000010,
2290  USERSTATE_MEDIAFILE_AUDIO = 0x00000020,
2294  USERSTATE_MEDIAFILE_VIDEO = 0x00000040,
2300  }
2301 
2306  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2307  public struct User
2308  {
2312  public int nUserID;
2317  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2318  public string szUsername;
2323  public int nUserData;
2329  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2330  public string szIPAddress;
2336  public uint uVersion;
2342  public int nChannelID;
2359  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2360  public string szNickname;
2365  public int nStatusMode;
2370  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2371  public string szStatusMsg;
2377  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2378  public string szMediaStorageDir;
2384  public int nVolumeVoice;
2390  public int nVolumeMediaFile;
2403  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
2404  public float[] soundPositionVoice;
2409  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
2410  public float[] soundPositionMediaFile;
2415  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
2416  public bool[] stereoPlaybackVoice;
2421  [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
2426  public int nBufferMSecVoice;
2438  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2439  public string szClientName;
2440  }
2441 
2446  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2447  public struct UserStatistics
2448  {
2450  public long nVoicePacketsRecv;
2452  public long nVoicePacketsLost;
2479  }
2480 
2489  public enum TextMsgType : uint
2490  {
2493  MSGTYPE_USER = 1,
2498  MSGTYPE_CHANNEL = 2,
2501  MSGTYPE_BROADCAST = 3,
2504  MSGTYPE_CUSTOM = 4
2505  }
2506 
2514  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2515  public struct TextMessage
2516  {
2520  public int nFromUserID;
2522  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2523  public string szFromUsername;
2525  public int nToUserID;
2528  public int nChannelID;
2531  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2532  public string szMessage;
2535  public bool bMore;
2536  }
2544  [Flags]
2545  public enum ChannelType : uint
2546  {
2549  CHANNEL_DEFAULT = 0x0000,
2552  CHANNEL_PERMANENT = 0x0001,
2554  CHANNEL_SOLO_TRANSMIT = 0x0002,
2565  CHANNEL_CLASSROOM = 0x0004,
2570  CHANNEL_OPERATOR_RECVONLY = 0x0008,
2573  CHANNEL_NO_VOICEACTIVATION = 0x0010,
2575  CHANNEL_NO_RECORDING = 0x0020,
2578  CHANNEL_HIDDEN = 0x0040,
2579  }
2580 
2592  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2593  public struct Channel
2594  {
2597  public int nParentID;
2600  public int nChannelID;
2602  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2603  public string szName;
2605  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2606  public string szTopic;
2610  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2611  public string szPassword;
2614  public bool bPassword;
2620  public int nUserData;
2622  public long nDiskQuota;
2625  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2626  public string szOpPassword;
2628  public int nMaxUsers;
2689  [MarshalAs(UnmanagedType.ByValArray, SizeConst = TeamTalkBase.TT_TRANSMITUSERS_MAX * 2)]
2690  public int[] transmitUsers;
2695  [MarshalAs(UnmanagedType.ByValArray, SizeConst = TeamTalkBase.TT_TRANSMITQUEUE_MAX)]
2696  public int[] transmitUsersQueue;
2697 
2706 
2711 
2716 
2719  public void AddTransmitUser(int nUserID, StreamType uStreamType)
2720  {
2721  int i;
2722  for (i = 0; i < TeamTalkBase.TT_TRANSMITUSERS_MAX; i++)
2723  {
2724  if (transmitUsers[i * 2] == 0 || transmitUsers[i * 2] == nUserID)
2725  break;
2726  }
2728  {
2729  transmitUsers[i * 2] = nUserID;
2730  transmitUsers[i * 2 + 1] |= (int)uStreamType;
2731  }
2732  }
2736  {
2737  int i;
2738  for (i = 0; i < TeamTalkBase.TT_TRANSMITUSERS_MAX; i++)
2739  {
2740  if (transmitUsers[i * 2] == nUserID)
2741  return (StreamType)transmitUsers[i * 2 + 1];
2742  }
2743  return StreamType.STREAMTYPE_NONE;
2744  }
2747  {
2748  int i;
2749  for (i = 0; i < TeamTalkBase.TT_TRANSMITUSERS_MAX; i++)
2750  {
2751  if (transmitUsers[i * 2] == 0)
2752  break;
2753  }
2754  return i;
2755  }
2757  public void RemoveTransmitUser(int nUserID, StreamType uStreamType)
2758  {
2759  int i;
2760  for (i = 0; i < TeamTalkBase.TT_TRANSMITUSERS_MAX; i++)
2761  {
2762  if (transmitUsers[i * 2] == nUserID)
2763  break;
2764  }
2766  {
2767  transmitUsers[i * 2] = nUserID;
2768  transmitUsers[i * 2 + 1] &= (int)~uStreamType;
2769 
2770  if (transmitUsers[i * 2 + 1] == (int)StreamType.STREAMTYPE_NONE)
2771  {
2772  for (; i < TeamTalkBase.TT_TRANSMITUSERS_MAX - 1; i++)
2773  {
2774  transmitUsers[i * 2] = transmitUsers[(i + 1) * 2 + 1];
2775  transmitUsers[i * 2 + 1] = transmitUsers[(i + 1) * 2 + 1];
2776  }
2777  }
2778  }
2779  }
2780  }
2781 
2784  public enum FileTransferStatus : uint
2785  {
2787  FILETRANSFER_CLOSED = 0,
2789  FILETRANSFER_ERROR = 1,
2791  FILETRANSFER_ACTIVE = 2,
2794  }
2795 
2799  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2800  public struct FileTransfer
2801  {
2805  public int nTransferID;
2807  public int nChannelID;
2809  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2810  public string szLocalFilePath;
2812  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2813  public string szRemoteFileName;
2815  public long nFileSize;
2817  public long nTransferred;
2819  public bool bInbound;
2820  }
2821 
2825  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2826  public struct RemoteFile
2827  {
2829  public int nChannelID;
2831  public int nFileID;
2833  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2834  public string szFileName;
2836  public long nFileSize;
2838  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2839  public string szUsername;
2842  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2843  public string szUploadTime;
2844  }
2855  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2856  public struct EncryptionContext
2857  {
2863  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2864  public string szCertificateFile;
2866  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2867  public string szPrivateKeyFile;
2872  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2873  public string szCAFile;
2876  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
2877  public string szCADir;
2884  public bool bVerifyPeer;
2895  public bool bVerifyClientOnce;
2903  public int nVerifyDepth;
2904  }
2905 
2913  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2914  public struct ClientKeepAlive
2915  {
2958  }
2959 
2964  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
2965  public struct ClientStatistics
2966  {
2968  public long nUdpBytesSent;
2970  public long nUdpBytesRecv;
2972  public long nVoiceBytesSent;
2974  public long nVoiceBytesRecv;
2988  public long nDesktopBytesSent;
2990  public long nDesktopBytesRecv;
2994  public int nUdpPingTimeMs;
2998  public int nTcpPingTimeMs;
3017  }
3018 
3024  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
3025  public struct JitterConfig
3026  {
3028  public int nFixedDelayMSec;
3030  public bool bUseAdativeDejitter;
3041  }
3042 
3043 
3053  public enum ClientError : uint
3054  {
3056  CMDERR_SUCCESS = 0,
3057  SUCCESS = 0,
3058 
3059  /* COMMAND ERRORS 1000-1999 ARE DUE TO INVALID OR UNSUPPORTED
3060  * COMMANDS */
3061 
3063  CMDERR_SYNTAX_ERROR = 1000,
3068  CMDERR_UNKNOWN_COMMAND = 1001,
3071  CMDERR_MISSING_PARAMETER = 1002,
3082  CMDERR_INVALID_USERNAME = 1005,
3083 
3084  /* COMMAND ERRORS 2000-2999 ARE DUE TO INSUFFICIENT RIGHTS */
3085 
3102  CMDERR_INVALID_ACCOUNT = 2002,
3119  CMDERR_SERVER_BANNED = 2005,
3151  CMDERR_NOT_AUTHORIZED = 2006,
3159 
3166 
3173 
3180 
3184 
3189  CMDERR_COMMAND_FLOOD = 2014,
3190 
3196  CMDERR_CHANNEL_BANNED = 2015,
3197 
3203 
3204  /* COMMAND ERRORS 3000-3999 ARE DUE TO INVALID STATE OF CLIENT INSTANCE */
3205 
3211  CMDERR_NOT_LOGGEDIN = 3000,
3212 
3216  CMDERR_ALREADY_LOGGEDIN = 3001,
3220  CMDERR_NOT_IN_CHANNEL = 3002,
3247  CMDERR_CHANNEL_NOT_FOUND = 3005,
3258  CMDERR_USER_NOT_FOUND = 3006,
3263  CMDERR_BAN_NOT_FOUND = 3007,
3273  CMDERR_OPENFILE_FAILED = 3009,
3278  CMDERR_ACCOUNT_NOT_FOUND = 3010,
3283  CMDERR_FILE_NOT_FOUND = 3011,
3294 
3298  CMDERR_CHANNEL_HAS_USERS = 3015,
3299 
3304 
3310 
3311  /* ERRORS 10000-10999 ARE NOT COMMAND ERRORS BUT INSTEAD
3312  * ERRORS IN THE CLIENT INSTANCE. */
3313 
3318  INTERR_SNDINPUT_FAILURE = 10000,
3323  INTERR_SNDOUTPUT_FAILURE = 10001,
3352  INTERR_SNDEFFECT_FAILURE = 10005,
3353  }
3354 
3355  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
3356  public struct ClientErrorMsg
3357  {
3359  public int nErrorNo;
3361  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
3362  public string szErrorMsg;
3363  }
3364 
3374  public enum ClientEvent : uint
3375  {
3376  CLIENTEVENT_NONE = 0,
3928  }
3929 
3930 
3931  /* List of structures used internally by TeamTalkBase. */
3932  public enum TTType : uint
3933  {
3934  __NONE = 0,
3935  __AUDIOCODEC = 1,
3936  __BANNEDUSER = 2,
3937  __VIDEOFORMAT = 3,
3938  __OPUSCODEC = 4,
3939  __CHANNEL = 5,
3940  __CLIENTSTATISTICS = 6,
3941  __REMOTEFILE = 7,
3942  __FILETRANSFER = 8,
3943  __MEDIAFILESTATUS = 9,
3944  __SERVERPROPERTIES = 10,
3945  __SERVERSTATISTICS = 11,
3946  __SOUNDDEVICE = 12,
3947  __SPEEXCODEC = 13,
3948  __TEXTMESSAGE = 14,
3949  __WEBMVP8CODEC = 15,
3950  __TTMESSAGE = 16,
3951  __USER = 17,
3952  __USERACCOUNT = 18,
3953  __USERSTATISTICS = 19,
3954  __VIDEOCAPTUREDEVICE = 20,
3955  __VIDEOCODEC = 21,
3956  __AUDIOCONFIG = 22,
3957  __SPEEXVBRCODEC = 23,
3958  __VIDEOFRAME = 24,
3959  __AUDIOBLOCK = 25,
3960  __AUDIOFORMAT = 26,
3961  __MEDIAFILEINFO = 27,
3962  __CLIENTERRORMSG = 28,
3963  __TTBOOL = 29,
3964  __INT32 = 30,
3965  __DESKTOPINPUT = 31,
3966  __SPEEXDSP = 32,
3967  __STREAMTYPE = 33,
3969  __AUDIOPREPROCESSOR = 35,
3970  __TTAUDIOPREPROCESSOR = 36,
3971  __MEDIAFILEPLAYBACK = 37,
3972  __CLIENTKEEPALIVE = 38,
3973  __UINT32 = 39,
3974  __AUDIOINPUTPROGRESS = 40,
3975  __JITTERCONFIG = 41,
3977  __ENCRYPTIONCONTEXT = 43,
3978  __SOUNDDEVICEEFFECTS = 44,
3979  __DESKTOPWINDOW = 45,
3980  __ABUSEPREVENTION = 46,
3981  }
3982 
3993  [StructLayout(LayoutKind.Sequential)]
3994  public struct TTMessage
3995  {
3999  public int nSource;
4001  public TTType ttType;
4003  public uint uReserved;
4004  [MarshalAs(UnmanagedType.ByValArray, SizeConst = TTDLL.SIZEOF_TTMESSAGE_DATA)]
4005  public byte[] data;
4006  //UnionData data;
4007 
4008  public object DataToObject()
4009  {
4010  switch (ttType)
4011  {
4012  case TTType.__CHANNEL:
4013  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(Channel));
4014  case TTType.__CLIENTERRORMSG:
4015  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(ClientErrorMsg));
4016  case TTType.__DESKTOPINPUT:
4017  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(DesktopInput));
4018  case TTType.__FILETRANSFER:
4019  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(FileTransfer));
4020  case TTType.__MEDIAFILEINFO:
4021  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(MediaFileInfo));
4022  case TTType.__REMOTEFILE:
4023  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(RemoteFile));
4024  case TTType.__SERVERPROPERTIES:
4025  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(ServerProperties));
4026  case TTType.__SERVERSTATISTICS:
4027  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(ServerStatistics));
4028  case TTType.__TEXTMESSAGE:
4029  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(TextMessage));
4030  case TTType.__USER:
4031  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(User));
4032  case TTType.__USERACCOUNT:
4033  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(UserAccount));
4034  case TTType.__BANNEDUSER :
4035  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(BannedUser));
4036  case TTType.__TTBOOL:
4037  return Marshal.ReadInt32(TTDLL.TT_DBG_GETDATAPTR(ref this)) != 0;
4038  case TTType.__INT32:
4039  return Marshal.ReadInt32(TTDLL.TT_DBG_GETDATAPTR(ref this));
4040  case TTType.__STREAMTYPE :
4041  return (StreamType)Marshal.ReadInt32(TTDLL.TT_DBG_GETDATAPTR(ref this));
4042  case TTType.__AUDIOINPUTPROGRESS :
4043  return Marshal.PtrToStructure(TTDLL.TT_DBG_GETDATAPTR(ref this), typeof(AudioInputProgress));
4044  default:
4045  return null;
4046  }
4047  }
4048  }
4049 
4050  [StructLayout(LayoutKind.Explicit, Size = 5224)]
4051  struct UnionData
4052  {
4053  [FieldOffset(0)]
4055  [FieldOffset(0)]
4057  [FieldOffset(0)]
4059  [FieldOffset(0)]
4061  [FieldOffset(0)]
4063  [FieldOffset(0)]
4065  [FieldOffset(0)]
4067  [FieldOffset(0)]
4069  [FieldOffset(0)]
4070  public User user;
4071  [FieldOffset(0)]
4073  [FieldOffset(0)]
4074  public bool bActive;
4075  [FieldOffset(0)]
4076  public int nBytesRemain;
4077  [FieldOffset(0)]
4078  public int nStreamID;
4079  [FieldOffset(0)]
4080  public int nPayloadSize;
4081  }
4082 
4100  [Flags]
4101  public enum ClientFlag : uint
4102  {
4105  CLIENT_CLOSED = 0x00000000,
4109  CLIENT_SNDINPUT_READY = 0x00000001,
4113  CLIENT_SNDOUTPUT_READY = 0x00000002,
4119  CLIENT_SNDINOUTPUT_DUPLEX = 0x00000004,
4126  CLIENT_SNDINPUT_VOICEACTIVATED = 0x00000008,
4133  CLIENT_SNDINPUT_VOICEACTIVE = 0x00000010,
4136  CLIENT_SNDOUTPUT_MUTE = 0x00000020,
4142  CLIENT_SNDOUTPUT_AUTO3DPOSITION = 0x00000040,
4146  CLIENT_VIDEOCAPTURE_READY = 0x00000080,
4149  CLIENT_TX_VOICE = 0x00000100,
4152  CLIENT_TX_VIDEOCAPTURE = 0x00000200,
4158  CLIENT_TX_DESKTOP = 0x00000400,
4163  CLIENT_DESKTOP_ACTIVE = 0x00000800,
4167  CLIENT_MUX_AUDIOFILE = 0x00001000,
4170  CLIENT_CONNECTING = 0x00002000,
4175  CLIENT_CONNECTED = 0x00004000,
4182  CLIENT_AUTHORIZED = 0x00008000,
4187  CLIENT_STREAM_AUDIO = 0x00010000,
4192  CLIENT_STREAM_VIDEO = 0x00020000
4193  }
4194 
4202  public abstract class TeamTalkBase : IDisposable
4203  {
4212  public const int TT_STRLEN = 512;
4213 
4215  public const int TT_USERID_MAX = 0xFFF;
4216 
4219  public const int TT_CHANNELID_MAX = 0xFFF;
4220 
4224  public const int TT_VIDEOFORMATS_MAX = 1024;
4225 
4231  public const int TT_TRANSMITUSERS_MAX = 128;
4232 
4240  public const int TT_CLASSROOM_FREEFORALL = 0xFFF;
4241 
4244  public const int TT_CLASSROOM_USERID_INDEX = 0;
4245 
4248  public const int TT_CLASSROOM_STREAMTYPE_INDEX = 1;
4249 
4252  public const int TT_TRANSMITUSERS_FREEFORALL = 0xFFF;
4253 
4256  public const int TT_TRANSMITUSERS_USERID_INDEX = 0;
4257 
4260  public const int TT_TRANSMITUSERS_STREAMTYPE_INDEX = 1;
4261 
4275  public const int TT_LOCAL_USERID = 0;
4276 
4284  public const int TT_LOCAL_TX_USERID = 0x1002;
4285 
4293  public const int TT_MUXED_USERID = 0x1001; /* TT_USERID_MAX + 2 */
4294 
4299  public const int TT_CHANNELS_OPERATOR_MAX = 16;
4300 
4304  public const int TT_TRANSMITQUEUE_MAX = 16;
4305 
4308  public const int TT_SAMPLERATES_MAX = 16;
4309 
4314  public const int TT_DESKTOPINPUT_MAX = 16;
4315 
4324  public const uint TT_MEDIAPLAYBACK_OFFSET_IGNORE = 0xFFFFFFFF;
4325 
4326 
4328  public static string GetVersion() { return Marshal.PtrToStringAuto(TTDLL.TT_GetVersion()); }
4329 
4340  protected TeamTalkBase(bool poll_based)
4341  {
4342  Assembly assembly = Assembly.GetExecutingAssembly();
4343  AssemblyName name = assembly.GetName();
4344  Version dllversion = new Version(Marshal.PtrToStringUni((c_tt.TTDLL.TT_GetVersion())));
4345  if (!name.Version.Equals(dllversion))
4346  {
4347  string errmsg = String.Format("Invalid {2} version loaded. {2} is version {0} and {3} is version {1}",
4348  dllversion.ToString(), name.Version.ToString(), c_tt.TTDLL.dllname, c_tt.TTDLL.mgtdllname);
4349 
4350  // throw new Exception(errmsg);
4351 
4352  System.Diagnostics.Debug.WriteLine(errmsg);
4353  }
4354 
4355  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__AUDIOCODEC) == Marshal.SizeOf(new AudioCodec()));
4356  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__BANNEDUSER) == Marshal.SizeOf(new BannedUser()));
4357  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__VIDEOFORMAT) == Marshal.SizeOf(new VideoFormat()));
4358  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__OPUSCODEC) == Marshal.SizeOf(new OpusCodec()));
4359  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__CHANNEL) == Marshal.SizeOf(new Channel()));
4360  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__CLIENTSTATISTICS) == Marshal.SizeOf(new ClientStatistics()));
4361  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__REMOTEFILE) == Marshal.SizeOf(new RemoteFile()));
4362  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__FILETRANSFER) == Marshal.SizeOf(new FileTransfer()));
4363  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__MEDIAFILESTATUS) == Marshal.SizeOf(Enum.GetUnderlyingType(typeof(MediaFileStatus))));
4364  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__SERVERPROPERTIES) == Marshal.SizeOf(new ServerProperties()));
4365  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__SERVERSTATISTICS) == Marshal.SizeOf(new ServerStatistics()));
4366  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__SOUNDDEVICE) == Marshal.SizeOf(new SoundDevice()));
4367  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__SPEEXCODEC) == Marshal.SizeOf(new SpeexCodec()));
4368  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__TEXTMESSAGE) == Marshal.SizeOf(new TextMessage()));
4369  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__WEBMVP8CODEC) == Marshal.SizeOf(new WebMVP8Codec()));
4370  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__TTMESSAGE) == Marshal.SizeOf(new TTMessage()));
4371  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__USER) == Marshal.SizeOf(new User()));
4372  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__USERACCOUNT) == Marshal.SizeOf(new UserAccount()));
4373  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__USERSTATISTICS) == Marshal.SizeOf(new UserStatistics()));
4374  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__VIDEOCAPTUREDEVICE) == Marshal.SizeOf(new VideoCaptureDevice()));
4375  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__VIDEOCODEC) == Marshal.SizeOf(new VideoCodec()));
4376  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__AUDIOCONFIG) == Marshal.SizeOf(new AudioConfig()));
4377  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__SPEEXVBRCODEC) == Marshal.SizeOf(new SpeexVBRCodec()));
4378  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__VIDEOFRAME) == Marshal.SizeOf(new VideoFrame()));
4379  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__AUDIOBLOCK) == Marshal.SizeOf(new AudioBlock()));
4380  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__AUDIOFORMAT) == Marshal.SizeOf(new AudioFormat()));
4381  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__MEDIAFILEINFO) == Marshal.SizeOf(new MediaFileInfo()));
4382  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__CLIENTERRORMSG) == Marshal.SizeOf(new ClientErrorMsg()));
4383  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__DESKTOPINPUT) == Marshal.SizeOf(new DesktopInput()));
4384  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__SPEEXDSP) == Marshal.SizeOf(new SpeexDSP()));
4385  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__STREAMTYPE) == Marshal.SizeOf(Enum.GetUnderlyingType(typeof(StreamType))));
4386  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__AUDIOPREPROCESSORTYPE) == Marshal.SizeOf(Enum.GetUnderlyingType(typeof(AudioPreprocessorType))));
4387  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__WEBRTCAUDIOPREPROCESSOR) == Marshal.SizeOf(new WebRTCAudioPreprocessor()));
4388  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__TTAUDIOPREPROCESSOR) == Marshal.SizeOf(new TTAudioPreprocessor()));
4389  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__AUDIOPREPROCESSOR) == Marshal.SizeOf(new AudioPreprocessor()));
4390  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__MEDIAFILEPLAYBACK) == Marshal.SizeOf(new MediaFilePlayback()));
4391  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__CLIENTKEEPALIVE) == Marshal.SizeOf(new ClientKeepAlive()));
4392  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__AUDIOINPUTPROGRESS) == Marshal.SizeOf(new AudioInputProgress()));
4393  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__JITTERCONFIG) == Marshal.SizeOf(new JitterConfig()));
4394  Debug.Assert(TTDLL.TT_DBG_SIZEOF(TTType.__ENCRYPTIONCONTEXT) == Marshal.SizeOf(new EncryptionContext()));
4395 
4396  if (poll_based)
4397  m_ttInst = TTDLL.TT_InitTeamTalkPoll();
4398  else
4399  {
4400  m_eventhandler = new MyEventHandler(this);
4401 #if PocketPC
4402  IntPtr hWnd = m_eventhandler.Hwnd;
4403 #else
4404  m_eventhandler.CreateControl();
4405  IntPtr hWnd = m_eventhandler.Handle;
4406 #endif
4407  m_ttInst = TTDLL.TT_InitTeamTalk(hWnd, MyEventHandler.WM_TEAMTALK_CLIENTEVENT);
4408  }
4409  }
4410 
4415  ~TeamTalkBase()
4416  {
4417  DeleteMe();
4418  }
4419 
4420 
4421  #region IDisposable Members
4422 
4423  public void Dispose()
4424  {
4425  DeleteMe();
4426  }
4427 
4428  private void DeleteMe()
4429  {
4430  if (m_ttInst != IntPtr.Zero)
4431  {
4432  TTDLL.TT_CloseTeamTalk(m_ttInst);
4433  m_ttInst = IntPtr.Zero;
4434  }
4435  }
4436 
4437  #endregion
4438 
4456  public bool GetMessage(ref TTMessage pMsg, int nWaitMs)
4457  {
4458  return TTDLL.TT_GetMessage(m_ttInst, ref pMsg, ref nWaitMs);
4459  }
4460 
4487  public bool PumpMessage(ClientEvent nClientEvent,
4488  int nIdentifier)
4489  {
4490  return TTDLL.TT_PumpMessage(m_ttInst, nClientEvent, nIdentifier);
4491  }
4492 
4501  public BearWare.ClientFlag GetFlags()
4502  {
4503  return TTDLL.TT_GetFlags(m_ttInst);
4504  }
4505 
4509  public ClientFlag Flags
4510  {
4511  get { return GetFlags(); }
4512  }
4513 
4523  public static bool SetLicenseInformation(string szRegName, string szRegKey)
4524  {
4525  return TTDLL.TT_SetLicenseInformation(szRegName, szRegKey);
4526  }
4527 
4532  public void ProcessMsg(TTMessage msg)
4533  {
4534  switch (msg.nClientEvent)
4535  {
4536  case ClientEvent.CLIENTEVENT_CON_SUCCESS:
4537  if(OnConnectionSuccess != null)
4538  OnConnectionSuccess();
4539  break;
4540  case ClientEvent.CLIENTEVENT_CON_FAILED:
4541  if (OnConnectionFailed != null)
4542  OnConnectionFailed();
4543  break;
4544  case ClientEvent.CLIENTEVENT_CON_LOST:
4545  if (OnConnectionLost != null)
4546  OnConnectionLost();
4547  break;
4548  case ClientEvent.CLIENTEVENT_CON_MAX_PAYLOAD_UPDATED :
4549  if (OnConnectionMaxPayloadUpdated != null)
4550  OnConnectionMaxPayloadUpdated((int)msg.DataToObject());
4551  break;
4552  case ClientEvent.CLIENTEVENT_CMD_PROCESSING:
4553  if (OnCmdProcessing != null)
4554  OnCmdProcessing(msg.nSource, (bool)msg.DataToObject());
4555  break;
4556  case ClientEvent.CLIENTEVENT_CMD_ERROR:
4557  if (OnCmdError != null)
4558  OnCmdError((int)msg.nSource, (ClientErrorMsg)msg.DataToObject());
4559  break;
4560  case ClientEvent.CLIENTEVENT_CMD_SUCCESS :
4561  if (OnCmdSuccess != null)
4562  OnCmdSuccess((int)msg.nSource);
4563  break;
4564  case ClientEvent.CLIENTEVENT_CMD_MYSELF_LOGGEDIN:
4565  if (OnCmdMyselfLoggedIn != null)
4566  OnCmdMyselfLoggedIn((int)msg.nSource, (UserAccount)msg.DataToObject());
4567  break;
4568  case ClientEvent.CLIENTEVENT_CMD_MYSELF_LOGGEDOUT:
4569  if (OnCmdMyselfLoggedOut != null)
4570  OnCmdMyselfLoggedOut();
4571  break;
4572  case ClientEvent.CLIENTEVENT_CMD_MYSELF_KICKED:
4573  if (msg.ttType == TTType.__USER)
4574  {
4575  if (OnCmdMyselfKicked != null)
4576  OnCmdMyselfKicked((User)msg.DataToObject());
4577  }
4578  else if (OnCmdMyselfKicked != null)
4579  OnCmdMyselfKicked(new User());
4580  break;
4581  case ClientEvent.CLIENTEVENT_CMD_USER_LOGGEDIN:
4582  if (OnCmdUserLoggedIn != null)
4583  OnCmdUserLoggedIn((User)msg.DataToObject());
4584  break;
4585  case ClientEvent.CLIENTEVENT_CMD_USER_LOGGEDOUT:
4586  if (OnCmdUserLoggedOut != null)
4587  OnCmdUserLoggedOut((User)msg.DataToObject());
4588  break;
4589  case ClientEvent.CLIENTEVENT_CMD_USER_UPDATE:
4590  if (OnCmdUserUpdate != null)
4591  OnCmdUserUpdate((User)msg.DataToObject());
4592  break;
4593  case ClientEvent.CLIENTEVENT_CMD_USER_JOINED:
4594  if (OnCmdUserJoinedChannel != null)
4595  OnCmdUserJoinedChannel((User)msg.DataToObject());
4596  break;
4597  case ClientEvent.CLIENTEVENT_CMD_USER_LEFT:
4598  if (OnCmdUserLeftChannel != null)
4599  OnCmdUserLeftChannel((User)msg.DataToObject());
4600  break;
4601  case ClientEvent.CLIENTEVENT_CMD_USER_TEXTMSG:
4602  if (OnCmdUserTextMessage != null)
4603  OnCmdUserTextMessage((TextMessage)msg.DataToObject());
4604  break;
4605  case ClientEvent.CLIENTEVENT_CMD_CHANNEL_NEW:
4606  if (OnCmdChannelNew != null)
4607  OnCmdChannelNew((Channel)msg.DataToObject());
4608  break;
4609  case ClientEvent.CLIENTEVENT_CMD_CHANNEL_UPDATE:
4610  if (OnCmdChannelUpdate != null)
4611  OnCmdChannelUpdate((Channel)msg.DataToObject());
4612  break;
4613  case ClientEvent.CLIENTEVENT_CMD_CHANNEL_REMOVE:
4614  if (OnCmdChannelRemove != null)
4615  OnCmdChannelRemove((Channel)msg.DataToObject());
4616  break;
4617  case ClientEvent.CLIENTEVENT_CMD_SERVER_UPDATE:
4618  if (OnCmdServerUpdate != null)
4619  OnCmdServerUpdate((ServerProperties)msg.DataToObject());
4620  break;
4621  case ClientEvent.CLIENTEVENT_CMD_SERVERSTATISTICS :
4622  if (OnCmdServerStatistics != null)
4623  OnCmdServerStatistics((ServerStatistics)msg.DataToObject());
4624  break;
4625  case ClientEvent.CLIENTEVENT_CMD_FILE_NEW:
4626  if (OnCmdFileNew != null)
4627  OnCmdFileNew((RemoteFile)msg.DataToObject());
4628  break;
4629  case ClientEvent.CLIENTEVENT_CMD_FILE_REMOVE:
4630  if (OnCmdFileRemove != null)
4631  OnCmdFileRemove((RemoteFile)msg.DataToObject());
4632  break;
4633  case ClientEvent.CLIENTEVENT_CMD_USERACCOUNT :
4634  if (OnCmdUserAccount != null)
4635  OnCmdUserAccount((UserAccount)msg.DataToObject());
4636  break;
4637  case ClientEvent.CLIENTEVENT_CMD_BANNEDUSER :
4638  if (OnCmdBannedUser != null)
4639  OnCmdBannedUser((BannedUser)msg.DataToObject());
4640  break;
4641 
4642  case ClientEvent.CLIENTEVENT_USER_STATECHANGE :
4643  if (OnUserStateChange != null)
4644  OnUserStateChange((User)msg.DataToObject());
4645  break;
4646  case ClientEvent.CLIENTEVENT_USER_VIDEOCAPTURE:
4647  if (OnUserVideoCapture != null)
4648  OnUserVideoCapture(msg.nSource, (int)msg.DataToObject());
4649  break;
4650  case ClientEvent.CLIENTEVENT_USER_MEDIAFILE_VIDEO:
4651  if (OnUserMediaFileVideo != null)
4652  OnUserMediaFileVideo((int)msg.nSource, (int)msg.DataToObject());
4653  break;
4654  case ClientEvent.CLIENTEVENT_USER_DESKTOPWINDOW:
4655  if (OnUserDesktopWindow != null)
4656  OnUserDesktopWindow((int)msg.nSource, (int)msg.DataToObject());
4657  break;
4658  case ClientEvent.CLIENTEVENT_USER_DESKTOPCURSOR:
4659  if (OnUserDesktopCursor != null)
4660  OnUserDesktopCursor((int)msg.nSource, (DesktopInput)msg.DataToObject());
4661  break;
4662  case ClientEvent.CLIENTEVENT_USER_DESKTOPINPUT :
4663  if (OnUserDesktopInput != null)
4664  OnUserDesktopInput((int)msg.nSource, (DesktopInput)msg.DataToObject());
4665  break;
4666  case ClientEvent.CLIENTEVENT_USER_RECORD_MEDIAFILE :
4667  if(OnUserRecordMediaFile != null)
4668  OnUserRecordMediaFile((int)msg.nSource, (MediaFileInfo)msg.DataToObject());
4669  break;
4670  case ClientEvent.CLIENTEVENT_USER_AUDIOBLOCK :
4671  if(OnUserAudioBlock != null)
4672  OnUserAudioBlock((int)msg.nSource, (StreamType)msg.DataToObject());
4673  break;
4674  case ClientEvent.CLIENTEVENT_INTERNAL_ERROR :
4675  if(OnInternalError!= null)
4676  OnInternalError((ClientErrorMsg)msg.DataToObject());
4677  break;
4678  case ClientEvent.CLIENTEVENT_VOICE_ACTIVATION :
4679  if(OnVoiceActivation != null)
4680  OnVoiceActivation((bool)msg.DataToObject());
4681  break;
4682  case ClientEvent.CLIENTEVENT_HOTKEY :
4683  if(OnHotKeyToggle != null)
4684  OnHotKeyToggle(msg.nSource, (bool)msg.DataToObject());
4685  break;
4686  case ClientEvent.CLIENTEVENT_HOTKEY_TEST :
4687  if(OnHotKeyTest != null)
4688  OnHotKeyTest(msg.nSource, (bool)msg.DataToObject());
4689  break;
4690  case ClientEvent.CLIENTEVENT_FILETRANSFER :
4691  if(OnFileTransfer != null)
4692  OnFileTransfer((FileTransfer)msg.DataToObject());
4693  break;
4694  case ClientEvent.CLIENTEVENT_DESKTOPWINDOW_TRANSFER :
4695  if(OnDesktopWindowTransfer != null)
4696  OnDesktopWindowTransfer(msg.nSource, (int)msg.DataToObject());
4697  break;
4698  case ClientEvent.CLIENTEVENT_STREAM_MEDIAFILE :
4699  if(OnStreamMediaFile != null)
4700  OnStreamMediaFile((MediaFileInfo)msg.DataToObject());
4701  break;
4702  case ClientEvent.CLIENTEVENT_LOCAL_MEDIAFILE:
4703  if (OnLocalMediaFile != null)
4704  OnLocalMediaFile((MediaFileInfo)msg.DataToObject());
4705  break;
4706  case ClientEvent.CLIENTEVENT_AUDIOINPUT:
4707  if (OnAudioInput != null)
4708  OnAudioInput((AudioInputProgress)msg.DataToObject());
4709  break;
4710  case ClientEvent.CLIENTEVENT_USER_FIRSTVOICESTREAMPACKET:
4711  if (OnUserFirstVoiceStreamPacket != null)
4712  OnUserFirstVoiceStreamPacket((User)msg.DataToObject(), msg.nSource);
4713  break;
4714  }
4715  }
4716 
4729  public static bool GetDefaultSoundDevices(ref int lpnInputDeviceID,
4730  ref int lpnOutputDeviceID)
4731  {
4732  return TTDLL.TT_GetDefaultSoundDevices(ref lpnInputDeviceID, ref lpnOutputDeviceID);
4733  }
4738  public static bool GetDefaultSoundDevicesEx(SoundSystem nSndSystem,
4739  ref int lpnInputDeviceID,
4740  ref int lpnOutputDeviceID)
4741  {
4742  return TTDLL.TT_GetDefaultSoundDevicesEx(nSndSystem, ref lpnInputDeviceID, ref lpnOutputDeviceID);
4743  }
4752  public static bool GetSoundDevices(out SoundDevice[] lpSoundDevices)
4753  {
4754  int count = 0;
4755  bool b = TTDLL.TT_GetSoundDevices_NULL(IntPtr.Zero, ref count);
4756  SoundDevice[] devs = new SoundDevice[count];
4757  b = TTDLL.TT_GetSoundDevices(devs, ref count);
4758  lpSoundDevices = b ? devs : null;
4759  return b;
4760  }
4776  public static bool RestartSoundSystem()
4777  {
4778  return TTDLL.TT_RestartSoundSystem();
4779  }
4784  public static IntPtr StartSoundLoopbackTest(int nInputDeviceID, int nOutputDeviceID,
4785  int nSampleRate, int nChannels,
4786  bool bDuplexMode, SpeexDSP lpSpeexDSP)
4787  {
4788  return TTDLL.TT_StartSoundLoopbackTest(nInputDeviceID, nOutputDeviceID,
4789  nSampleRate, nChannels, bDuplexMode,
4790  ref lpSpeexDSP);
4791  }
4823  public static IntPtr StartSoundLoopbackTest(int nInputDeviceID, int nOutputDeviceID,
4824  int nSampleRate, int nChannels,
4825  bool bDuplexMode, AudioPreprocessor lpAudioPreprocessor,
4826  BearWare.SoundDeviceEffects lpSoundDeviceEffects)
4827  {
4828  return TTDLL.TT_StartSoundLoopbackTestEx(nInputDeviceID, nOutputDeviceID,
4829  nSampleRate, nChannels, bDuplexMode,
4830  ref lpAudioPreprocessor, ref lpSoundDeviceEffects);
4831  }
4838  public static bool CloseSoundLoopbackTest(IntPtr lpTTSoundLoop)
4839  {
4840  return TTDLL.TT_CloseSoundLoopbackTest(lpTTSoundLoop);
4841  }
4870  public bool InitSoundInputDevice(int nInputDeviceID)
4871  {
4872  return TTDLL.TT_InitSoundInputDevice(m_ttInst, nInputDeviceID);
4873  }
4874 
4905  public bool InitSoundInputSharedDevice(int nSampleRate,int nChannels, int nFrameSize)
4906  {
4907  return TTDLL.TT_InitSoundInputSharedDevice(nSampleRate, nChannels, nFrameSize);
4908  }
4909 
4938  public bool InitSoundOutputDevice(int nOutputDeviceID)
4939  {
4940  return TTDLL.TT_InitSoundOutputDevice(m_ttInst, nOutputDeviceID);
4941  }
4972  public bool InitSoundOutputSharedDevice(int nSampleRate, int nChannels,int nFrameSize)
4973  {
4974  return TTDLL.TT_InitSoundOutputSharedDevice(nSampleRate, nChannels, nFrameSize);
4975  }
5009  public bool InitSoundDuplexDevices(int nInputDeviceID, int nOutputDeviceID)
5010  {
5011  return TTDLL.TT_InitSoundDuplexDevices(m_ttInst, nInputDeviceID, nOutputDeviceID);
5012  }
5033  {
5034  return TTDLL.TT_CloseSoundInputDevice(m_ttInst);
5035  }
5055  {
5056  return TTDLL.TT_CloseSoundOutputDevice(m_ttInst);
5057  }
5065  {
5066  return TTDLL.TT_CloseSoundDuplexDevices(m_ttInst);
5067  }
5103  public bool SetSoundDeviceEffects(SoundDeviceEffects lpSoundDeviceEffect)
5104  {
5105  return TTDLL.TT_SetSoundDeviceEffects(m_ttInst, ref lpSoundDeviceEffect);
5106  }
5111  public bool GetSoundDeviceEffects(ref SoundDeviceEffects lpSoundDeviceEffect)
5112  {
5113  return TTDLL.TT_GetSoundDeviceEffects(m_ttInst, ref lpSoundDeviceEffect);
5114  }
5131  public int GetSoundInputLevel()
5132  {
5133  return TTDLL.TT_GetSoundInputLevel(m_ttInst);
5134  }
5150  public bool SetSoundInputGainLevel(int nLevel)
5151  {
5152  return TTDLL.TT_SetSoundInputGainLevel(m_ttInst, nLevel);
5153  }
5161  {
5162  return TTDLL.TT_GetSoundInputGainLevel(m_ttInst);
5163  }
5164 
5180  public bool SetSoundInputPreprocess(SpeexDSP lpSpeexDSP)
5181  {
5182  return TTDLL.TT_SetSoundInputPreprocess(m_ttInst, ref lpSpeexDSP);
5183  }
5184 
5193  public bool GetSoundInputPreprocess(ref SpeexDSP lpSpeexDSP)
5194  {
5195  return TTDLL.TT_GetSoundInputPreprocess(m_ttInst, ref lpSpeexDSP);
5196  }
5208  public bool SetSoundInputPreprocess(AudioPreprocessor lpAudioPreprocessor)
5209  {
5210  return TTDLL.TT_SetSoundInputPreprocessEx(m_ttInst, ref lpAudioPreprocessor);
5211  }
5212 
5220  public bool GetSoundInputPreprocess(ref AudioPreprocessor lpAudioPreprocessor)
5221  {
5222  return TTDLL.TT_GetSoundInputPreprocessEx(m_ttInst, ref lpAudioPreprocessor);
5223  }
5231  public bool SetSoundOutputVolume(int nVolume)
5232  {
5233  return TTDLL.TT_SetSoundOutputVolume(m_ttInst, nVolume);
5234  }
5242  {
5243  return TTDLL.TT_GetSoundOutputVolume(m_ttInst);
5244  }
5252  public bool SetSoundOutputMute(bool bMuteAll)
5253  {
5254  return TTDLL.TT_SetSoundOutputMute(m_ttInst, bMuteAll);
5255  }
5266  public bool Enable3DSoundPositioning(bool bEnable)
5267  {
5268  return TTDLL.TT_Enable3DSoundPositioning(m_ttInst, bEnable);
5269  }
5279  public bool AutoPositionUsers()
5280  {
5281  return TTDLL.TT_AutoPositionUsers(m_ttInst);
5282  }
5283 
5347  public bool EnableAudioBlockEvent(int nUserID, StreamType uStreamTypes,
5348  bool bEnable)
5349  {
5350  return TTDLL.TT_EnableAudioBlockEvent(m_ttInst, nUserID, uStreamTypes, bEnable);
5351  }
5380  public bool EnableAudioBlockEvent(int nUserID, StreamType uStreamTypes,
5381  AudioFormat lpAudioFormat, bool bEnable)
5382  {
5383  return TTDLL.TT_EnableAudioBlockEventEx(m_ttInst, nUserID, uStreamTypes, ref lpAudioFormat, bEnable);
5384  }
5419  public bool InsertAudioBlock(AudioBlock lpAudioBlock)
5420  {
5421  return TTDLL.TT_InsertAudioBlock(m_ttInst, ref lpAudioBlock);
5422  }
5423 
5441  public bool EnableVoiceTransmission(bool bEnable)
5442  {
5443  return TTDLL.TT_EnableVoiceTransmission(m_ttInst, bEnable);
5444  }
5445 
5471  public bool EnableVoiceActivation(bool bEnable)
5472  {
5473  return TTDLL.TT_EnableVoiceActivation(m_ttInst, bEnable);
5474  }
5489  public bool SetVoiceActivationLevel(int nLevel)
5490  {
5491  return TTDLL.TT_SetVoiceActivationLevel(m_ttInst, nLevel);
5492  }
5500  {
5501  return TTDLL.TT_GetVoiceActivationLevel(m_ttInst);
5502  }
5515  public bool SetVoiceActivationStopDelay(int nDelayMSec)
5516  {
5517  return TTDLL.TT_SetVoiceActivationStopDelay(m_ttInst, nDelayMSec);
5518  }
5519 
5530  {
5531  return TTDLL.TT_GetVoiceActivationStopDelay(m_ttInst);
5532  }
5533 
5576  public bool StartRecordingMuxedAudioFile(AudioCodec lpAudioCodec,
5577  string szAudioFileName,
5578  AudioFileFormat uAFF)
5579  {
5580  return TTDLL.TT_StartRecordingMuxedAudioFile(m_ttInst,
5581  ref lpAudioCodec,
5582  szAudioFileName,
5583  uAFF);
5584  }
5585 
5605  public bool StartRecordingMuxedAudioFile(int nChannelID,
5606  string szAudioFileName,
5607  AudioFileFormat uAFF)
5608  {
5609  return TTDLL.TT_StartRecordingMuxedAudioFileEx(m_ttInst,
5610  nChannelID,
5611  szAudioFileName,
5612  uAFF);
5613  }
5614 
5615 
5647  public bool StartRecordingMuxedStreams(StreamType uStreamTypes,
5648  AudioCodec lpAudioCodec,
5649  string szAudioFileName,
5650  AudioFileFormat uAFF)
5651  {
5652  return TTDLL.TT_StartRecordingMuxedStreams(m_ttInst, uStreamTypes, ref lpAudioCodec, szAudioFileName, uAFF);
5653  }
5654 
5667  {
5668  return TTDLL.TT_StopRecordingMuxedAudioFile(m_ttInst);
5669  }
5670 
5677  public bool StopRecordingMuxedAudioFile(int nChannelID)
5678  {
5679  return TTDLL.TT_StopRecordingMuxedAudioFileEx(m_ttInst, nChannelID);
5680  }
5681 
5704  public bool StartVideoCaptureTransmission(VideoCodec lpVideoCodec)
5705  {
5706  return TTDLL.TT_StartVideoCaptureTransmission(m_ttInst, ref lpVideoCodec);
5707  }
5708 
5714  {
5715  return TTDLL.TT_StopVideoCaptureTransmission(m_ttInst);
5716  }
5717 
5729  public static bool GetVideoCaptureDevices(out VideoCaptureDevice[] lpVideoDevices)
5730  {
5731  //To speed up query we only query for a max of 25.
5732  //Hopefully no one has more than 25 capture devices.
5733  VideoCaptureDevice[] devs = new VideoCaptureDevice[25];
5734  int count = devs.Length;
5735  bool b = TTDLL.TT_GetVideoCaptureDevices(devs, ref count);
5736  if (b)
5737  {
5738  lpVideoDevices = new VideoCaptureDevice[count];
5739  for (int i = 0; i < count; i++)
5740  lpVideoDevices[i] = devs[i];
5741  }
5742  else lpVideoDevices = null;
5743 
5744  return b;
5745  }
5758  VideoFormat lpVideoFormat)
5759  {
5760  return TTDLL.TT_InitVideoCaptureDevice(m_ttInst, szDeviceID, ref lpVideoFormat);
5761  }
5767  {
5768  return TTDLL.TT_CloseVideoCaptureDevice(m_ttInst);
5769  }
5784  public bool PaintVideoFrame(int nUserID,
5785  System.IntPtr hDC,
5786  int XDest,
5787  int YDest,
5788  int nDestWidth,
5789  int nDestHeight,
5790  ref VideoFrame lpVideoFrame)
5791  {
5792  return TTDLL.TT_PaintVideoFrame(nUserID, hDC, XDest, YDest, nDestWidth,
5793  nDestHeight, ref lpVideoFrame);
5794  }
5795 
5827  public bool PaintVideoFrameEx(int nUserID,
5828  System.IntPtr hDC,
5829  int XDest,
5830  int YDest,
5831  int nDestWidth,
5832  int nDestHeight,
5833  int XSrc,
5834  int YSrc,
5835  int nSrcWidth,
5836  int nSrcHeight,
5837  ref VideoFrame lpVideoFrame)
5838  {
5839  return TTDLL.TT_PaintVideoFrameEx(nUserID, hDC, XDest, YDest, nDestWidth, nDestHeight,
5840  XSrc, YSrc, nSrcWidth, nSrcHeight,
5841  ref lpVideoFrame);
5842  }
5843 
5862  public VideoFrame AcquireUserVideoCaptureFrame(int nUserID, out Bitmap bmp)
5863  {
5864  bmp = null;
5865  IntPtr ptr = TTDLL.TT_AcquireUserVideoCaptureFrame(m_ttInst, nUserID);
5866  if(ptr == IntPtr.Zero)
5867  return new VideoFrame();
5868 
5869  VideoFrame frm = (VideoFrame)Marshal.PtrToStructure(ptr, typeof(VideoFrame));
5870  vidcapframes.Add(frm.frameBuffer, ptr);
5871 
5872  PixelFormat pixelformat = PixelFormat.Format32bppRgb;
5873  bmp = new Bitmap(frm.nWidth, frm.nHeight, frm.nWidth*4, pixelformat, frm.frameBuffer);
5874  return frm;
5875  }
5876 
5877  Dictionary<IntPtr, IntPtr> vidcapframes = new Dictionary<IntPtr, IntPtr>();
5878 
5886  public bool ReleaseUserVideoCaptureFrame(VideoFrame lpVideoFrame)
5887  {
5888  IntPtr ptr;
5889  if (vidcapframes.TryGetValue(lpVideoFrame.frameBuffer, out ptr))
5890  {
5891  vidcapframes.Remove(lpVideoFrame.frameBuffer);
5892  return TTDLL.TT_ReleaseUserVideoCaptureFrame(m_ttInst, ptr);
5893  }
5894  return false;
5895  }
5896 
5909  /*
5910  public bool GetUserVideoFrame(int nUserID,
5911  ref System.Drawing.Bitmap lpPicture)
5912  {
5913  CaptureFormat cap;
5914  if (!TTDLL.TT_GetUserVideoFrame(m_ttInst, nUserID, IntPtr.Zero, 0, out cap))
5915  return false;
5916 
5917  PixelFormat pixelformat = PixelFormat.Format32bppRgb;
5918 
5919  if (lpPicture == null ||
5920  lpPicture.Width != cap.nWidth ||
5921  lpPicture.Height != cap.nHeight
5922 #if PocketPC
5923  )
5924 #else
5925  || lpPicture.PixelFormat != pixelformat)
5926 #endif
5927  {
5928  lpPicture = new Bitmap(cap.nWidth, cap.nHeight,
5929  pixelformat);
5930  }
5931 
5932  // Lock the bitmap's bits.
5933  System.Drawing.Rectangle rect = new System.Drawing.Rectangle(0, 0, lpPicture.Width, lpPicture.Height);
5934  BitmapData bmpData = lpPicture.LockBits(rect, ImageLockMode.ReadWrite, pixelformat);
5935 
5936  // Get the address of the first line.
5937  IntPtr ptr = bmpData.Scan0;
5938 
5939  bool b = TTDLL.TT_GetUserVideoFrame(m_ttInst, nUserID, ptr,
5940  cap.nWidth * cap.nHeight * 4, out cap);
5941  // Unlock the bits.
5942  lpPicture.UnlockBits(bmpData);
5943  return b;
5944  }
5945  * */
5946 
5954  public bool StartStreamingMediaFileToChannel(string szMediaFilePath,
5955  VideoCodec lpVideoCodec)
5956  {
5957  return TTDLL.TT_StartStreamingMediaFileToChannel(m_ttInst, szMediaFilePath,
5958  ref lpVideoCodec);
5959  }
5960 
5990  public bool StartStreamingMediaFileToChannel(string szMediaFilePath,
5991  MediaFilePlayback lpMediaFilePlayback,
5992  VideoCodec lpVideoCodec)
5993  {
5994  return TTDLL.TT_StartStreamingMediaFileToChannelEx(m_ttInst, szMediaFilePath,
5995  ref lpMediaFilePlayback,
5996  ref lpVideoCodec);
5997  }
5998 
6015  public bool UpdateStreamingMediaFileToChannel(MediaFilePlayback lpMediaFilePlayback,
6016  VideoCodec lpVideoCodec)
6017  {
6018  return TTDLL.TT_UpdateStreamingMediaFileToChannel(m_ttInst, ref lpMediaFilePlayback, ref lpVideoCodec);
6019  }
6020 
6029  {
6030  return TTDLL.TT_StopStreamingMediaFileToChannel(m_ttInst);
6031  }
6032 
6057  public int InitLocalPlayback(string szMediaFilePath, MediaFilePlayback lpMediaFilePlayback)
6058  {
6059  return TTDLL.TT_InitLocalPlayback(m_ttInst, szMediaFilePath, ref lpMediaFilePlayback);
6060  }
6061 
6073  public bool UpdateLocalPlayback(int nPlaybackSessionID,
6074  MediaFilePlayback lpMediaFilePlayback)
6075  {
6076  return TTDLL.TT_UpdateLocalPlayback(m_ttInst, nPlaybackSessionID, ref lpMediaFilePlayback);
6077  }
6078 
6087  public bool StopLocalPlayback(int nPlaybackSessionID)
6088  {
6089  return TTDLL.TT_StopLocalPlayback(m_ttInst, nPlaybackSessionID);
6090  }
6091 
6099  public static bool GetMediaFileInfo(string szMediaFilePath,
6100  ref MediaFileInfo lpMediaFileInfo)
6101  {
6102  return TTDLL.TT_GetMediaFileInfo(szMediaFilePath, ref lpMediaFileInfo);
6103  }
6104 
6124  public VideoFrame AcquireUserMediaVideoFrame(int nUserID, out Bitmap bmp)
6125  {
6126  bmp = null;
6127  IntPtr ptr = TTDLL.TT_AcquireUserMediaVideoFrame(m_ttInst, nUserID);
6128  if (ptr == IntPtr.Zero)
6129  return new VideoFrame();
6130 
6131  VideoFrame frm = (VideoFrame)Marshal.PtrToStructure(ptr, typeof(VideoFrame));
6132  mediaframes.Add(frm.frameBuffer, ptr);
6133 
6134  PixelFormat pixelformat = PixelFormat.Format32bppRgb;
6135  bmp = new Bitmap(frm.nWidth, frm.nHeight, frm.nWidth * 4, pixelformat, frm.frameBuffer);
6136  return frm;
6137  }
6138 
6146  public bool ReleaseUserMediaVideoFrame(VideoFrame lpVideoFrame)
6147  {
6148  IntPtr ptr;
6149  if (mediaframes.TryGetValue(lpVideoFrame.frameBuffer, out ptr))
6150  {
6151  mediaframes.Remove(lpVideoFrame.frameBuffer);
6152  return TTDLL.TT_ReleaseUserMediaVideoFrame(m_ttInst, ptr);
6153  }
6154  return false;
6155  }
6156 
6157  Dictionary<IntPtr, IntPtr> mediaframes = new Dictionary<IntPtr, IntPtr>();
6158 
6201  public int SendDesktopWindow(DesktopWindow lpDesktopWindow,
6202  BitmapFormat nConvertBmpFormat)
6203  {
6204  return TTDLL.TT_SendDesktopWindow(m_ttInst, ref lpDesktopWindow, nConvertBmpFormat);
6205  }
6206 
6214  public bool CloseDesktopWindow()
6215  {
6216  return TTDLL.TT_CloseDesktopWindow(m_ttInst);
6217  }
6218 
6235  public static System.Drawing.Color Palette_GetColorTable(BitmapFormat nBmpPalette,
6236  int nIndex)
6237  {
6238  IntPtr ptr = TTDLL.TT_Palette_GetColorTable(nBmpPalette, nIndex);
6239  switch(nBmpPalette)
6240  {
6241  case BitmapFormat.BMP_RGB8_PALETTE:
6242  return Color.FromArgb(Marshal.ReadInt32(ptr));
6243  }
6244  return new Color();
6245  }
6246 
6257  public int SendDesktopWindowFromHWND(System.IntPtr hWnd,
6258  BitmapFormat nBitmapFormat,
6259  DesktopProtocol nDesktopProtocol)
6260  {
6261  return TTDLL.TT_SendDesktopWindowFromHWND(m_ttInst, hWnd, nBitmapFormat, nDesktopProtocol);
6262  }
6263 
6278  public bool PaintDesktopWindow(int nUserID,
6279  System.IntPtr hDC,
6280  int XDest,
6281  int YDest,
6282  int nDestWidth,
6283  int nDestHeight)
6284  {
6285  return TTDLL.TT_PaintDesktopWindow(m_ttInst, nUserID, hDC, XDest, YDest, nDestWidth, nDestHeight);
6286  }
6287 
6320  public bool PaintDesktopWindowEx(int nUserID,
6321  System.IntPtr hDC,
6322  int XDest,
6323  int YDest,
6324  int nDestWidth,
6325  int nDestHeight,
6326  int XSrc,
6327  int YSrc,
6328  int nSrcWidth,
6329  int nSrcHeight)
6330  {
6331  return TTDLL.TT_PaintDesktopWindowEx(m_ttInst, nUserID, hDC, XDest,
6332  YDest, nDestWidth, nDestHeight,
6333  XSrc, YSrc, nSrcWidth, nSrcHeight);
6334  }
6335 
6348  public bool SendDesktopCursorPosition(ushort nPosX,
6349  ushort nPosY)
6350  {
6351  return TTDLL.TT_SendDesktopCursorPosition(m_ttInst, nPosX, nPosY);
6352  }
6353 
6377  public bool SendDesktopInput(int nUserID,
6378  DesktopInput[] lpDesktopInputs)
6379  {
6380  return TTDLL.TT_SendDesktopInput(m_ttInst, nUserID, lpDesktopInputs, lpDesktopInputs.Length);
6381  }
6382 
6407  {
6408  IntPtr ptr = TTDLL.TT_AcquireUserDesktopWindow(m_ttInst, nUserID);
6409  if (ptr == IntPtr.Zero)
6410  return new DesktopWindow();
6411  DesktopWindow lpDesktopWindow = (DesktopWindow)Marshal.PtrToStructure(ptr, typeof(DesktopWindow));
6412  desktopwindows.Add(lpDesktopWindow.frameBuffer, ptr);
6413  return lpDesktopWindow;
6414  }
6415 
6422  public DesktopWindow AcquireUserDesktopWindowEx(int nUserID, BitmapFormat nBitmapFormat)
6423  {
6424  IntPtr ptr = TTDLL.TT_AcquireUserDesktopWindowEx(m_ttInst, nUserID, nBitmapFormat);
6425  if (ptr == IntPtr.Zero)
6426  return new DesktopWindow();
6427  DesktopWindow lpDesktopWindow = (DesktopWindow)Marshal.PtrToStructure(ptr, typeof(DesktopWindow));
6428  desktopwindows.Add(lpDesktopWindow.frameBuffer, ptr);
6429  return lpDesktopWindow;
6430  }
6431 
6432  Dictionary<IntPtr, IntPtr> desktopwindows = new Dictionary<IntPtr, IntPtr>();
6435  public bool ReleaseUserDesktopWindow(DesktopWindow lpDesktopWindow)
6436  {
6437  IntPtr ptr;
6438  if (desktopwindows.TryGetValue(lpDesktopWindow.frameBuffer, out ptr))
6439  {
6440  desktopwindows.Remove(lpDesktopWindow.frameBuffer);
6441  return TTDLL.TT_ReleaseUserDesktopWindow(m_ttInst, ptr);
6442  }
6443  return false;
6444  }
6445 
6462  public bool SetEncryptionContext(EncryptionContext lpEncryptionContext)
6463  {
6464  return TTDLL.TT_SetEncryptionContext(m_ttInst, ref lpEncryptionContext);
6465  }
6466 
6495  public bool Connect(string szHostAddress,
6496  int nTcpPort,
6497  int nUdpPort,
6498  int nLocalTcpPort,
6499  int nLocalUdpPort,
6500  bool bEncrypted)
6501  {
6502  return TTDLL.TT_Connect(m_ttInst, szHostAddress, nTcpPort, nUdpPort,
6503  nLocalTcpPort, nLocalUdpPort, bEncrypted);
6504  }
6505 
6529  public bool ConnectSysID(string szHostAddress,
6530  int nTcpPort,
6531  int nUdpPort,
6532  int nLocalTcpPort,
6533  int nLocalUdpPort,
6534  bool bEncrypted,
6535  string szSystemID)
6536  {
6537  return TTDLL.TT_ConnectSysID(m_ttInst, szHostAddress,
6538  nTcpPort, nUdpPort, nLocalTcpPort,
6539  nLocalUdpPort, bEncrypted, szSystemID);
6540  }
6541 
6562  public bool ConnectEx(string szHostAddress,
6563  int nTcpPort,
6564  int nUdpPort,
6565  string szBindIPAddr,
6566  int nLocalTcpPort,
6567  int nLocalUdpPort,
6568  bool bEncrypted)
6569  {
6570  return TTDLL.TT_ConnectEx(m_ttInst, szHostAddress, nTcpPort, nUdpPort,
6571  szBindIPAddr, nLocalTcpPort, nLocalUdpPort,
6572  bEncrypted);
6573  }
6574 
6579  public bool Disconnect()
6580  {
6581  return TTDLL.TT_Disconnect(m_ttInst);
6582  }
6592  public bool QueryMaxPayload(int nUserID)
6593  {
6594  return TTDLL.TT_QueryMaxPayload(m_ttInst, nUserID);
6595  }
6601  public bool GetClientStatistics(ref ClientStatistics lpClientStatistics)
6602  {
6603  return TTDLL.TT_GetClientStatistics(m_ttInst, ref lpClientStatistics);
6604  }
6605 
6620  public bool SetClientKeepAlive(ClientKeepAlive lpClientKeepAlive)
6621  {
6622  return TTDLL.TT_SetClientKeepAlive(m_ttInst, ref lpClientKeepAlive);
6623  }
6624 
6631  public bool GetClientKeepAlive(ref ClientKeepAlive lpClientKeepAlive)
6632  {
6633  return TTDLL.TT_GetClientKeepAlive(m_ttInst, ref lpClientKeepAlive);
6634  }
6657  public int DoPing()
6658  {
6659  return TTDLL.TT_DoPing(m_ttInst);
6660  }
6661 
6673  public int DoLogin(string szNickname, string szUsername, string szPassword)
6674  {
6675  return TTDLL.TT_DoLogin(m_ttInst, szNickname, szUsername, szPassword);
6676  }
6677 
6707  public int DoLoginEx(string szNickname, string szUsername, string szPassword,
6708  string szClientName)
6709  {
6710  return TTDLL.TT_DoLoginEx(m_ttInst, szNickname, szUsername, szPassword, szClientName);
6711  }
6725  public int DoLogout()
6726  {
6727  return TTDLL.TT_DoLogout(m_ttInst);
6728  }
6768  public int DoJoinChannel(Channel lpChannel)
6769  {
6770  return TTDLL.TT_DoJoinChannel(m_ttInst, ref lpChannel);
6771  }
6795  public int DoJoinChannelByID(int nChannelID, string szPassword)
6796  {
6797  return TTDLL.TT_DoJoinChannelByID(m_ttInst, nChannelID, szPassword);
6798  }
6818  public int DoLeaveChannel()
6819  {
6820  return TTDLL.TT_DoLeaveChannel(m_ttInst);
6821  }
6839  public int DoChangeNickname(string szNewNick)
6840  {
6841  return TTDLL.TT_DoChangeNickname(m_ttInst, szNewNick);
6842  }
6862  public int DoChangeStatus(int nStatusMode, string szStatusMessage)
6863  {
6864  return TTDLL.TT_DoChangeStatus(m_ttInst, nStatusMode, szStatusMessage);
6865  }
6884  public int DoTextMessage(TextMessage lpTextMessage)
6885  {
6886  return TTDLL.TT_DoTextMessage(m_ttInst, ref lpTextMessage);
6887  }
6908  public int DoChannelOp(int nUserID, int nChannelID, bool bMakeOperator)
6909  {
6910  return TTDLL.TT_DoChannelOp(m_ttInst, nUserID, nChannelID, bMakeOperator);
6911  }
6931  public int DoChannelOpEx(int nUserID,
6932  int nChannelID,
6933  string szOpPassword,
6934  bool bMakeOperator)
6935  {
6936  return TTDLL.TT_DoChannelOpEx(m_ttInst, nUserID, nChannelID, szOpPassword, bMakeOperator);
6937  }
6960  public int DoKickUser(int nUserID, int nChannelID)
6961  {
6962  return TTDLL.TT_DoKickUser(m_ttInst, nUserID, nChannelID);
6963  }
6998  public int DoSendFile(int nChannelID, string szLocalFilePath)
6999  {
7000  return TTDLL.TT_DoSendFile(m_ttInst, nChannelID, szLocalFilePath);
7001  }
7031  public int DoRecvFile(int nChannelID, int nFileID, string szLocalFilePath)
7032  {
7033  return TTDLL.TT_DoRecvFile(m_ttInst, nChannelID, nFileID, szLocalFilePath);
7034  }
7057  public int DoDeleteFile(int nChannelID, int nFileID)
7058  {
7059  return TTDLL.TT_DoDeleteFile(m_ttInst, nChannelID, nFileID);
7060  }
7075  public int DoSubscribe(int nUserID, Subscription uSubscriptions)
7076  {
7077  return TTDLL.TT_DoSubscribe(m_ttInst, nUserID, uSubscriptions);
7078  }
7094  public int DoUnsubscribe(int nUserID, Subscription uSubscriptions)
7095  {
7096  return TTDLL.TT_DoUnsubscribe(m_ttInst, nUserID, uSubscriptions);
7097  }
7123  public int DoMakeChannel(Channel lpChannel)
7124  {
7125  return TTDLL.TT_DoMakeChannel(m_ttInst, ref lpChannel);
7126  }
7159  public int DoUpdateChannel(Channel lpChannel)
7160  {
7161  return TTDLL.TT_DoUpdateChannel(m_ttInst, ref lpChannel);
7162  }
7181  public int DoRemoveChannel(int nChannelID)
7182  {
7183  return TTDLL.TT_DoRemoveChannel(m_ttInst, nChannelID);
7184  }
7204  public int DoMoveUser(int nUserID, int nChannelID)
7205  {
7206  return TTDLL.TT_DoMoveUser(m_ttInst, nUserID, nChannelID);
7207  }
7224  public int DoUpdateServer(ServerProperties lpServerProperties)
7225  {
7226  return TTDLL.TT_DoUpdateServer(m_ttInst, ref lpServerProperties);
7227  }
7252  public int DoListUserAccounts(int nIndex, int nCount)
7253  {
7254  return TTDLL.TT_DoListUserAccounts(m_ttInst, nIndex, nCount);
7255  }
7278  public int DoNewUserAccount(UserAccount lpUserAccount)
7279  {
7280  return TTDLL.TT_DoNewUserAccount(m_ttInst, ref lpUserAccount);
7281  }
7300  public int DoDeleteUserAccount(string szUsername)
7301  {
7302  return TTDLL.TT_DoDeleteUserAccount(m_ttInst, szUsername);
7303  }
7331  public int DoBanUser(int nUserID, int nChannelID)
7332  {
7333  return TTDLL.TT_DoBanUser(m_ttInst, nUserID, nChannelID);
7334  }
7335 
7347  public int DoBanUserEx(int nUserID, BanType uBanTypes)
7348  {
7349  return TTDLL.TT_DoBanUserEx(m_ttInst, nUserID, uBanTypes);
7350  }
7351 
7370  public int DoBan(BannedUser lpBannedUser)
7371  {
7372  return TTDLL.TT_DoBan(m_ttInst, ref lpBannedUser);
7373  }
7374 
7395  public int DoBanIPAddress(string szIPAddress, int nChannelID)
7396  {
7397  return TTDLL.TT_DoBanIPAddress(m_ttInst, szIPAddress, nChannelID);
7398  }
7399 
7420  public int DoUnBanUser(string szIPAddress, int nChannelID)
7421  {
7422  return TTDLL.TT_DoUnBanUser(m_ttInst, szIPAddress, nChannelID);
7423  }
7424 
7434  public int DoUnBanUserEx(BannedUser lpBannedUser)
7435  {
7436  return TTDLL.TT_DoUnBanUserEx(m_ttInst, ref lpBannedUser);
7437  }
7438 
7459  public int DoListBans(int nChannelID, int nIndex, int nCount)
7460  {
7461  return TTDLL.TT_DoListBans(m_ttInst, nChannelID, nIndex, nCount);
7462  }
7480  public int DoSaveConfig()
7481  {
7482  return TTDLL.TT_DoSaveConfig(m_ttInst);
7483  }
7500  public int DoQueryServerStats()
7501  {
7502  return TTDLL.TT_DoQueryServerStats(m_ttInst);
7503  }
7516  public int DoQuit()
7517  {
7518  return TTDLL.TT_DoQuit(m_ttInst);
7519  }
7531  public bool GetServerProperties(ref ServerProperties lpServerProperties)
7532  {
7533  return TTDLL.TT_GetServerProperties(m_ttInst, ref lpServerProperties);
7534  }
7545  public bool GetServerUsers(out User[] lpUsers)
7546  {
7547  int count = 0;
7548  bool b = TTDLL.TT_GetServerUsers_NULL(m_ttInst, IntPtr.Zero, ref count);
7549  User[] users = new User[count];
7550  b = TTDLL.TT_GetServerUsers(m_ttInst, users, ref count);
7551  lpUsers = b ? users : null;
7552  return b;
7553  }
7566  public int GetRootChannelID()
7567  {
7568  return TTDLL.TT_GetRootChannelID(m_ttInst);
7569  }
7576  public int GetMyChannelID()
7577  {
7578  return TTDLL.TT_GetMyChannelID(m_ttInst);
7579  }
7583  public int ChannelID { get { return GetMyChannelID(); } }
7591  public bool GetChannel(int nChannelID, ref Channel lpChannel)
7592  {
7593  return TTDLL.TT_GetChannel(m_ttInst, nChannelID, ref lpChannel);
7594  }
7601  public bool GetChannelPath(int nChannelID, ref string szChannelPath)
7602  {
7603  IntPtr ptr = Marshal.AllocHGlobal(TeamTalkBase.TT_STRLEN * 2);
7604  bool b = TTDLL.TT_GetChannelPath(m_ttInst, nChannelID, ptr);
7605  if(b)
7606  szChannelPath = Marshal.PtrToStringUni(ptr);
7607  Marshal.FreeHGlobal(ptr);
7608  return b;
7609  }
7616  public int GetChannelIDFromPath(string szChannelPath)
7617  {
7618  return TTDLL.TT_GetChannelIDFromPath(m_ttInst, szChannelPath);
7619  }
7628  public bool GetChannelUsers(int nChannelID, out User[] lpUsers)
7629  {
7630  int count = 0;
7631  bool b = TTDLL.TT_GetChannelUsers_NULL(m_ttInst, nChannelID, IntPtr.Zero, ref count);
7632  User[] users = new User[count];
7633  b = TTDLL.TT_GetChannelUsers(m_ttInst, nChannelID, users, ref count);
7634  lpUsers = b ? users : null;
7635  return b;
7636  }
7645  public bool GetChannelFiles(int nChannelID, out RemoteFile[] lpRemoteFiles)
7646  {
7647  int count = 0;
7648  bool b = TTDLL.TT_GetChannelFiles_NULL(m_ttInst, nChannelID, IntPtr.Zero, ref count);
7649  RemoteFile[] files = new RemoteFile[count];
7650  b = TTDLL.TT_GetChannelFiles(m_ttInst, nChannelID, files, ref count);
7651  lpRemoteFiles = b ? files : null;
7652  return b;
7653  }
7661  public bool GetChannelFile(int nChannelID, int nFileID, ref RemoteFile lpRemoteFile)
7662  {
7663  return TTDLL.TT_GetChannelFile(m_ttInst, nChannelID, nFileID, ref lpRemoteFile);
7664  }
7671  public bool IsChannelOperator(int nUserID, int nChannelID)
7672  {
7673  return TTDLL.TT_IsChannelOperator(m_ttInst, nUserID, nChannelID);
7674  }
7681  public bool GetServerChannels(out Channel[] lpChannels)
7682  {
7683  int count = 0;
7684  bool b = TTDLL.TT_GetServerChannels_NULL(m_ttInst, IntPtr.Zero, ref count);
7685  Channel[] channels = new Channel[count];
7686  b = TTDLL.TT_GetServerChannels(m_ttInst, channels, ref count);
7687  lpChannels = b ? channels : null;
7688  return b;
7689  }
7703  public int GetMyUserID()
7704  {
7705  return TTDLL.TT_GetMyUserID(m_ttInst);
7706  }
7707 
7718  public bool GetMyUserAccount(ref UserAccount lpUserAccount)
7719  {
7720  return TTDLL.TT_GetMyUserAccount(m_ttInst, ref lpUserAccount);
7721  }
7722 
7726  public int UserID { get { return GetMyUserID(); } }
7727 
7739  {
7740  return TTDLL.TT_GetMyUserType(m_ttInst);
7741  }
7742 
7746  public BearWare.UserType UserType { get { return GetMyUserType(); } }
7747 
7751  public BearWare.UserRight UserRights { get { return GetMyUserRights(); } }
7752 
7754  public BearWare.UserRight GetMyUserRights()
7755  {
7756  return TTDLL.TT_GetMyUserRights(m_ttInst);
7757  }
7758 
7768  public int GetMyUserData()
7769  {
7770  return TTDLL.TT_GetMyUserData(m_ttInst);
7771  }
7772 
7776  public int UserData { get { return GetMyUserData(); } }
7777 
7784  public bool GetUser(int nUserID, ref User lpUser)
7785  {
7786  return TTDLL.TT_GetUser(m_ttInst, nUserID, ref lpUser);
7787  }
7793  public bool GetUserStatistics(int nUserID, ref UserStatistics lpUserStatistics)
7794  {
7795  return TTDLL.TT_GetUserStatistics(m_ttInst, nUserID, ref lpUserStatistics);
7796  }
7805  public bool GetUserByUsername(string szUsername, ref User lpUser)
7806  {
7807  return TTDLL.TT_GetUserByUsername(m_ttInst, szUsername, ref lpUser);
7808  }
7825  public bool SetUserVolume(int nUserID, StreamType nStreamType, int nVolume)
7826  {
7827  return TTDLL.TT_SetUserVolume(m_ttInst, nUserID, nStreamType, nVolume);
7828  }
7840  public bool SetUserMute(int nUserID, StreamType nStreamType, bool bMute)
7841  {
7842  return TTDLL.TT_SetUserMute(m_ttInst, nUserID, nStreamType, bMute);
7843  }
7856  public bool SetUserStoppedPlaybackDelay(int nUserID,
7857  StreamType nStreamType,
7858  int nDelayMSec)
7859  {
7860  return TTDLL.TT_SetUserStoppedPlaybackDelay(m_ttInst, nUserID, nStreamType, nDelayMSec);
7861  }
7862 
7887  public bool SetUserJitterControl(int nUserID,
7888  StreamType nStreamType,
7889  JitterConfig lpJitterConfig)
7890  {
7891  return TTDLL.TT_SetUserJitterControl(m_ttInst, nUserID, nStreamType, ref lpJitterConfig);
7892  }
7893 
7904  public bool GetUserJitterControl(int nUserID,
7905  StreamType nStreamType,
7906  ref JitterConfig lpJitterConfig)
7907  {
7908  return TTDLL.TT_GetUserJitterControl(m_ttInst, nUserID, nStreamType, ref lpJitterConfig);
7909  }
7910 
7926  public bool SetUserPosition(int nUserID, StreamType nStreamType,
7927  float x, float y, float z)
7928  {
7929  return TTDLL.TT_SetUserPosition(m_ttInst, nUserID, nStreamType, x, y, z);
7930  }
7942  public bool SetUserStereo(int nUserID, StreamType nStreamType, bool bLeftSpeaker, bool bRightSpeaker)
7943  {
7944  return TTDLL.TT_SetUserStereo(m_ttInst, nUserID, nStreamType, bLeftSpeaker, bRightSpeaker);
7945  }
7981  public bool SetUserMediaStorageDir(int nUserID, string szFolderPath, string szFileNameVars,
7982  AudioFileFormat uAFF)
7983  {
7984  return TTDLL.TT_SetUserMediaStorageDir(m_ttInst, nUserID, szFolderPath, szFileNameVars, uAFF);
7985  }
7986 
8011  public bool SetUserMediaStorageDir(int nUserID, string szFolderPath, string szFileNameVars,
8012  AudioFileFormat uAFF, int nStopRecordingExtraDelayMSec)
8013  {
8014  return TTDLL.TT_SetUserMediaStorageDirEx(m_ttInst, nUserID, szFolderPath, szFileNameVars, uAFF, nStopRecordingExtraDelayMSec);
8015  }
8016 
8041  public bool SetUserAudioStreamBufferSize(int nUserID, StreamType uStreamType,
8042  int nMSec)
8043  {
8044  return TTDLL.TT_SetUserAudioStreamBufferSize(m_ttInst, nUserID, uStreamType, nMSec);
8045  }
8065  public AudioBlock AcquireUserAudioBlock(StreamType uStreamTypes, int nUserID)
8066  {
8067  IntPtr ptr = TTDLL.TT_AcquireUserAudioBlock(m_ttInst, uStreamTypes, nUserID);
8068  if (ptr == IntPtr.Zero)
8069  return new AudioBlock();
8070  AudioBlock lpAudioBlock = (AudioBlock)Marshal.PtrToStructure(ptr, typeof(AudioBlock));
8071  audioblocks.Add(lpAudioBlock.lpRawAudio, ptr);
8072  return lpAudioBlock;
8073  }
8074 
8075  Dictionary<IntPtr, IntPtr> audioblocks = new Dictionary<IntPtr, IntPtr>();
8076 
8090  public bool ReleaseUserAudioBlock(AudioBlock lpAudioBlock)
8091  {
8092  IntPtr ptr;
8093  if (audioblocks.TryGetValue(lpAudioBlock.lpRawAudio, out ptr))
8094  {
8095  audioblocks.Remove(lpAudioBlock.lpRawAudio);
8096  return TTDLL.TT_ReleaseUserAudioBlock(m_ttInst, ptr);
8097  }
8098  return false;
8099  }
8113  public bool GetFileTransferInfo(int nTransferID, ref FileTransfer lpFileTransfer)
8114  {
8115  return TTDLL.TT_GetFileTransferInfo(m_ttInst, nTransferID, ref lpFileTransfer);
8116  }
8117 
8126  public bool CancelFileTranfer(int nTransferID)
8127  {
8128  return TTDLL.TT_CancelFileTransfer(m_ttInst, nTransferID);
8129  }
8130 
8141  public static string GetErrorMessage(ClientError nError)
8142  {
8143  IntPtr ptr = Marshal.AllocHGlobal(TeamTalkBase.TT_STRLEN * 2);
8144  TTDLL.TT_GetErrorMessage((int)nError, ptr);
8145  string s = Marshal.PtrToStringUni(ptr);
8146  Marshal.FreeHGlobal(ptr);
8147  return s;
8148  }
8149 
8176  public bool HotKey_Register(int nHotKeyID, int[] lpnVKCodes)
8177  {
8178  return TTDLL.TT_HotKey_Register(m_ttInst, nHotKeyID, lpnVKCodes, lpnVKCodes.Length);
8179  }
8185  public bool HotKey_Unregister(int nHotKeyID)
8186  {
8187  return TTDLL.TT_HotKey_Unregister(m_ttInst, nHotKeyID);
8188  }
8194  public int HotKey_IsActive(int nHotKeyID)
8195  {
8196  return TTDLL.TT_HotKey_IsActive(m_ttInst, nHotKeyID);
8197  }
8208  {
8209  if (m_eventhandler != null)
8210  {
8211 #if PocketPC
8212  IntPtr hWnd = m_eventhandler.Hwnd;
8213 #else
8214  IntPtr hWnd = m_eventhandler.Handle;
8215 #endif
8216  return TTDLL.TT_HotKey_InstallTestHook(m_ttInst, hWnd,
8217  MyEventHandler.WM_TEAMTALK_CLIENTEVENT);
8218  }
8219  return false;
8220  }
8227  {
8228  return TTDLL.TT_HotKey_RemoveTestHook(m_ttInst);
8229  }
8236  public bool HotKey_GetKeyString(int nVKCode, ref string szKeyName)
8237  {
8238  IntPtr ptr = Marshal.AllocHGlobal(TeamTalkBase.TT_STRLEN * 2);
8239  bool b = TTDLL.TT_HotKey_GetKeyString(m_ttInst, nVKCode, ptr);
8240  if(b)
8241  szKeyName = Marshal.PtrToStringUni(ptr);
8242  Marshal.FreeHGlobal(ptr);
8243  return b;
8244  }
8247  public bool DBG_SetSoundInputTone(StreamType uStreamTypes, int nFrequency)
8248  {
8249  return TTDLL.TT_DBG_SetSoundInputTone(m_ttInst, uStreamTypes, nFrequency);
8250  }
8251 
8252 
8253  public bool DBG_WriteAudioFileTone(MediaFileInfo lpMediaFileInfo,
8254  int nFrequency)
8255  {
8256  return TTDLL.TT_DBG_WriteAudioFileTone(ref lpMediaFileInfo, nFrequency);
8257  }
8258 
8265  public delegate void Connection();
8274  public event Connection OnConnectionSuccess;
8282  public event Connection OnConnectionFailed;
8290  public event Connection OnConnectionLost;
8291 
8297  public delegate void MaxPayloadUpdate(int nPayloadSize);
8298 
8306  public event MaxPayloadUpdate OnConnectionMaxPayloadUpdated;
8307 
8315  public delegate void CommandProcessing(int nCmdID, bool bActive);
8316 
8327  public event CommandProcessing OnCmdProcessing;
8328 
8333  public delegate void CommandError(int nCmdID, ClientErrorMsg clienterrormsg);
8334 
8343  public event CommandError OnCmdError;
8344 
8348  public delegate void CommandSuccess(int nCmdID);
8349 
8357  public event CommandSuccess OnCmdSuccess;
8358 
8364  public delegate void MyselfLoggedIn(int nMyUserID, UserAccount useraccount);
8365 
8374  public event MyselfLoggedIn OnCmdMyselfLoggedIn;
8375 
8377  public delegate void MyselfLoggedOut();
8385  public event MyselfLoggedOut OnCmdMyselfLoggedOut;
8386 
8392  public delegate void MyselfKicked(User user);
8398  public event MyselfKicked OnCmdMyselfKicked;
8399 
8404  public delegate void UserUpdate(User user);
8405 
8409  public delegate void UserStreamUpdate(User user, int nStreamID);
8410 
8418  public event UserUpdate OnCmdUserLoggedIn;
8419 
8428  public event UserUpdate OnCmdUserLoggedOut;
8429 
8434  public event UserUpdate OnCmdUserUpdate;
8435 
8440  public event UserUpdate OnCmdUserJoinedChannel;
8441 
8446  public event UserUpdate OnCmdUserLeftChannel;
8447 
8453  public delegate void UserTextMessage(TextMessage textmessage);
8454 
8459  public event UserTextMessage OnCmdUserTextMessage;
8460 
8461 
8464  public delegate void ChannelUpdate(Channel channel);
8465 
8472  public event ChannelUpdate OnCmdChannelNew;
8473 
8478  public event ChannelUpdate OnCmdChannelUpdate;
8479 
8483  public event ChannelUpdate OnCmdChannelRemove;
8484 
8486  public delegate void ServerUpdate(ServerProperties serverproperties);
8487 
8493  public event ServerUpdate OnCmdServerUpdate;
8494 
8496  public delegate void ServerStats(ServerStatistics serverstatistics);
8497 
8502  public event ServerStats OnCmdServerStatistics;
8503 
8505  public delegate void FileUpdate(RemoteFile remotefile);
8506 
8511  public event FileUpdate OnCmdFileNew;
8512 
8517  public event FileUpdate OnCmdFileRemove;
8518 
8520  public delegate void ListUserAccount(UserAccount useraccount);
8521 
8524  public event ListUserAccount OnCmdUserAccount;
8525 
8527  public delegate void ListBannedUser(BannedUser banneduser);
8528 
8531  public event ListBannedUser OnCmdBannedUser;
8532 
8537  public event UserStreamUpdate OnUserFirstVoiceStreamPacket;
8538 
8542  public event UserUpdate OnUserStateChange;
8543 
8545  public delegate void UserVideoFrame(int nUserID, int nStreamID);
8546 
8551  public event UserVideoFrame OnUserVideoCapture;
8552 
8557  public event UserVideoFrame OnUserMediaFileVideo;
8558 
8567  public delegate void NewDesktopWindow(int nUserID, int nStreamID);
8568 
8577  public event NewDesktopWindow OnUserDesktopWindow;
8578 
8580  public delegate void UserDesktopInput(int nSrcUserID, DesktopInput desktopinput);
8581 
8587  public event UserDesktopInput OnUserDesktopCursor;
8588 
8594  public event UserDesktopInput OnUserDesktopInput;
8595 
8597  public delegate void UserRecordMediaFile(int nUserID, MediaFileInfo mediafileinfo);
8598 
8603  public event UserRecordMediaFile OnUserRecordMediaFile;
8604 
8606  public delegate void NewAudioBlock(int nUserID, StreamType nStreamType);
8607 
8617  public event NewAudioBlock OnUserAudioBlock;
8618 
8620  public delegate void ErrorOccured(ClientErrorMsg clienterrormsg);
8621 
8626  public event ErrorOccured OnInternalError;
8627 
8630  public delegate void VoiceActivation(bool bVoiceActive);
8631 
8636  public event VoiceActivation OnVoiceActivation;
8637 
8643  public delegate void HotKeyToggle(int nHotKeyID, bool bActive);
8644 
8653  public event HotKeyToggle OnHotKeyToggle;
8654 
8659  public delegate void HotKeyTest(int nVkCode, bool bActive);
8660 
8677  public event HotKeyTest OnHotKeyTest;
8678 
8682  public delegate void FileTransferUpdate(FileTransfer filetransfer);
8683 
8695  public event FileTransferUpdate OnFileTransfer;
8696 
8706  public delegate void DesktopTransferUpdate(int nSessionID, int nBytesRemain);
8707 
8717  public event DesktopTransferUpdate OnDesktopWindowTransfer;
8718 
8720  public delegate void StreamMediaFile(MediaFileInfo mediafileinfo);
8721 
8726  public event StreamMediaFile OnStreamMediaFile;
8727 
8729  public delegate void LocalMediaFile(MediaFileInfo mediafileinfo);
8730 
8735  public event LocalMediaFile OnLocalMediaFile;
8736 
8738  public delegate void AudioInput(AudioInputProgress aip);
8739 
8744  public event AudioInput OnAudioInput;
8745 
8748  //TTDLL instance
8749  private IntPtr m_ttInst;
8750  //TTDLL event handler
8751  c_tt.MyEventHandler m_eventhandler;
8752  }
8753 
8762  public class TeamTalk5 : TeamTalkBase
8763  {
8764  public const int DEFAULT_TCPPORT = 10333;
8765  public const int DEFAULT_UDPPORT = 10333;
8766 
8768  public TeamTalk5(bool poll_based)
8769  : base(poll_based)
8770  {
8771  }
8772  }
8773 
8780  {
8781  public const int DEFAULT_TCPPORT = 10443;
8782  public const int DEFAULT_UDPPORT = 10443;
8783 
8785  public TeamTalk5Pro(bool poll_based)
8786  : base(poll_based)
8787  {
8788  }
8789  }
8798  public enum TTKeyTranslate : uint
8799  {
8801  TTKEY_NO_TRANSLATE = 0,
8815  }
8816 
8838  public enum MixerControl : uint
8839  {
8841  WAVEOUT_WAVE,
8843 
8845  WAVEIN_LINEIN,
8847  }
8848 
8852  public class WindowsMixer
8853  {
8860  public static int GetMixerCount()
8861  {
8862  return TTDLL.TT_Mixer_GetMixerCount();
8863  }
8870  public static bool GetMixerName(int nMixerIndex,
8871  ref string szMixerName)
8872  {
8873  IntPtr ptr = Marshal.AllocHGlobal(TeamTalkBase.TT_STRLEN * 2);
8874  bool b = TTDLL.TT_Mixer_GetMixerName(nMixerIndex, ptr);
8875  if(b)
8876  szMixerName = Marshal.PtrToStringUni(ptr);
8877 
8878  Marshal.FreeHGlobal(ptr);
8879  return b;
8880  }
8888  public static bool GetWaveInName(int nWaveDeviceID,
8889  ref string szMixerName)
8890  {
8891  IntPtr ptr = Marshal.AllocHGlobal(TeamTalkBase.TT_STRLEN * 2);
8892  bool b = TTDLL.TT_Mixer_GetWaveInName(nWaveDeviceID, ptr);
8893  if(b)
8894  szMixerName = Marshal.PtrToStringUni(ptr);
8895  Marshal.FreeHGlobal(ptr);
8896  return b;
8897  }
8905  public static bool GetWaveOutName(int nWaveDeviceID,
8906  ref string szMixerName)
8907  {
8908  IntPtr ptr = Marshal.AllocHGlobal(TeamTalkBase.TT_STRLEN * 2);
8909  bool b = TTDLL.TT_Mixer_GetWaveOutName(nWaveDeviceID, ptr);
8910  if(b)
8911  szMixerName = Marshal.PtrToStringUni(ptr);
8912 
8913  Marshal.FreeHGlobal(ptr);
8914  return b;
8915  }
8916 
8927  public static bool SetWaveOutMute(int nWaveDeviceID, MixerControl nControl, bool bMute)
8928  {
8929  return TTDLL.TT_Mixer_SetWaveOutMute(nWaveDeviceID, nControl, bMute);
8930  }
8940  public static int GetWaveOutMute(int nWaveDeviceID, MixerControl nControl)
8941  {
8942  return TTDLL.TT_Mixer_GetWaveOutMute(nWaveDeviceID, nControl);
8943  }
8952  public static bool SetWaveOutVolume(int nWaveDeviceID, MixerControl nControl, int nVolume)
8953  {
8954  return TTDLL.TT_Mixer_SetWaveOutVolume(nWaveDeviceID, nControl, nVolume);
8955  }
8964  public static int GetWaveOutVolume(int nWaveDeviceID, MixerControl nControl)
8965  {
8966  return TTDLL.TT_Mixer_GetWaveOutVolume(nWaveDeviceID, nControl);
8967  }
8975  public static bool SetWaveInSelected(int nWaveDeviceID, MixerControl nControl)
8976  {
8977  return TTDLL.TT_Mixer_SetWaveInSelected(nWaveDeviceID, nControl);
8978  }
8987  public static int GetWaveInSelected(int nWaveDeviceID, MixerControl nControl)
8988  {
8989  return TTDLL.TT_Mixer_GetWaveInSelected(nWaveDeviceID, nControl);
8990  }
8999  public static bool SetWaveInVolume(int nWaveDeviceID, MixerControl nControl, int nVolume)
9000  {
9001  return TTDLL.TT_Mixer_SetWaveInVolume(nWaveDeviceID, nControl, nVolume);
9002  }
9011  public static int GetWaveInVolume(int nWaveDeviceID, MixerControl nControl)
9012  {
9013  return TTDLL.TT_Mixer_GetWaveInVolume(nWaveDeviceID, nControl);
9014  }
9021  public static bool SetWaveInBoost(int nWaveDeviceID, bool bEnable)
9022  {
9023  return TTDLL.TT_Mixer_SetWaveInBoost(nWaveDeviceID, bEnable);
9024  }
9031  public static int GetWaveInBoost(int nWaveDeviceID)
9032  {
9033  return TTDLL.TT_Mixer_GetWaveInBoost(nWaveDeviceID);
9034  }
9041  public static bool SetWaveInMute(int nWaveDeviceID, bool bEnable)
9042  {
9043  return TTDLL.TT_Mixer_SetWaveInMute(nWaveDeviceID, bEnable);
9044  }
9051  public static int GetWaveInMute(int nWaveDeviceID)
9052  {
9053  return TTDLL.TT_Mixer_GetWaveInMute(nWaveDeviceID);
9054  }
9063  public static int GetWaveInControlCount(int nWaveDeviceID)
9064  {
9065  return TTDLL.TT_Mixer_GetWaveInControlCount(nWaveDeviceID);
9066  }
9077  public static bool GetWaveInControlName(int nWaveDeviceID, int nControlIndex,
9078  ref string szDeviceName)
9079  {
9080  IntPtr ptr = Marshal.AllocHGlobal(TeamTalkBase.TT_STRLEN * 2);
9081  bool b = TTDLL.TT_Mixer_GetWaveInControlName(nWaveDeviceID, nControlIndex, ptr);
9082  if(b)
9083  szDeviceName = Marshal.PtrToStringUni(ptr);
9084  Marshal.FreeHGlobal(ptr);
9085  return b;
9086  }
9096  public static bool SetWaveInControlSelected(int nWaveDeviceID, int nControlIndex)
9097  {
9098  return TTDLL.TT_Mixer_SetWaveInControlSelected(nWaveDeviceID, nControlIndex);
9099  }
9109  public static bool GetWaveInControlSelected(int nWaveDeviceID, int nControlIndex)
9110  {
9111  return TTDLL.TT_Mixer_GetWaveInControlSelected(nWaveDeviceID, nControlIndex);
9112  }
9113  }
9122  public class WindowsFirewall
9123  {
9129  public static bool IsEnabled()
9130  {
9131  return TTDLL.TT_Firewall_IsEnabled();
9132  }
9142  public static bool Enable(bool bEnable)
9143  {
9144  return TTDLL.TT_Firewall_Enable(bEnable);
9145  }
9152  public static bool AppExceptionExists(string szExecutable)
9153  {
9154  return TTDLL.TT_Firewall_AppExceptionExists(szExecutable);
9155  }
9165  public static bool AddAppException(string szName, string szExecutable)
9166  {
9167  return TTDLL.TT_Firewall_AddAppException(szName, szExecutable);
9168  }
9178  public static bool RemoveAppException(string szExecutable)
9179  {
9180  return TTDLL.TT_Firewall_RemoveAppException(szExecutable);
9181  }
9182  }
9188  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
9189  public struct ShareWindow
9190  {
9192  public IntPtr hWnd;
9194  public int nWndX;
9196  public int nWndY;
9198  public int nWidth;
9200  public int nHeight;
9202  [MarshalAs(UnmanagedType.ByValTStr, SizeConst = TeamTalkBase.TT_STRLEN)]
9203  public string szWindowTitle;
9204  }
9205 
9209  public class WindowsHelper
9210  {
9213  public static System.IntPtr GetDesktopActiveHWND()
9214  {
9215  return TTDLL.TT_Windows_GetDesktopActiveHWND();
9216  }
9217 
9219  public static System.IntPtr GetDesktopHWND()
9220  {
9221  return TTDLL.TT_Windows_GetDesktopHWND();
9222  }
9223 
9225  public static bool GetDesktopWindowHWND(int nIndex,
9226  ref System.IntPtr lpHWnd)
9227  {
9228  return TTDLL.TT_Windows_GetDesktopWindowHWND(nIndex, ref lpHWnd);
9229  }
9230 
9233  public static bool GetWindow(System.IntPtr hWnd,
9234  ref ShareWindow lpShareWindow)
9235  {
9236  return TTDLL.TT_Windows_GetWindow(hWnd, ref lpShareWindow);
9237  }
9238 
9258  public static int DesktopInputKeyTranslate(TTKeyTranslate nTranslate,
9259  DesktopInput[] lpDesktopInputs,
9260  out DesktopInput[] lpTranslatedDesktopInputs)
9261  {
9262  lpTranslatedDesktopInputs = new DesktopInput[lpDesktopInputs.Length];
9263  return TTDLL.TT_DesktopInput_KeyTranslate(nTranslate, lpDesktopInputs,
9264  lpTranslatedDesktopInputs,
9265  lpDesktopInputs.Length);
9266  }
9267 
9288  public static int DesktopInputExecute(DesktopInput[] lpDesktopInputs)
9289  {
9290  return TTDLL.TT_DesktopInput_Execute(lpDesktopInputs, lpDesktopInputs.Length);
9291  }
9292 
9293  }
9294 }
bool SetSoundInputPreprocess(AudioPreprocessor lpAudioPreprocessor)
Enable sound preprocessor which should be used for processing audio recorded by the sound input devic...
Definition: TeamTalk.cs:5208
bool DBG_SetSoundInputTone(StreamType uStreamTypes, int nFrequency)
Definition: TeamTalk.cs:8247
AbusePrevention abusePrevent
Properties which can be set to prevent abuse of a server, e.g. limit number of commands issued...
Definition: TeamTalk.cs:2166
UserRight uUserRights
A bitmask based on BearWare.UserRight which specifies the rights the user have who logs onto the serv...
Definition: TeamTalk.cs:2139
int nMaxNoiseSuppressDB
Maximum attenuation of the noise in dB. Negative value! Default value is -30. Value is ignored if bEn...
Definition: TeamTalk.cs:1180
BanType
Way to ban a user from either login or joining a channel.
Definition: TeamTalk.cs:2034
bool InitSoundOutputDevice(int nOutputDeviceID)
Initialize the sound output device (for audio playback).
Definition: TeamTalk.cs:4938
A channel which persists even when the last user leaves the channel.
A new user logged on to the server.
int nBandmode
Set to 0 for 8 KHz (narrow band), set to 1 for 16 KHz (wide band), set to 2 for 32 KHz (ultra-wide ba...
Definition: TeamTalk.cs:914
User left a channel is logged to file by the server.
Command indicating success.
static bool Enable(bool bEnable)
Enable/disable the Windows Firewall.
Definition: TeamTalk.cs:9142
WebMVP8Codec webm_vp8
Definition: TeamTalk.cs:1642
bool bVBR
Enable variable bitrate.
Definition: TeamTalk.cs:1067
bool bMore
Whether this text message is to be merged with next text message.
Definition: TeamTalk.cs:2535
static int GetWaveInSelected(int nWaveDeviceID, MixerControl nControl)
Get the selected state of a Windows Mixer Wave-In device from the &#39;enum&#39; of devices.
Definition: TeamTalk.cs:8987
User deleted a file is logged to file by the server.
HotKeyToggle OnHotKeyToggle
A hotkey has been acticated or deactivated.
Definition: TeamTalk.cs:8653
The ban applies to the channel specified in the szChannel of BearWare.BannedUser. Otherwise the ban a...
If set the client is currently streaming the video of a media file. When streaming a video file the B...
Used to denote nothing selected.
int nBufferMSecVoice
The size of the buffer (in msec) to hold voice content.
Definition: TeamTalk.cs:2426
Default values for BearWare.WebRTCAudioPreprocessor.
Definition: TeamTalk.cs:1434
bool bPassword
Whether password is required to join channel. Read-only property.
Definition: TeamTalk.cs:2614
UserTextMessage OnCmdUserTextMessage
A user has sent a text-message.
Definition: TeamTalk.cs:8459
Audio codec used by channel failed to initialize. Ensure the settings specified in BearWare...
Control timers for sending keep alive information to the server.
Definition: TeamTalk.cs:2914
long nVideoCaptureFramesDropped
Number of video frames dropped because user application didn&#39;t retrieve video frames in time...
Definition: TeamTalk.cs:2463
DesktopWindow AcquireUserDesktopWindow(int nUserID)
Get a user&#39;s desktop window (bitmap image).
Definition: TeamTalk.cs:6406
Used for tracking when a desktop window has been transmitted to the server.
Login failed due to maximum number of users on server.
bool bStereoPlayback
Playback should be done in stereo. Doing so will disable 3d-positioning.
Definition: TeamTalk.cs:936
static int GetWaveInMute(int nWaveDeviceID)
See if microphone is muted.
Definition: TeamTalk.cs:9051
ChannelUpdate OnCmdChannelNew
A new channel has been created.
Definition: TeamTalk.cs:8472
SoundSystem
The supported sound systems.
Definition: TeamTalk.cs:106
bool SetUserJitterControl(int nUserID, StreamType nStreamType, JitterConfig lpJitterConfig)
Set the configuration for de-jitter measures for a user.
Definition: TeamTalk.cs:7887
Desktop protocol based on ZLIB for image compression and UDP for data transmission.
int nSamples
The number of samples in the raw audio array.
Definition: TeamTalk.cs:489
string szPrivateKeyFile
Path to certificate&#39;s private key.
Definition: TeamTalk.cs:2867
Only channel operators (and administrators) will receive audio/video/desktop transmissions. Default channel users will only see transmissions from operators and/or administrators.
Same as BearWare.SoundSystem.SOUNDSYSTEM_AUDIOUNIT.
UserType GetMyUserType()
Get the client instance&#39;s user type.
Definition: TeamTalk.cs:7738
AudioConfig(bool set_defaults)
Definition: TeamTalk.cs:1611
UserVideoFrame OnUserMediaFileVideo
A new video frame was received from a user.
Definition: TeamTalk.cs:8557
User can see users in all other channels.
bool ReleaseUserVideoCaptureFrame(VideoFrame lpVideoFrame)
Delete a user&#39;s video frame, acquired through TeamTalkBase.AcquireUserVideoCaptureFrame(), so its allocated resources can be released.
Definition: TeamTalk.cs:5886
long nFilesRx
The number of bytes for file transmission received by the server.
Definition: TeamTalk.cs:2023
Connection OnConnectionFailed
Failed to connect to server.
Definition: TeamTalk.cs:8282
The bitmap is a 24-bit colored bitmap. The maximum size of a 24-bit bitmap is 4095 blocks of 85 by 16...
Translate from TTKEYCODE to Windows scan-code.
A RGB32 image where the pixels can be accessed directly in an allocated imageBuffer.
Definition: TeamTalk.cs:651
Store in PCM 16-bit wave format.
A client logged out of the server.
int nBandmode
Set to 0 for 8 KHz (narrow band), set to 1 for 16 KHz (wide band), set to 2 for 32 KHz (ultra-wide ba...
Definition: TeamTalk.cs:949
int nUserData
The nUserData of the user&#39;s BearWare.UserAccount. This field can be use to denote e...
Definition: TeamTalk.cs:2323
Error while processing media file.
Codec
The codecs supported.
Definition: TeamTalk.cs:1548
static bool GetMixerName(int nMixerIndex, ref string szMixerName)
Get the name of a Windows Mixer based on its name.
Definition: TeamTalk.cs:8870
User was banned is logged to file by the server.
A sound output device failed.
const int DEFAULT_AGC_GAINMAXDB
Definition: TeamTalk.cs:1495
User updated a channel is logged to file by the server.
int nMaxMediaFileTxPerSecond
The maximum number of bytes per second which the server will allow for media file packets...
Definition: TeamTalk.cs:1928
int nHeight
The height in pixels of the video device supported video format.
Definition: TeamTalk.cs:630
User was moved to another channel is logged to file by the server.
const bool DEFAULT_AGC_ENABLE
Definition: TeamTalk.cs:1491
bool StopRecordingMuxedAudioFile(int nChannelID)
Stop recording conversations from a channel to a single file.
Definition: TeamTalk.cs:5677
int nMaxTotalTxPerSecond
The amount of bytes per second which the server will allow for packet forwarding. If this value is ex...
Definition: TeamTalk.cs:1936
static bool SetWaveInBoost(int nWaveDeviceID, bool bEnable)
Enable and disable microphone boost.
Definition: TeamTalk.cs:9021
BearWare.TTMessage event queue overflowed.
int [] outputSampleRates
Supported sample rates by device for playback. A zero value terminates the list of supported sample r...
Definition: TeamTalk.cs:261
User is allowed to stream video files to channel.
static System.IntPtr GetDesktopHWND()
Get the handle (HWND) of the Windows desktop (full desktop).
Definition: TeamTalk.cs:9219
bool ReleaseUserDesktopWindow(DesktopWindow lpDesktopWindow)
Release memory allocated by the BearWare.DesktopWindow.
Definition: TeamTalk.cs:6435
int nGainLevel
Reference gain level to be used by all users.
Definition: TeamTalk.cs:1609
UserStreamUpdate OnUserFirstVoiceStreamPacket
The first voice packet of a new voice stream has been received.
Definition: TeamTalk.cs:8537
const int DEFAULT_WEBRTC_NOISESUPPRESS_LEVEL
Definition: TeamTalk.cs:1448
const bool DEFAULT_WEBRTC_ECHO_CANCEL_ENABLE
Definition: TeamTalk.cs:1449
SoundDeviceFeature uSoundDeviceFeatures
Additional features available for this sound device. The sound device features can be used to enable ...
Definition: TeamTalk.cs:269
bool CloseSoundOutputDevice()
Shutdown the output sound device.
Definition: TeamTalk.cs:5054
The login service is currently unavailable.
int nChannelID
The channel which the user is currently participating in. 0 if none. This value can change as a resul...
Definition: TeamTalk.cs:2342
MaxPayloadUpdate OnConnectionMaxPayloadUpdated
The maximum size of the payload put into UDP packets has been updated.
Definition: TeamTalk.cs:8306
int GetRootChannelID()
Get the root channel&#39;s ID.
Definition: TeamTalk.cs:7566
int nTcpPingTimeMs
Response time to server on TCP (based on ping/pong sent at a specified interval. Set to -1 if not cur...
Definition: TeamTalk.cs:2998
If set the client instance&#39;s sound input device has been initialized, i.e. TeamTalkBase.InitSoundInputDevice() has been called successfully.
FileTransferStatus
Status of a file transfer.
Definition: TeamTalk.cs:2784
bool SetSoundInputPreprocess(SpeexDSP lpSpeexDSP)
Enable sound preprocessor which should be used for processing audio recorded by the sound input devic...
Definition: TeamTalk.cs:5180
string szMOTD
The message of the day. Read-only property. Use szMOTDRaw to update this property.
Definition: TeamTalk.cs:1896
HotKeyTest OnHotKeyTest
A button was pressed or released on the user&#39;s keyboard or mouse.
Definition: TeamTalk.cs:8677
int GetVoiceActivationStopDelay()
Get the delay of when voice active state should be disabled.
Definition: TeamTalk.cs:5529
MediaFileInfo mediafileinfo
Definition: TeamTalk.cs:4062
The server rejected a command issued by the local client instance.
uint uElapsedMSec
The duration of the audio that has been transmitted.
Definition: TeamTalk.cs:1706
int nChannels
Mono = 1 or stereo = 2.
Definition: TeamTalk.cs:1048
bool SetClientKeepAlive(ClientKeepAlive lpClientKeepAlive)
Update the client instance&#39;s default keep alive settings.
Definition: TeamTalk.cs:6620
int nMaxLoginsPerIPAddress
The maximum number of users allowed to log in with the same IP-address. 0 means disabled.
Definition: TeamTalk.cs:1915
Allow multiple users to log on to the server with the same BearWare.UserAccount.
Nothing is logged to file by server.
const uint DESKTOPINPUT_KEYCODE_IGNORE
Definition: TeamTalk.cs:860
The server doesn&#39;t support the issued command.
If set the user&#39;s media file playback is muted.
bool SetEncryptionContext(EncryptionContext lpEncryptionContext)
Setup encryption properties prior to Connect().
Definition: TeamTalk.cs:6462
Client instance has not been authenticated.
ClientError
Errors which can occur either as a result of client commands or as a result of internal errors...
Definition: TeamTalk.cs:3053
Subscription uLocalSubscriptions
A bitmask of what the local user subscribes to from this user. Invoking TeamTalkBase.DoSubscribe() and TeamTalkBase.DoUnsubscribe() on the local client instance can change this value. Event BearWare.ClientEvent.CLIENTEVENT_CMD_USER_UPDATE is posted if this value changes.
Definition: TeamTalk.cs:2348
Same as BearWare.ClientError.INTERR_AUDIOPREPROCESSOR_INIT_FAILED.
bool GetSoundInputPreprocess(ref AudioPreprocessor lpAudioPreprocessor)
Get the sound preprocessor settings which are currently in use for recorded sound input device (voice...
Definition: TeamTalk.cs:5220
long nVoiceBytesSent
Voice data sent (on UDP).
Definition: TeamTalk.cs:2972
bool GetServerProperties(ref ServerProperties lpServerProperties)
Get the server&#39;s properties.
Definition: TeamTalk.cs:7531
static int GetWaveOutVolume(int nWaveDeviceID, MixerControl nControl)
Get the volume of a Windows Mixer Wave-Out device from the &#39;enum&#39; of devices.
Definition: TeamTalk.cs:8964
bool StartRecordingMuxedStreams(StreamType uStreamTypes, AudioCodec lpAudioCodec, string szAudioFileName, AudioFileFormat uAFF)
Mix multiple BearWare.StreamType into a single audio file.
Definition: TeamTalk.cs:5647
int nVideoFormatsCount
The number of capture formats available in captureFormats array.
Definition: TeamTalk.cs:714
uint uKeyCode
The key-code (or mouse button) pressed. If used with TeamTalkBase.DesktopInput_Execute() and no key (...
Definition: TeamTalk.cs:828
int nTransmitUsersQueueDelayMSec
Delay for switching to next active voice user in transmitUsersQueue.
Definition: TeamTalk.cs:2705
The server successfully processed a command issued by the local client instance.
int DoListBans(int nChannelID, int nIndex, int nCount)
Issue a command to list the banned users.
Definition: TeamTalk.cs:7459
Don&#39;t allow recording to files in the channel.
bool bInbound
TRUE if download and FALSE if upload.
Definition: TeamTalk.cs:2819
An enum encapsulation the minimum, maximum and default sound levels for input and output sound device...
Definition: TeamTalk.cs:393
FileTransfer filetransfer
Definition: TeamTalk.cs:4060
int nMaxDecDBSec
Used so volume should not be attenuated too quickly (maximal gain decrease in dB/second). Negative value! Default is -40. Value is ignored if bEnableAGC is FALSE.
Definition: TeamTalk.cs:1166
int nTxIntervalMSec
Milliseconds of audio data before each transmission.
Definition: TeamTalk.cs:929
Configuration of WebRTC pre-amplifier.
Definition: TeamTalk.cs:1276
const int TT_TRANSMITQUEUE_MAX
Definition: TeamTalk.cs:4304
string szUsername
The account&#39;s username.
Definition: TeamTalk.cs:2130
int nStoppedDelayMediaFile
The delay of when a user should no longer be considered playing audio of a media file.
Definition: TeamTalk.cs:2398
uint uOffsetMSec
Offset in milliseconds in the media file where to start playback. Pass BearWare.TeamTalkBase.TT_MEDIAPLAYBACK_OFFSET_IGNORE to ignore this value when using TeamTalkBase.UpdateLocalPlayback() or TeamTalkBase.UpdateStreamingMediaFileToChannel(). uOffsetMSec must be less than uDurationMSec in BearWare.MediaFileInfo.
Definition: TeamTalk.cs:1687
UserUpdate OnUserStateChange
A user&#39;s state has been updated.
Definition: TeamTalk.cs:8542
int nFrameBufferSize
The size in bytes of the buffer allocate in frameBuffer. Typically nBytesPerLine * nHeight...
Definition: TeamTalk.cs:789
BitmapFormat
The bitmap format used for a BearWare.DesktopWindow.
Definition: TeamTalk.cs:724
The bitmap is a 16-bit colored bitmap. The maximum pixels.
System.IntPtr frameBuffer
A buffer allocated internally by TeamTalkBase.
Definition: TeamTalk.cs:671
bool bVBRConstraint
Enable constrained VBR. bVBR must be enabled to enable this.
Definition: TeamTalk.cs:1070
int DoUnBanUser(string szIPAddress, int nChannelID)
Unban the user with the specified IP-address.
Definition: TeamTalk.cs:7420
bool Enable3DSoundPositioning(bool bEnable)
Enable automatically position users using 3D-sound.
Definition: TeamTalk.cs:5266
DesktopKeyState uKeyState
The state of the key (or mouse button) pressed, i.e. if it&#39;s up or down.
Definition: TeamTalk.cs:831
If set the user currently streams a video file. If this flag changes the event BearWare.ClientEvent.CLIENTEVENT_USER_STATECHANGE is posted.
User can add and remove banned users.
UserDesktopInput OnUserDesktopInput
Desktop input (mouse or keyboard input) has been received from a user.
Definition: TeamTalk.cs:8594
static IntPtr StartSoundLoopbackTest(int nInputDeviceID, int nOutputDeviceID, int nSampleRate, int nChannels, bool bDuplexMode, AudioPreprocessor lpAudioPreprocessor, BearWare.SoundDeviceEffects lpSoundDeviceEffects)
Perform a record and playback test of specified sound devices along with an audio configuration and a...
Definition: TeamTalk.cs:4823
ErrorOccured OnInternalError
A internal error occured.
Definition: TeamTalk.cs:8626
bool SetUserMediaStorageDir(int nUserID, string szFolderPath, string szFileNameVars, AudioFileFormat uAFF)
Store user&#39;s audio to disk.
Definition: TeamTalk.cs:7981
string szMOTDRaw
The message of the day including variables. The result of the szMOTDRaw string will be displayed in s...
Definition: TeamTalk.cs:1906
ushort uMousePosX
The X coordinate of the mouse. If used with WindowsHelper.Execute() and the mouse position should be ...
Definition: TeamTalk.cs:818
ClientEvent nClientEvent
The event&#39;s message number.
Definition: TeamTalk.cs:3997
SoundSystem nSoundSystem
The sound system used by the sound device.
Definition: TeamTalk.cs:218
bool StopLocalPlayback(int nPlaybackSessionID)
Definition: TeamTalk.cs:6087
int nQuality
A value from 0-10. If nBitRate is non-zero it will override this value.
Definition: TeamTalk.cs:952
bool GetSoundInputPreprocess(ref SpeexDSP lpSpeexDSP)
Get the sound preprocessor settings which are currently in use for recorded sound input device (voice...
Definition: TeamTalk.cs:5193
A default user who can join channels.
bool SendDesktopInput(int nUserID, DesktopInput[] lpDesktopInputs)
Send a mouse or keyboard event to a shared desktop window.
Definition: TeamTalk.cs:6377
int nFromUserID
Will be set automatically on outgoing message.
Definition: TeamTalk.cs:2520
static int GetWaveInControlCount(int nWaveDeviceID)
Get the number of Windows Mixer Wave-In devices.
Definition: TeamTalk.cs:9063
UserDesktopInput OnUserDesktopCursor
A user has sent the position of the mouse cursor.
Definition: TeamTalk.cs:8587
int SendDesktopWindow(DesktopWindow lpDesktopWindow, BitmapFormat nConvertBmpFormat)
Transmit a desktop window (bitmap) to users in the same channel.
Definition: TeamTalk.cs:6201
If set the client instance&#39;s video device has been initialized, i.e. TeamTalkBase.InitVideoCaptureDevice() has been called successfuly.
Cannot join channel because it has maximum number of users.
A struct which describes the properties of a window which can be shared.
Definition: TeamTalk.cs:9189
bool SetSoundDeviceEffects(SoundDeviceEffects lpSoundDeviceEffect)
Set up audio effects on a sound device.
Definition: TeamTalk.cs:5103
bool GetChannel(int nChannelID, ref Channel lpChannel)
Get the channel with a specific ID.
Definition: TeamTalk.cs:7591
int GetMyUserData()
If an account was used in TeamTalkBase.DoLogin() then this value will return the nUserData from the B...
Definition: TeamTalk.cs:7768
bool PaintDesktopWindowEx(int nUserID, System.IntPtr hDC, int XDest, int YDest, int nDestWidth, int nDestHeight, int XSrc, int YSrc, int nSrcWidth, int nSrcHeight)
Paint user&#39;s desktop window using a Windows&#39; DC (device context).
Definition: TeamTalk.cs:6320
int nMaxVideoCaptureTxPerSecond
The maximum number of bytes per second which the server will allow for video input packets...
Definition: TeamTalk.cs:1924
bool IsChannelOperator(int nUserID, int nChannelID)
Check whether user is operator of a channel.
Definition: TeamTalk.cs:7671
string szPassword
The account&#39;s password.
Definition: TeamTalk.cs:2133
Shortcut to allow voice, media files, desktop, webcamera and channel messages.
Set up audio effects supported by the sound device.
Definition: TeamTalk.cs:281
A struct containing the properties of a text message sent by a user.
Definition: TeamTalk.cs:2515
Playing media file with updated uElapsedMSec of BearWare.MediaFileInfo.
Started processing media file.
bool GetServerUsers(out User[] lpUsers)
Get all the users on the server.
Definition: TeamTalk.cs:7545
static bool IsEnabled()
Check if the Windows Firewall is currently enabled.
Definition: TeamTalk.cs:9129
An audio block containing the raw audio from a user who was talking.
Definition: TeamTalk.cs:474
int InitLocalPlayback(string szMediaFilePath, MediaFilePlayback lpMediaFilePlayback)
Play media file using settings from BearWare.TeamTalkBase instance.
Definition: TeamTalk.cs:6057
Media file played locally is procesing.
int nParentID
Parent channel ID. 0 means no parent channel, i.e. it&#39;s the root channel.
Definition: TeamTalk.cs:2597
bool InitVideoCaptureDevice(string szDeviceID, VideoFormat lpVideoFormat)
Initialize a video capture device.
Definition: TeamTalk.cs:5757
bool CloseSoundDuplexDevices()
Shut down sound devices running in duplex mode.
Definition: TeamTalk.cs:5064
UserVideoFrame OnUserVideoCapture
A new video frame was received from a user.
Definition: TeamTalk.cs:8551
User logged out is logged to file by the server.
string szUsername
Username of the person who uploaded the files.
Definition: TeamTalk.cs:2839
User&#39;s nick name is locked. TeamTalkBase.DoChangeNickname() cannot be used and TeamTalkBase.DoLogin() will ignore szNickname parameter.
int nTxIntervalMSec
Milliseconds of audio data before each transmission.
Definition: TeamTalk.cs:976
Ban szIPAddress specified in BearWare.BannedUser.
Desktop window stream type which is a window (or bitmap) being transmitted.
User can record voice in all channels. Even channels with BearWare.ChannelType.CHANNEL_NO_RECORDING.
User can see hidden channels, BearWare.ChannelType.CHANNEL_HIDDEN.
int nCommandsLimit
Limit number of commands a user can send to the server.
Definition: TeamTalk.cs:2112
Properties for initializing or updating a file for media streaming.
Definition: TeamTalk.cs:1681
UserType
The types of users supported.
Definition: TeamTalk.cs:2081
A wrapper for the Windows Firewall API.
Definition: TeamTalk.cs:9122
Windows Audio Session API (WASAPI). Should be used on Windows Vista/7/8/10.
Intercept all voice sent by a user. Only user-type BearWare.UserType.USERTYPE_ADMIN can do this...
Class used to load TeamTalk5Pro.dll and instantiate a TeamTalk client in TeamTalk 5 SDK Professional ...
Definition: TeamTalk.cs:8779
A custom user to user text message. Works the same way as BearWare.TextMsgType BearWare.TextMsgType.MSGTYPE_USER.
The image format with the highest bandwidth usage. A 640x480 pixel images takes up 1...
static bool CloseSoundLoopbackTest(IntPtr lpTTSoundLoop)
Stop recorder and playback test.
Definition: TeamTalk.cs:4838
The client instance logged out of the server.
bool UpdateStreamingMediaFileToChannel(MediaFilePlayback lpMediaFilePlayback, VideoCodec lpVideoCodec)
Update active media file being streamed to channel.
Definition: TeamTalk.cs:6015
int nUdpKeepAliveIntervalMSec
Client instance&#39;s interval between sending UDP keep alive packets. The UDP keep alive packets are use...
Definition: TeamTalk.cs:2936
uint nEncodeDeadline
Time that should be spent on encoding a frame.
Definition: TeamTalk.cs:1528
The first voice packet of a new voice stream has been received.
int DoChannelOp(int nUserID, int nChannelID, bool bMakeOperator)
Make another user operator of a channel.
Definition: TeamTalk.cs:6908
int GetSoundInputGainLevel()
Get voice gain level of outgoing audio.
Definition: TeamTalk.cs:5160
string szUsername
Username of banned user.
Definition: TeamTalk.cs:2069
bool CloseSoundInputDevice()
Shutdown the input sound device.
Definition: TeamTalk.cs:5032
FileTransferStatus nStatus
Status of file transfer.
Definition: TeamTalk.cs:2803
const int DEFAULT_AGC_GAINLEVEL
Definition: TeamTalk.cs:1492
bool ConnectEx(string szHostAddress, int nTcpPort, int nUdpPort, string szBindIPAddr, int nLocalTcpPort, int nLocalUdpPort, bool bEncrypted)
Bind to specific IP-address prior to connecting to server.
Definition: TeamTalk.cs:6562
int nUdpConnectRTXMSec
Client instance&#39;s interval for retransmitting UDP connect packets. UDP connect packets are only sent ...
Definition: TeamTalk.cs:2949
bool SetUserStereo(int nUserID, StreamType nStreamType, bool bLeftSpeaker, bool bRightSpeaker)
Set whether a user should speak in the left, right or both speakers. This function only works if Bear...
Definition: TeamTalk.cs:7942
MixerControl
The Windows mixer controls which can be queried by the BearWare.WindowsMixer class.
Definition: TeamTalk.cs:8838
A struct containing the properties of a shared desktop window.
Definition: TeamTalk.cs:765
bool bPaused
Start or pause media file playback.
Definition: TeamTalk.cs:1689
Use the BearWare.SpeexDSP audio preprocessor.
long nDesktopBytesRX
The number of bytes in desktop packets received by the server from clients.
Definition: TeamTalk.cs:2013
string szRemoteFileName
The filename in the channel.
Definition: TeamTalk.cs:2813
string szMessage
The actual text message. The message can be multi-line (include EOL)
Definition: TeamTalk.cs:2532
int nComplexity
Complexity of encoding (affects CPU usage). Value from 0-10.
Definition: TeamTalk.cs:1055
UserUpdate OnCmdUserJoinedChannel
A user has joined a channel.
Definition: TeamTalk.cs:8440
bool GetServerChannels(out Channel[] lpChannels)
Get all the channels on the server.
Definition: TeamTalk.cs:7681
bool bAutoSave
Whether the server automatically saves changes.
Definition: TeamTalk.cs:1938
Server has updated its settings (server name, MOTD, etc.)
ClientErrorMsg clienterrormsg
Definition: TeamTalk.cs:4054
TeamTalk5Pro(bool poll_based)
Simply calls TeamTalkBase.TeamTalkBase()
Definition: TeamTalk.cs:8785
Intercept all media file data sent by a user. Only user-type BearWare.UserType.USERTYPE_ADMIN can do ...
int nLevel
Noise suppression level. 0 = Low, 1 = Moderate, 2 = High, 3 = VeryHigh. Default: 1.
Definition: TeamTalk.cs:1309
bool CloseVideoCaptureDevice()
Close a video capture device.
Definition: TeamTalk.cs:5766
A User to user text message. A message of this type can be sent across channels.
int nSessionID
The ID of the session which the bitmap belongs to. If the session ID changes it means the user has st...
Definition: TeamTalk.cs:782
UserState
The possible states for a user. Used for BearWare.User&#39;s uUserState variable.
Definition: TeamTalk.cs:2262
long nMediaFileBytesRX
The number of bytes in media file packets received by the server from clients.
Definition: TeamTalk.cs:2007
Speex audio codec in VBR mode, http://www.speex.org.
TeamTalk5(bool poll_based)
Simply calls TeamTalkBase.TeamTalkBase()
Definition: TeamTalk.cs:8768
int nMaxLoginAttempts
The maximum number of logins with wrong password before banning user&#39;s IP-address.
Definition: TeamTalk.cs:1912
int HotKey_IsActive(int nHotKeyID)
Check whether hotkey is active.
Definition: TeamTalk.cs:8194
float fFixedGainFactor
Gain factor. Default: 1.
Definition: TeamTalk.cs:1282
User disconnected due to connection timeout is logged to file by the server.
Constants for BearWare.DesktopInput.
Definition: TeamTalk.cs:851
int nFileID
The ID identifying the file.
Definition: TeamTalk.cs:2831
bool SetUserMediaStorageDir(int nUserID, string szFolderPath, string szFileNameVars, AudioFileFormat uAFF, int nStopRecordingExtraDelayMSec)
Store user&#39;s audio to disk.
Definition: TeamTalk.cs:8011
Connection OnConnectionSuccess
Connected successfully to the server.
Definition: TeamTalk.cs:8274
int nBitRate
Bitrate for encoded audio. Should be between BearWare.OpusConstants.OPUS_MIN_BITRATE and BearWare...
Definition: TeamTalk.cs:1065
string szNickname
Nickname of banned user. Read-only property.
Definition: TeamTalk.cs:2066
Banned from joining a channel.
string szIPAddress
The user&#39;s IP-address. This value is set by the server.
Definition: TeamTalk.cs:2330
bool ReleaseUserMediaVideoFrame(VideoFrame lpVideoFrame)
Delete a user&#39;s video frame, acquired through TeamTalkBase.AcquireUserMediaVideoFrame(), so its allocated resources can be released.
Definition: TeamTalk.cs:6146
bool StopRecordingMuxedAudioFile()
Stop an active muxed audio recording.
Definition: TeamTalk.cs:5666
long nVoiceBytesTX
The number of bytes in audio packets sent from the server to clients.
Definition: TeamTalk.cs:1992
Banned IP-address does not exist.
int nTxIntervalMSec
Duration of audio before each transmission. Minimum is 2 msec. Recommended is 40 msec. Maximum is 500 msec.
Definition: TeamTalk.cs:1077
Advanced Linux Sound Architecture (ALSA). Should be used on Linux.
int DoLogin(string szNickname, string szUsername, string szPassword)
Same as DologinEx() but without the option to specify szClientName. Kept for backwards compatibility...
Definition: TeamTalk.cs:6673
OpusCodec opus
Opus codec settings if nCodec is OPUS_CODEC.
Definition: TeamTalk.cs:1585
A new file is added to a channel.
bool PaintDesktopWindow(int nUserID, System.IntPtr hDC, int XDest, int YDest, int nDestWidth, int nDestHeight)
Paint user&#39;s desktop window using a Windows&#39; DC (device context).
Definition: TeamTalk.cs:6278
Desktop input stream type which is keyboard or mouse input being transmitted.
FileTransferUpdate OnFileTransfer
A file transfer is processing.
Definition: TeamTalk.cs:8695
Codec nCodec
Specifies member holds the codec settings. So far there is only one video codec to choose from...
Definition: TeamTalk.cs:1640
long nMediaFileAudioPacketsLost
Number of media file audio packets lost from user.
Definition: TeamTalk.cs:2467
long nFileSize
The size of the file being transferred.
Definition: TeamTalk.cs:2815
If set the client instance is running in sound duplex mode where multiple audio output streams are mi...
User updated server&#39;s properties is logged to file by the server.
SoundDeviceFeature
Features available on a sound device. Checkout uSoundDeviceFeatures on BearWare.SoundDevice.
Definition: TeamTalk.cs:165
A struct containing the properties of a sound device for either playback or recording.
Definition: TeamTalk.cs:209
bool bEnableAGC
Users should enable automatic gain control.
Definition: TeamTalk.cs:1606
int DoDeleteUserAccount(string szUsername)
Issue command to delete a user account on the server.
Definition: TeamTalk.cs:7300
static System.Drawing.Color Palette_GetColorTable(BitmapFormat nBmpPalette, int nIndex)
Get RGB values of the palette for the bitmap format.
Definition: TeamTalk.cs:6235
string szStatusMsg
The user&#39;s current status message. Invoke TeamTalkBase.DoChangeStatus() to change this value...
Definition: TeamTalk.cs:2371
bool HotKey_GetKeyString(int nVKCode, ref string szKeyName)
Get a string description of the virtual-key code.
Definition: TeamTalk.cs:8236
User is allowed to forward desktop input packets through server.
MyselfKicked OnCmdMyselfKicked
The client instance was kicked from a channel.
Definition: TeamTalk.cs:8398
System.IntPtr lpRawAudio
The raw audio in 16-bit integer format array. The size of the array in bytes is sizeof(short) * nSamp...
Definition: TeamTalk.cs:487
bool GetClientKeepAlive(ref ClientKeepAlive lpClientKeepAlive)
Get the client instance&#39;s current keep alive settings.
Definition: TeamTalk.cs:6631
const int TT_VIDEOFORMATS_MAX
Definition: TeamTalk.cs:4224
long nMediaFileAudioPacketsRecv
Number of media file audio packets received from user.
Definition: TeamTalk.cs:2465
The BearWare.SoundDevice can enable Acoustic Echo Canceler (AEC). Enable AEC use property bEnableAEC ...
ServerProperties serverproperties
Definition: TeamTalk.cs:4066
Audio configuration for clients in a channel.
Definition: TeamTalk.cs:1602
Image format where a 640x480 pixel images takes up 614.400 bytes.
int nLoginDelayMSec
Number of msec before an IP-address can make another login attempt. If less than this amount then Tea...
Definition: TeamTalk.cs:1960
User is allowed to media files to channel.
User removed a channel is logged to file by the server.
int DoChangeNickname(string szNewNick)
Change the client instance&#39;s nick name.
Definition: TeamTalk.cs:6839
bool GetFileTransferInfo(int nTransferID, ref FileTransfer lpFileTransfer)
Get information about an active file transfer.
Definition: TeamTalk.cs:8113
long nMediaFileVideoFramesDropped
Number of media file video frames dropped because user application didn&#39;t retrieve video frames in ti...
Definition: TeamTalk.cs:2478
bool PaintVideoFrame(int nUserID, System.IntPtr hDC, int XDest, int YDest, int nDestWidth, int nDestHeight, ref VideoFrame lpVideoFrame)
Paint user&#39;s video frame using a Windows&#39; DC (device context).
Definition: TeamTalk.cs:5784
long nVoiceBytesRecv
Voice data received (on UDP).
Definition: TeamTalk.cs:2974
bool StartStreamingMediaFileToChannel(string szMediaFilePath, VideoCodec lpVideoCodec)
Stream media file to channel, e.g. avi-, wav- or MP3-file.
Definition: TeamTalk.cs:5954
If set the client instance is currently transmitting a desktop window. A desktop window update is iss...
Voice and video transmission in the channel is controlled by a channel operator.
UserUpdate OnCmdUserUpdate
User changed properties.
Definition: TeamTalk.cs:8434
File transfer doesn&#39;t exists.
object DataToObject()
Definition: TeamTalk.cs:4008
Paused processing of media file.
int nEchoSuppress
Set maximum attenuation of the residual echo in dB (negative number). Default is -40. Value is ignored if bEnableEchoCancellation is FALSE.
Definition: TeamTalk.cs:1205
int nMaxIncDBSec
Used so volume should not be amplified too quickly (maximal gain increase in dB/second). Default is 12.
Definition: TeamTalk.cs:1160
int nWaveDeviceID
A Windows specific ID to the sound device.
Definition: TeamTalk.cs:244
UserType uUserType
A bitmask of the type of user based on BearWare.UserType.
Definition: TeamTalk.cs:2135
int [] transmitUsers
List of users who can transmit in a channel.
Definition: TeamTalk.cs:2690
int DoQueryServerStats()
Get the server&#39;s current statistics.
Definition: TeamTalk.cs:7500
long nVideoCaptureFramesLost
Video frames which couldn&#39;t be shown because packets were lost.
Definition: TeamTalk.cs:2460
User created new channel is logged to file by the server.
Configuration parameters for the Jitter Buffer.
Definition: TeamTalk.cs:3025
const bool DEFAULT_WEBRTC_SAT_PROT_ENABLE
Definition: TeamTalk.cs:1442
string szDeviceID
A string identifying the device.
Definition: TeamTalk.cs:691
int nHeight
The height in pixels of the bitmap.
Definition: TeamTalk.cs:770
int nMaxVoiceTxPerSecond
The maximum number of bytes per second which the server will allow for voice packets. If this value is exceeded the server will start dropping audio packets. 0 = disabled.
Definition: TeamTalk.cs:1919
bool GetChannelPath(int nChannelID, ref string szChannelPath)
Get the channel&#39;s path. Channels are separated by &#39;/&#39;.
Definition: TeamTalk.cs:7601
int DoLogout()
Logout of the server.
Definition: TeamTalk.cs:6725
If set the client instance is currently transmitting audio.
void RemoveTransmitUser(int nUserID, StreamType uStreamType)
Helper function for removing a BearWare.StreamType for a user in transmitUsers.
Definition: TeamTalk.cs:2757
bool bEnableEchoCancellation
Speex DSP is used for specifying how recorded audio from a sound input device should be preprocessed ...
Definition: TeamTalk.cs:1200
uint uDurationMSec
The duration of the media file in miliseconds.
Definition: TeamTalk.cs:1668
User is allowed to forward desktop packets through server.
ChannelUpdate OnCmdChannelRemove
A channel has been removed. Event handler for BearWare.ClientEvent.CLIENTEVENT_CMD_CHANNEL_REMOVE.
Definition: TeamTalk.cs:8483
int GetSoundInputLevel()
Get the volume level of the current recorded audio.
Definition: TeamTalk.cs:5131
DesktopKeyState
The state of a key (or mouse button), i.e. if it&#39;s pressed or released.
Definition: TeamTalk.cs:795
Connected successfully to the server.
Ban szUsername specified in BearWare.BannedUser.
Voice stream type which is audio recorded from a sound input device.
long nUdpBytesSent
Bytes sent on UDP.
Definition: TeamTalk.cs:2968
bool InitSoundInputDevice(int nInputDeviceID)
Initialize the sound input device (for recording audio).
Definition: TeamTalk.cs:4870
bool DBG_WriteAudioFileTone(MediaFileInfo lpMediaFileInfo, int nFrequency)
Definition: TeamTalk.cs:8253
The bitmap is a 32-bit colored bitmap. The maximum size of a 32-bit bitmap is 4095 blocks of 51 by 20...
float [] soundPositionVoice
User&#39;s position when using 3D-sound (DirectSound option). Index 0 is x-axis, index 1 is y-axis and in...
Definition: TeamTalk.cs:2404
int DoRemoveChannel(int nChannelID)
Remove a channel from a server.
Definition: TeamTalk.cs:7181
const int DEFAULT_DENOISE_SUPPRESS
Definition: TeamTalk.cs:1497
string szCertificateFile
Path to SSL certificate in PEM format.
Definition: TeamTalk.cs:2864
int nSampleRate
The sample rate of the raw audio.
Definition: TeamTalk.cs:481
bool bDTX
Discontinuous transmission. Enables "null" packets during silence.
Definition: TeamTalk.cs:1061
VideoFrame AcquireUserVideoCaptureFrame(int nUserID, out Bitmap bmp)
Extract a user&#39;s video frame for display.
Definition: TeamTalk.cs:5862
long nMediaFileVideoBytesSent
Video from media file data sent (on UDP).
Definition: TeamTalk.cs:2984
int DoUnBanUserEx(BannedUser lpBannedUser)
Unban the properties specified in BearWare.BannedUser.
Definition: TeamTalk.cs:7434
const float DEFAULT_WEBRTC_GAINDB
Definition: TeamTalk.cs:1441
User can update server properties.
string szName
Name of the channel.
Definition: TeamTalk.cs:2603
int nChannelID
The channel where the file is/will be located.
Definition: TeamTalk.cs:2807
Finished processing media file.
DesktopWindow AcquireUserDesktopWindowEx(int nUserID, BitmapFormat nBitmapFormat)
Same as TeamTalkBase.AcquireUserDesktopWindow() except an extra option for converting bitmap to a dif...
Definition: TeamTalk.cs:6422
string szInitChannel
User should (manually) join this channel after login. If an initial channel is specified in the user&#39;...
Definition: TeamTalk.cs:2152
int nMaxOutputChannels
The maximum number of output channels.
Definition: TeamTalk.cs:251
StreamType uStreamTypes
The stream types used to generate the AudioBlock&#39;s raw audio.
Definition: TeamTalk.cs:510
bool bVerifyClientOnce
Whether to only verify client&#39;s certificate once during initial connection.
Definition: TeamTalk.cs:2895
bool GetClientStatistics(ref ClientStatistics lpClientStatistics)
Retrieve client statistics of bandwidth usage and response times.
Definition: TeamTalk.cs:6601
long nMediaFileAudioBytesSent
Audio from media file data sent (on UDP).
Definition: TeamTalk.cs:2980
static bool GetMediaFileInfo(string szMediaFilePath, ref MediaFileInfo lpMediaFileInfo)
Get the properties of a media file.
Definition: TeamTalk.cs:6099
string szCaptureAPI
The name of the API used to capture video.
Definition: TeamTalk.cs:708
int nStoppedDelayVoice
The delay of when a user should no longer be considered as talking.
Definition: TeamTalk.cs:2394
int nFixedDelayMSec
The fixed delay in milliseconds. Default = 0.
Definition: TeamTalk.cs:3028
User can send private text messages, i.e. BearWare.TextMsgType.MSGTYPE_USER.
bool SetSoundOutputMute(bool bMuteAll)
Set all users mute.
Definition: TeamTalk.cs:5252
Use TeamTalk&#39;s internal audio preprocessor for gain audio. Same as used for TeamTalkBase.SetSoundInputGainLevel().
Definition: TeamTalk.cs:1250
A broadcast message. Requires BearWare.UserRight.USERRIGHT_TEXTMESSAGE_BROADCAST. ...
If set the client instance&#39;s sound output device has been initialized, i.e. TeamTalkBase.InitSoundOutputDevice() has been called successfully.
Internal use to denote no supported formats.
string szUploadTime
Time when file was uploaded. Date/time is converted local time.
Definition: TeamTalk.cs:2843
SpeexVBRCodec speex_vbr
Speex codec settings if nCodec is BearWare.Codec.SPEEX_VBR_CODEC.
Definition: TeamTalk.cs:1581
User was removed from ban list is logged to file by the server.
bool SetUserAudioStreamBufferSize(int nUserID, StreamType uStreamType, int nMSec)
Change the amount of media data which can be buffered in the user&#39;s playback queue.
Definition: TeamTalk.cs:8041
NoiseSuppression noisesuppression
Definition: TeamTalk.cs:1311
long nMediaFileAudioBytesRecv
Audio from media file data received (on UDP).
Definition: TeamTalk.cs:2982
int nSampleRate
The sample rate to use. Sample rate must be 8000, 12000, 16000, 24000 or 48000 Hz.
Definition: TeamTalk.cs:1046
bool bUseAdativeDejitter
Turns adaptive jitter buffering ON/OFF. Default is OFF.
Definition: TeamTalk.cs:3030
Failed to connect to server.
int nConnectionLostMSec
The duration before the TeamTalk instance should consider the client/server connection lost...
Definition: TeamTalk.cs:2926
Gain level for AGC. Only active when bEnable is true.
Definition: TeamTalk.cs:1341
A struct containing the properties of a file in a BearWare.Channel.
Definition: TeamTalk.cs:2826
A new channel has been created.
A new or updated desktop window has been received from a user.
int DoQuit()
Quit from server.
Definition: TeamTalk.cs:7516
Configuration of WebRTC&#39;s gain controller 2 for AGC.
Definition: TeamTalk.cs:1333
A user with administrator privileges.
Cannot process command since channel is not empty.
string szCAFile
Path to Certificate Authority (CA) Certificate in PEM format.
Definition: TeamTalk.cs:2873
A new video frame from a video capture device was received from a user.
Configuration for fine tuning gain level.
Definition: TeamTalk.cs:1351
AudioCodec audiocodec
The audio codec used by users in the channel.
Definition: TeamTalk.cs:2630
Command cannot be performed due to missing parameter. Only used internally.
User is allowed to create permanent channels which are stored in the server&#39;s configuration file...
The user is in initial state.
DesktopTransferUpdate OnDesktopWindowTransfer
Used for tracking when a desktop window has been transmitted to the server.
Definition: TeamTalk.cs:8717
static bool SetWaveOutMute(int nWaveDeviceID, MixerControl nControl, bool bMute)
Mute or unmute a Windows Mixer Wave-Out device from the &#39;enum&#39; of devices.
Definition: TeamTalk.cs:8927
A wrapper for the Windows Mixer API.
Definition: TeamTalk.cs:8852
Intercept all channel messages sent by a user. Only user-type BearWare.UserType.USERTYPE_ADMIN can do...
Speex audio codec, http://www.speex.org.
string szDeviceID
An identifier uniquely identifying the sound device even when new sound devices are being added and r...
Definition: TeamTalk.cs:227
CommandError OnCmdError
The server rejected a command issued by the local client instance.
Definition: TeamTalk.cs:8343
const bool DEFAULT_WEBRTC_LEVELESTIMATION_ENABLE
Definition: TeamTalk.cs:1439
BanType uBanTypes
The type of ban that applies to this banned user.
Definition: TeamTalk.cs:2071
UserUpdate OnCmdUserLeftChannel
User has left a channel.
Definition: TeamTalk.cs:8446
Use WebRTC&#39;s audio preprocessor from BearWare.WebRTCAudioPreprocessor. https://webrtc.org.
int nChannels
The number of channels used (1 for mono, 2 for stereo).
Definition: TeamTalk.cs:483
The bitmap is a 256-colored bitmap requiring a palette. The default 256 colored palette is the Netsca...
Channel text messages as stream type.
int nChannels
Channels used by media file, mono = 1, stereo = 2.
Definition: TeamTalk.cs:588
A file has been removed from a channel.
bool GetSoundDeviceEffects(ref SoundDeviceEffects lpSoundDeviceEffect)
Get the audio effects that are currently enabled.
Definition: TeamTalk.cs:5111
int nMaxBitRate
The maximum bitrate at which the audio codec is allowed to output audio. Set to zero if it should be ...
Definition: TeamTalk.cs:963
TextMessage textmessage
Definition: TeamTalk.cs:4068
bool InsertAudioBlock(AudioBlock lpAudioBlock)
Transmit application provided raw audio in BearWare.AudioBlock-structs as BearWare.StreamType.STREAMTYPE_VOICE, i.e. microphone input.
Definition: TeamTalk.cs:5419
Statistics of bandwidth usage and ping times in the local client instance.
Definition: TeamTalk.cs:2965
Subscribing to BearWare.StreamType.STREAMTYPE_MEDIAFILE_VIDEO and BearWare.StreamType.STREAMTYPE_MEDIAFILE_AUDIO.
const int DEFAULT_ECHO_SUPPRESS_ACTIVE
Definition: TeamTalk.cs:1500
bool StopStreamingMediaFileToChannel()
Stop streaming media file to channel.
Definition: TeamTalk.cs:6028
long nVideoCaptureBytesSent
Video data sent (on UDP).
Definition: TeamTalk.cs:2976
bool AutoPositionUsers()
Automatically position users using 3D-sound.
Definition: TeamTalk.cs:5279
Don&#39;t allow voice transmission if it&#39;s trigged by voice activation.
int nWidth
The width in pixels of the window.
Definition: TeamTalk.cs:9198
Helper for BearWare.ClientFlag.CLIENT_CONNECTING and BearWare.ClientFlag.CLIENT_CONNECTED to see if T...
const bool DEFAULT_DENOISE_ENABLE
Definition: TeamTalk.cs:1496
int DoMoveUser(int nUserID, int nChannelID)
Issue command to move a user from one channel to another.
Definition: TeamTalk.cs:7204
int nUserData
User specific data which will be stored on persistent storage on the server if the channel type is Be...
Definition: TeamTalk.cs:2620
int nEchoSuppressActive
Set maximum attenuation of the residual echo in dB when near end is active (negative number)...
Definition: TeamTalk.cs:1210
Video capture stream type which is video recorded from a webcam.
static int GetWaveInBoost(int nWaveDeviceID)
See if microphone boost is enabled.
Definition: TeamTalk.cs:9031
Use TeamTalk&#39;s internal audio preprocessor BearWare.TTAudioPreprocessor.
int nSoundInputDeviceDelayMSec
Delay of sound input device until the first audio frame is delivered (in msec).
Definition: TeamTalk.cs:3016
bool GetUserByUsername(string szUsername, ref User lpUser)
Get the user with the specified username.
Definition: TeamTalk.cs:7805
int [] transmitUsersQueue
The users currently queued for voice or media file transmission.
Definition: TeamTalk.cs:2696
long nDesktopBytesSent
Desktop data sent (on UDP).
Definition: TeamTalk.cs:2988
int nStreamID
The ID of the stream. The stream id changes every time the user enables a new transmission using Team...
Definition: TeamTalk.cs:479
const int TT_SAMPLERATES_MAX
Definition: TeamTalk.cs:4308
bool StopVideoCaptureTransmission()
Stop transmitting from video capture device.
Definition: TeamTalk.cs:5713
An internal error occurred in the client instance.
DirectSound audio system. Should be used on Windows.
long nTotalBytesRX
The number of bytes received by the server from clients.
Definition: TeamTalk.cs:1989
int nChannelID
Set to zero if nMsgType is BearWare.TextMsgType BearWare.TextMsgType.MSGTYPE_USER or BearWare...
Definition: TeamTalk.cs:2528
Audio stream type from a media file which is being streamed.
uint uQueueMSec
The duration of the audio currently queued for transmission.
Definition: TeamTalk.cs:1703
int nHeight
The height in pixels of the image contained in imageBuffer.
Definition: TeamTalk.cs:658
Prefered image format with the lowest bandwidth usage. A 640x480 pixel image takes up 460...
int nMaxUsers
Max number of users in channel.
Definition: TeamTalk.cs:2628
A struct containing the properties of a user.
Definition: TeamTalk.cs:2307
bool EnableVoiceActivation(bool bEnable)
Enable voice activation.
Definition: TeamTalk.cs:5471
const bool DEFAULT_WEBRTC_PREAMPLIFIER_ENABLE
Definition: TeamTalk.cs:1436
int DoChannelOpEx(int nUserID, int nChannelID, string szOpPassword, bool bMakeOperator)
Make another user operator of a channel using the szOpPassword of BearWare.Channel.
Definition: TeamTalk.cs:6931
bool Disconnect()
Disconnect from the server.
Definition: TeamTalk.cs:6579
bool HotKey_Register(int nHotKeyID, int[] lpnVKCodes)
Register a global hotkey.
Definition: TeamTalk.cs:8176
Progress is audio being injected as BearWare.StreamType.STREAMTYPE_VOICE.
Packet reception and data statistics for a user.
Definition: TeamTalk.cs:2447
bool SetSoundInputGainLevel(int nLevel)
Set voice gaining of recorded audio.
Definition: TeamTalk.cs:5150
Voice activation has triggered transmission.
int GetVoiceActivationLevel()
Get voice activation level.
Definition: TeamTalk.cs:5499
string szDeviceName
The name of the capture device.
Definition: TeamTalk.cs:694
static int GetWaveInVolume(int nWaveDeviceID, MixerControl nControl)
Get the volume of a Windows Mixer Wave-In device from the &#39;enum&#39; of devices.
Definition: TeamTalk.cs:9011
int DoRecvFile(int nChannelID, int nFileID, string szLocalFilePath)
Download a file from the specified channel.
Definition: TeamTalk.cs:7031
const int TT_STRLEN
The maximum length of all strings used in TeamTalkBase. This value includes the zero terminator...
Definition: TeamTalk.cs:4212
bool SetUserStoppedPlaybackDelay(int nUserID, StreamType nStreamType, int nDelayMSec)
Set the delay of when a user should no longer be considered as playing audio (either voice or audio f...
Definition: TeamTalk.cs:7856
If set the client instance is currently muxing audio streams into a single file. This is enabled by c...
bool SetVoiceActivationStopDelay(int nDelayMSec)
Set the delay of when voice activation should be stopped.
Definition: TeamTalk.cs:5515
int nBitRate
The bitrate at which the audio codec should output encoded audio data. Dividing it by 8 gives roughly...
Definition: TeamTalk.cs:959
bool InitSoundDuplexDevices(int nInputDeviceID, int nOutputDeviceID)
Enable duplex mode where multiple audio streams are mixed into a single stream using software...
Definition: TeamTalk.cs:5009
bool bMuteRightSpeaker
Whether to mute right speaker in stereo playback.
Definition: TeamTalk.cs:1259
DesktopProtocol
The protocols supported for transferring a BearWare.DesktopWindow.
Definition: TeamTalk.cs:751
bool bEnableDenoise
Whether clients who join the channel should automatically enable denoising.
Definition: TeamTalk.cs:1175
Command has syntax error. Only used internally.
Server does not allow file transfers.
int nTcpPort
The server&#39;s TCP port.
Definition: TeamTalk.cs:1940
AudioFileFormat nAudioFmt
The audio file format, e.g. wave or MP3.
Definition: TeamTalk.cs:584
static bool GetWaveOutName(int nWaveDeviceID, ref string szMixerName)
Get the name of the mixer associated with a wave-out device.
Definition: TeamTalk.cs:8905
int nStreamID
The stream ID provided in the BearWare.AudioBlock.
Definition: TeamTalk.cs:1700
StreamMediaFile OnStreamMediaFile
Media file being streamed to a channel is processing.
Definition: TeamTalk.cs:8726
bool bEnable
Enable WebRTC&#39;s fixed digital gain. WebRTC&#39;s automatic gain control (AGC)
Definition: TeamTalk.cs:1337
static bool GetSoundDevices(out SoundDevice[] lpSoundDevices)
Retrieve list of sound devices for recording and playback.
Definition: TeamTalk.cs:4752
Configure peer verification for encrypted connection.
Definition: TeamTalk.cs:2856
const float DEFAULT_WEBRTC_EXTRA_SAT_MARGIN_DB
Definition: TeamTalk.cs:1444
bool ReleaseUserAudioBlock(AudioBlock lpAudioBlock)
Release the shared memory of an BearWare.AudioBlock.
Definition: TeamTalk.cs:8090
User is allowed to forward video packets through server. TeamTalkBase.StartVideoCaptureTransmission()...
bool [] stereoPlaybackVoice
Check what speaker a user is outputting to. If index 0 is TRUE then left speaker is playing...
Definition: TeamTalk.cs:2416
Cannot apply BearWare.ChannelType.CHANNEL_HIDDEN to BearWare.Channel&#39;s channel type.
DesktopInput(bool set_defaults)
When true initializes the desktop input to ignore mouse and key values.
Definition: TeamTalk.cs:833
If set the client instance will start transmitting audio if the sound level is above the voice activa...
int nUserData
A user data field which can be used for additional information. The nUserData field of the BearWare...
Definition: TeamTalk.cs:2143
int nUdpServerSilenceSec
The number of seconds nothing has been received by the client on UDP.
Definition: TeamTalk.cs:3004
bool bEnable
Enable WebRTC echo canceller. The WebRTC echo canceller requires sound input and output devices are i...
Definition: TeamTalk.cs:1296
WebRTC&#39;s audio preprocessor.
Definition: TeamTalk.cs:1272
int nApplication
Application of encoded audio, VoIP or music.
Definition: TeamTalk.cs:1052
Subscribing to BearWare.StreamType.STREAMTYPE_VIDEOCAPTURE.
User saved server&#39;s configuration is logged to file by the server.
A struct containing the server&#39;s statistics, i.e. bandwidth usage and user activity.
Definition: TeamTalk.cs:1982
string szWindowTitle
The title of the window.
Definition: TeamTalk.cs:9203
static bool SetWaveInVolume(int nWaveDeviceID, MixerControl nControl, int nVolume)
Set the volume of a Windows Mixer Wave-In device from the &#39;enum&#39; of devices.
Definition: TeamTalk.cs:8999
long nVideoCaptureBytesRX
The number of bytes in video packets received by the server from clients.
Definition: TeamTalk.cs:2001
DesktopInput desktopinput
Definition: TeamTalk.cs:4058
int DoSubscribe(int nUserID, Subscription uSubscriptions)
Subscribe to user events and/or data.
Definition: TeamTalk.cs:7075
Translate from Windows scan-code to TTKEYCODE. The Windows scan-code can be retrieved in Windows&#39; WM_...
Configuration of WebRTC&#39;s echo canceller. See also TT_SetSoundDeviceEffects()
Definition: TeamTalk.cs:1289
Video stream type from a media file which is being streamed.
ChannelType uChannelType
A bitmask of the type of channel based on BearWare.ChannelType.
Definition: TeamTalk.cs:2616
int nTransferID
The ID identifying the file transfer.
Definition: TeamTalk.cs:2805
bool GetChannelUsers(int nChannelID, out User[] lpUsers)
Get the IDs of all users in a channel.
Definition: TeamTalk.cs:7628
int GetTransmitUserCount()
Get the number of users who can currently transmit to the BearWare.ChannelType.CHANNEL_CLASSROOM.
Definition: TeamTalk.cs:2746
static int GetMixerCount()
Get the number of Windows Mixers available.
Definition: TeamTalk.cs:8860
int nDeviceID
The ID of the sound device. Used for passing to TeamTalkBase.InitSoundInputDevice() and TeamTalkBase...
Definition: TeamTalk.cs:216
const bool DEFAULT_WEBRTC_VAD_ENABLE
Definition: TeamTalk.cs:1438
int DoUpdateChannel(Channel lpChannel)
Update a channel&#39;s properties.
Definition: TeamTalk.cs:7159
OPUS constants for BearWare.OpusCodec.
Definition: TeamTalk.cs:1085
ushort uMousePosY
The Y coordinate of the mouse. If used with TeamTalkBase.DesktopInput_Execute() and the mouse positio...
Definition: TeamTalk.cs:822
long nVideoCaptureBytesRecv
Video data received (on UDP).
Definition: TeamTalk.cs:2978
TextMsgType
Text message types.
Definition: TeamTalk.cs:2489
The progress of the audio currently being processed as audio input.
Definition: TeamTalk.cs:1697
int nMaxGainDB
Ensure volume doesn&#39;t become too loud (maximal gain in dB). Default is 30. Value is ignored if bEnabl...
Definition: TeamTalk.cs:1171
long nFileSize
The size of the file.
Definition: TeamTalk.cs:2836
Connection OnConnectionLost
Connection to server has been lost.
Definition: TeamTalk.cs:8290
string szLastModified
Timestamp of last modification of user account. Date/time is converted local time.
Definition: TeamTalk.cs:2170
User can broadcast text message of type BearWare.TextMsgType.MSGTYPE_BROADCAST to all users...
Shortcut to allow both audio and video media files.
If set user is streaming a media file. If this flag changes the event BearWare.ClientEvent.CLIENTEVENT_USER_STATECHANGE is posted.
long nMediaFileVideoFramesLost
Media file video frames which couldn&#39;t be shown because packets were lost.
Definition: TeamTalk.cs:2475
MediaFileStatus nStatus
Status of media file if it&#39;s being saved to disk.
Definition: TeamTalk.cs:1659
string szPassword
Password to join the channel. When extracted through TeamTalkBase.GetChannel() the password will only...
Definition: TeamTalk.cs:2611
VideoFormat [] videoFormats
The supported capture formats.
Definition: TeamTalk.cs:711
UserUpdate OnCmdUserLoggedIn
A new user logged on to the server.
Definition: TeamTalk.cs:8418
int DoBanIPAddress(string szIPAddress, int nChannelID)
Issue a ban command on an IP-address user.
Definition: TeamTalk.cs:7395
User&#39;s status is logged to file by the server.
static bool GetDefaultSoundDevicesEx(SoundSystem nSndSystem, ref int lpnInputDeviceID, ref int lpnOutputDeviceID)
Get the default sound devices for the specified sound system.
Definition: TeamTalk.cs:4738
User joined a channel is logged to file by the server.
bool GetUserStatistics(int nUserID, ref UserStatistics lpUserStatistics)
Get statistics for data and packet reception from a user.
Definition: TeamTalk.cs:7793
Aborted processing of media file.
BitmapFormat bmpFormat
The format of the bitmap.
Definition: TeamTalk.cs:772
int nDefaultSampleRate
The default sample rate for the sound device.
Definition: TeamTalk.cs:263
bool bStereoPlayback
Playback should be done in stereo. Doing so will disable 3d-positioning.
Definition: TeamTalk.cs:982
SpeexCodec speex
Speex codec settings if nCodec is BearWare.Codec.SPEEX_CODEC.
Definition: TeamTalk.cs:1577
long nMediaFileVideoPacketsRecv
Number of media file video packets received from user. A video frame can consist of several video pac...
Definition: TeamTalk.cs:2470
bool HotKey_Unregister(int nHotKeyID)
Unregister a registered hotkey.
Definition: TeamTalk.cs:8185
long nUdpBytesRecv
Bytes received on UDP.
Definition: TeamTalk.cs:2970
If set the client instance has muted all users.
int nStreamID
A unique identifier for the frames which are part of the same video sequence. If the stream ID change...
Definition: TeamTalk.cs:664
If set the user&#39;s voice is muted.
A button was pressed or released on the user&#39;s keyboard or mouse.
A file transfer is processing.
int nSource
The source of the event depends on wmMsg.
Definition: TeamTalk.cs:3999
User can move users from one channel to another.
int nGainLevel
A value from 0 to 32768. Default is 8000. Value is ignored if bEnableAGC is FALSE.
Definition: TeamTalk.cs:1155
The client instance is in closed state, i.e. no operations has been performed on it.
bool bVerifyPeer
Verify that peer (client or server) uses a certificate that has been generated by the Certificate Aut...
Definition: TeamTalk.cs:2884
The BearWare.SoundDevice can enable denoising. Enable denoising use property bEnableDenoising on Bear...
AudioPreprocessorType nPreprocessor
The audio preprocessor to use in the union of audio preprocessors.
Definition: TeamTalk.cs:1476
int nUsersPeak
The highest numbers of users online.
Definition: TeamTalk.cs:2017
string szChannelPath
Channel where user was located when banned.
Definition: TeamTalk.cs:2060
string szIPAddress
IP-address of banned user.
Definition: TeamTalk.cs:2057
DesktopProtocol nProtocol
The desktop protocol used for transmitting the desktop window.
Definition: TeamTalk.cs:784
int nUsersServed
The number of users who have logged on to the server.
Definition: TeamTalk.cs:2015
Cannot join same channel twice.
User&#39;s private text messages are logged to file by the server.
int nWndY
Y coordinate of the window relative to the Windows desktop.
Definition: TeamTalk.cs:9196
Intercept all custom text messages sent by user. Only user-type BearWare.UserType.USERTYPE_ADMIN can do this.
int nHeight
The height in pixels of the window.
Definition: TeamTalk.cs:9200
const float DEFAULT_WEBRTC_MAXGAIN_DBSEC
Definition: TeamTalk.cs:1445
bool bMuteLeftSpeaker
Whether to mute left speaker in stereo playback.
Definition: TeamTalk.cs:1257
Used internally to denote an unauthenticated user.
static int DesktopInputKeyTranslate(TTKeyTranslate nTranslate, DesktopInput[] lpDesktopInputs, out DesktopInput[] lpTranslatedDesktopInputs)
Translate platform key-code to and from TeamTalk&#39;s intermediate format.
Definition: TeamTalk.cs:9258
const float DEFAULT_WEBRTC_MAX_OUT_NOISE
Definition: TeamTalk.cs:1446
Invalid password for becoming channel operator.
uint uVersion
The user&#39;s client version. This property is set by the server and will not change after login...
Definition: TeamTalk.cs:2336
static string GetVersion()
Get the DLL&#39;s version number.
Definition: TeamTalk.cs:4328
User uploaded a file is logged to file by the server.
Intercept all user text messages sent by a user. Only user-type BearWare.UserType.USERTYPE_ADMIN can do this.
ListBannedUser OnCmdBannedUser
A new banned user has been listed by the server. Event handler for BearWare.ClientEvent.CLIENTEVENT_CMD_BANNEDUSER.
Definition: TeamTalk.cs:8531
bool StartVideoCaptureTransmission(VideoCodec lpVideoCodec)
Start transmitting from video capture device.
Definition: TeamTalk.cs:5704
If set the client instance is connected to a server, i.e. BearWare.ClientEvent.CLIENTEVENT_CON_SUCCES...
Class used to load TeamTalk5.dll and instantiate a TeamTalk client in TeamTalk 5 SDK Standard Edition...
Definition: TeamTalk.cs:8762
int DoListUserAccounts(int nIndex, int nCount)
Issue command to list user accounts on the server.
Definition: TeamTalk.cs:7252
TTKeyTranslate
Translate to and from TeamTalk&#39;s intermediate key-codes (TTKEYCODE).
Definition: TeamTalk.cs:8798
int DoBanUserEx(int nUserID, BanType uBanTypes)
Ban the user with nUserID using the ban types specified.
Definition: TeamTalk.cs:7347
Intercept all video sent by a user. Only user-type BearWare.UserType.USERTYPE_ADMIN can do this...
static int GetWaveOutMute(int nWaveDeviceID, MixerControl nControl)
Get the mute state of a Windows Mixer Wave-Out device from the &#39;enum&#39; of devices. ...
Definition: TeamTalk.cs:8940
Subscribing to channel texxt messages.
No codec specified.
IntPtr frameBuffer
A buffer pointing to the bitmap data (often refered to as Scan0).
Definition: TeamTalk.cs:786
int DoLoginEx(string szNickname, string szUsername, string szPassword, string szClientName)
Logon to a server.
Definition: TeamTalk.cs:6707
long nFilesTx
The number of bytes for file transmission transmitted from the server.
Definition: TeamTalk.cs:2020
string szNickname
The user&#39;s nickname. Invoking TeamTalkBase.DoChangeNickname() changes this value. Event BearWare...
Definition: TeamTalk.cs:2360
long nVideoCapturePacketsRecv
Number of video packets received from user. A video frame can consist of several video packets...
Definition: TeamTalk.cs:2455
VideoFormat videoFmt
The video properties of the media file.
Definition: TeamTalk.cs:1666
bool GetUserJitterControl(int nUserID, StreamType nStreamType, ref JitterConfig lpJitterConfig)
Get the de-jitter configuration for a user.
Definition: TeamTalk.cs:7904
bool EnableVoiceTransmission(bool bEnable)
Start/stop transmitting of voice data from sound input.
Definition: TeamTalk.cs:5441
ServerStats OnCmdServerStatistics
Server statistics available.
Definition: TeamTalk.cs:8502
string szAccessToken
A randomly generated 256 bit access token created by the server to identify the login session...
Definition: TeamTalk.cs:1965
User disconnected from server is logged to file by the server.
If set the client instance is logged on to a server, i.e. got BearWare.ClientEvent.CLIENTEVENT_CMD_MYSELF_LOGGEDIN event after issueing TeamTalkBase.DoLogin().
FourCC picFourCC
Picture format for capturing.
Definition: TeamTalk.cs:640
Cannot leave channel because not in channel.
float fGainDB
Gain level in dB. Range: 0 <= x < 50. Default: 0.
Definition: TeamTalk.cs:1345
const int DEFAULT_AGC_INC_MAXDB
Definition: TeamTalk.cs:1493
User can send private text messages, i.e. BearWare.TextMsgType.MSGTYPE_CHANNEL.
static bool AddAppException(string szName, string szExecutable)
Add an application to the Windows Firewall exception list.
Definition: TeamTalk.cs:9165
Users are allowed to forward audio packets through server. TeamTalkBase.EnableVoiceTransmission() ...
int nWidth
The width in pixels of the video device supported video format.
Definition: TeamTalk.cs:627
const int TT_TRANSMITUSERS_MAX
The maximum number of users allowed to transmit when a BearWare.Channel is configured with BearWare...
Definition: TeamTalk.cs:4231
int nMaxDesktopTxPerSecond
The maximum number of bytes per second which the server will allow for desktop packets. If this value is exceeded the server will start dropping desktop packets. 0 = disabled.
Definition: TeamTalk.cs:1932
int DoLeaveChannel()
Leave the current channel.
Definition: TeamTalk.cs:6818
VideoFrame AcquireUserMediaVideoFrame(int nUserID, out Bitmap bmp)
Extract a user&#39;s media video frame for display.
Definition: TeamTalk.cs:6124
AudioInput OnAudioInput
Audio input progress as result of TeamTalkBase.InsertAudioBlock()
Definition: TeamTalk.cs:8744
int nSampleRate
Sample rate of media file.
Definition: TeamTalk.cs:586
The BearWare.SoundDevice can run in duplex mode.
The BearWare.SoundDevice can enable Automatic Gain Control (AGC). Enable AGC use property bEnableAGC ...
Used to denote nothing selected.
int nUdpPort
The server&#39;s UDP port.
Definition: TeamTalk.cs:1942
Value for specifying that no audio preprocessing should occur.
Maximum number of file transfers exceeded.
A User to channel text message. Users of type BearWare.UserType.USERTYPE_DEFAULT can only send this t...
int [] autoOperatorChannels
Channels where this user will automatically become channel operator when joining. The channels must b...
Definition: TeamTalk.cs:2157
WebRTCAudioPreprocessor webrtc
Used when nPreprocessor is BearWare.AudioPreprocessorType.WEBRTC_AUDIOPREPROCESSOR.
Definition: TeamTalk.cs:1485
int nTcpServerSilenceSec
The number of seconds nothing has been received by the client on TCP.
Definition: TeamTalk.cs:3001
Configuration of WebRTC&#39;s noise suppression. See also BearWare.SpeexDSP.
Definition: TeamTalk.cs:1303
User failed to log in is logged to file by the server.
string szOwner
The username of the user who made the ban.
Definition: TeamTalk.cs:2074
UserAccount useraccount
Definition: TeamTalk.cs:4072
int rc_target_bitrate
Target bitrate in kbits/sec. This value must be greater than 0.
Definition: TeamTalk.cs:1519
If set the user is currently talking. If this flag changes the event BearWare.ClientEvent.CLIENTEVENT_USER_STATECHANGE is posted.
int nMaxAdaptiveDelayMSec
A hard maximum delay on the adaptive delay. Only valid when higher than zero. Default = 0...
Definition: TeamTalk.cs:3033
AudioBlock AcquireUserAudioBlock(StreamType uStreamTypes, int nUserID)
Extract the raw audio associated with the event TeamTalkBase.OnUserAudioBlock().
Definition: TeamTalk.cs:8065
CommandSuccess OnCmdSuccess
The server successfully processed a command issued by the local client instance.
Definition: TeamTalk.cs:8357
ChannelUpdate OnCmdChannelUpdate
A channel&#39;s properties has been updated.
Definition: TeamTalk.cs:8478
long nMediaFileVideoFramesRecv
Number of media file video frames received from user.
Definition: TeamTalk.cs:2472
int GetMyChannelID()
Get the channel which the local client instance is currently participating in.
Definition: TeamTalk.cs:7576
WebM video codec settings.
Definition: TeamTalk.cs:1508
string szUsername
The szUsername of the user&#39;s BearWare.UserAccount. A user account is created by calling TeamTalkBase...
Definition: TeamTalk.cs:2318
const float DEFAULT_WEBRTC_INIT_SAT_MARGIN_DB
Definition: TeamTalk.cs:1443
User&#39;s status is locked. TeamTalkBase.DoChangeStatus() cannot be used.
int nVolumeMediaFile
The user&#39;s voice volume level. Note that it&#39;s a virtual volume which is being set since the master vo...
Definition: TeamTalk.cs:2390
static bool SetWaveInSelected(int nWaveDeviceID, MixerControl nControl)
Set the selected state of a Windows Mixer Wave-In device from the &#39;enum&#39; of devices.
Definition: TeamTalk.cs:8975
A struct containing the properties of the server&#39;s settings.
Definition: TeamTalk.cs:1888
RemoteFile remotefile
Definition: TeamTalk.cs:4064
const float DEFAULT_WEBRTC_PREAMPLIFIER_GAINFACTOR
Definition: TeamTalk.cs:1437
bool bEnable
Enable WebRTC noise suppression.
Definition: TeamTalk.cs:1306
AudioConfig audiocfg
The audio configuration which users who join the channel should use.
Definition: TeamTalk.cs:2633
Abstract class which encapsulates the TeamTalk 5 client. Instantiate either BearWare.TeamTalk5 (TeamTalk 5 SDK Standard Edition) or BearWare.TeamTalk5Pro (TeamTalk 5 SDK Professional Edition) to create the TeamTalk instance.
Definition: TeamTalk.cs:4202
Stream type for audio of local playback.
bool GetUser(int nUserID, ref User lpUser)
Get the user with the specified ID.
Definition: TeamTalk.cs:7784
bool SetVoiceActivationLevel(int nLevel)
Set voice activation level.
Definition: TeamTalk.cs:5489
A struct containing the properties of a channel.
Definition: TeamTalk.cs:2593
Subscription uPeerSubscriptions
A bitmask of what this user subscribes to from local client instance. Invoking TeamTalkBase.DoSubscribe() and TeamTalkBase.DoUnsubscribe() on the remoe client instance can change this value. Event BearWare.ClientEvent.CLIENTEVENT_CMD_USER_UPDATE is posted if this value changes.
Definition: TeamTalk.cs:2354
IP-address has been banned from server.
int nActiveAdaptiveDelayMSec
The current adaptive delay. When used with TeamTalkBase.SetUserJitterControl(), this value is used as...
Definition: TeamTalk.cs:3040
int DoSaveConfig()
Save the server&#39;s current state to its settings file (typically the server&#39;s .xml file)...
Definition: TeamTalk.cs:7480
NewAudioBlock OnUserAudioBlock
A new audio block can be extracted.
Definition: TeamTalk.cs:8617
int nChannelID
The ID of the channel where the file is located.
Definition: TeamTalk.cs:2829
TTAudioPreprocessor ttpreprocessor
Used when nPreprocessor is BearWare.AudioPreprocessorType.TEAMTALK_AUDIOPREPROCESSOR.
Definition: TeamTalk.cs:1482
int nWidth
The width in pixels of the bitmap.
Definition: TeamTalk.cs:768
A media file recording has changed status.
string szMediaStorageDir
Store audio received from this user to this folder.
Definition: TeamTalk.cs:2378
TeamTalkBase(bool poll_based)
Create a new TeamTalk client instance.
Definition: TeamTalk.cs:4340
long nDesktopBytesRecv
Desktop data received (on UDP).
Definition: TeamTalk.cs:2990
MyselfLoggedIn OnCmdMyselfLoggedIn
The client instance successfully logged on to server.
Definition: TeamTalk.cs:8374
Intercept all desktop data sent by a user. Only user-type BearWare.UserType.USERTYPE_ADMIN can do thi...
int nTimeOutTimerMediaFileMSec
Time out timer for media file stream. The maximum time in miliseconds a user can transmit a media fil...
Definition: TeamTalk.cs:2715
User&#39;s broadcast text messages are logged to file by the server.
LocalMediaFile OnLocalMediaFile
Media file is being played locally.
Definition: TeamTalk.cs:8735
string szFileName
Name of file.
Definition: TeamTalk.cs:1662
The BearWare.SoundDevice can position user in 3D.
int DoBan(BannedUser lpBannedUser)
Ban the properties specified in lpBannedUser.
Definition: TeamTalk.cs:7370
string szClientName
The name of the client application which the user is using. This is the value passed as szClientName ...
Definition: TeamTalk.cs:2439
If set the client instance is currently try to connect to a server, i.e. TeamTalkBase.Connect() has been called.
StreamType
The types of streams which are available for transmission.
Definition: TeamTalk.cs:44
UserUpdate OnCmdUserLoggedOut
A user logged out of the server.
Definition: TeamTalk.cs:8428
long nMediaFileVideoBytesRecv
Video from media file data received (on UDP).
Definition: TeamTalk.cs:2986
void AddTransmitUser(int nUserID, StreamType uStreamType)
Helper function for adding a user and BearWare.StreamType to transmitUsers.
Definition: TeamTalk.cs:2719
ServerLogEvent
Events that are logged by the server, i.e. written to server&#39;s log file.
Definition: TeamTalk.cs:1820
const bool DEFAULT_WEBRTC_NOISESUPPRESS_ENABLE
Definition: TeamTalk.cs:1447
If set the client instance current have an active desktop session, i.e. TeamTalkBase.SendDesktopWindow() has been called. Call TeamTalkBase.CloseDesktopWindow() to close the desktop session.
A struct containing the properties of an event.
Definition: TeamTalk.cs:3994
int nUdpConnectTimeoutMSec
The duration before the client instance should give up trying to connect to the server on UDP...
Definition: TeamTalk.cs:2957
const int DEFAULT_ECHO_SUPPRESS
Definition: TeamTalk.cs:1499
Struct used for specifying the video codec to use.
Definition: TeamTalk.cs:1634
User is allowed to stream audio files to channel.
long nVoicePacketsLost
Number of voice packets lost from user.
Definition: TeamTalk.cs:2452
Connection to server has been lost.
Configuration of WebRTC&#39;s voice detection.
Definition: TeamTalk.cs:1315
ServerUpdate OnCmdServerUpdate
Server has updated its settings (server name, MOTD, etc.)
Definition: TeamTalk.cs:8493
If set the client is currently streaming the audio of a media file. When streaming a video file the B...
bool bEnable
Use WebRTC&#39;s voice detection to trigger BearWare.TeamTalkBase.OnVoiceActivation.
Definition: TeamTalk.cs:1326
Hidden channel which can only be seen with BearWare.UserRight.USERRIGHT_VIEW_HIDDEN_CHANNELS.
bool bEnableEchoCancellation
Enable echo cancellation.
Definition: TeamTalk.cs:331
A struct containing the properties of a banned user.
Definition: TeamTalk.cs:2053
static bool SetLicenseInformation(string szRegName, string szRegKey)
Set license information to disable trial mode.
Definition: TeamTalk.cs:4523
LevelEstimation levelestimation
Definition: TeamTalk.cs:1380
static bool GetWaveInControlName(int nWaveDeviceID, int nControlIndex, ref string szDeviceName)
Get the name of the Wave-In device with the specified index.
Definition: TeamTalk.cs:9077
Invalid username for BearWare.UserAccount.
User&#39;s custom text messages are logged to file by the server.
bool SetSoundOutputVolume(int nVolume)
Set master volume.
Definition: TeamTalk.cs:5231
ChannelType
The types of channels supported.
Definition: TeamTalk.cs:2545
static bool GetVideoCaptureDevices(out VideoCaptureDevice[] lpVideoDevices)
Get the list of devices available for video capture.
Definition: TeamTalk.cs:5729
Default values for BearWare.SpeexDSP.
Definition: TeamTalk.cs:1489
A new audio block can be extracted.
Struct describing the audio and video format used by a media file.
Definition: TeamTalk.cs:1655
A struct containing the properties of a video capture device.
Definition: TeamTalk.cs:687
bool GetMyUserAccount(ref UserAccount lpUserAccount)
Get the local client instance&#39;s BearWare.UserAccount.
Definition: TeamTalk.cs:7718
TextMsgType nMsgType
The type of text message.
Definition: TeamTalk.cs:2518
bool bDTX
Enable/disable discontinuous transmission. When enabled Speex will ignore silence, so the bitrate will become very low.
Definition: TeamTalk.cs:967
int nChannelID
The channel&#39;s ID. A value from 1 - BearWare.TeamTalkBase.TT_CHANNELID_MAX.
Definition: TeamTalk.cs:2600
int DoJoinChannelByID(int nChannelID, string szPassword)
Join an existing channel.
Definition: TeamTalk.cs:6795
User is allowed to create temporary channels which disappear when last user leaves the channel...
bool bEnableAGC
Whether clients who join a BearWare.Channel should enable AGC with the settings specified nGainLevel...
Definition: TeamTalk.cs:1151
User logged in is logged to file by the server.
static bool AppExceptionExists(string szExecutable)
Check if an executable is already in the Windows Firewall exception list.
Definition: TeamTalk.cs:9152
A struct containing the properties of a file transfer.
Definition: TeamTalk.cs:2800
bool GetChannelFiles(int nChannelID, out RemoteFile[] lpRemoteFiles)
Get the list of the files in a channel which can be downloaded.
Definition: TeamTalk.cs:7645
User can upload files to channels.
int GetMyUserID()
Get the local client instance&#39;s user ID.
Definition: TeamTalk.cs:7703
int SendDesktopWindowFromHWND(System.IntPtr hWnd, BitmapFormat nBitmapFormat, DesktopProtocol nDesktopProtocol)
Transmit the specified window in a desktop session.
Definition: TeamTalk.cs:6257
bool InitSoundOutputSharedDevice(int nSampleRate, int nChannels, int nFrameSize)
Setup sample rate, channels and frame size of shared sound output device.
Definition: TeamTalk.cs:4972
If set the user currently has an active desktop session. If this flag changes the event BearWare...
VoiceActivation OnVoiceActivation
Voice activation has triggered transmission.
Definition: TeamTalk.cs:8636
IntPtr hWnd
The Windows handle of the window.
Definition: TeamTalk.cs:9192
A hotkey has been acticated or deactivated.
int DoUpdateServer(ServerProperties lpServerProperties)
Update server properties.
Definition: TeamTalk.cs:7224
Desktop input (mouse or keyboard input) has been received from a user.
int nFPS_Numerator
The numerator of the video capture device&#39;s video format. Divinding nFPS_Numerator with nFPS_Denomina...
Definition: TeamTalk.cs:634
The maximum number of logins allowed per IP-address has been exceeded.
bool UpdateLocalPlayback(int nPlaybackSessionID, MediaFilePlayback lpMediaFilePlayback)
Definition: TeamTalk.cs:6073
int DoDeleteFile(int nChannelID, int nFileID)
Delete a file from a channel.
Definition: TeamTalk.cs:7057
bool SetUserVolume(int nUserID, StreamType nStreamType, int nVolume)
Set the volume of a user.
Definition: TeamTalk.cs:7825
The server does not support the audio codec specified by the client. Introduced in version 4...
int DoSendFile(int nChannelID, string szLocalFilePath)
Send a file to the specified channel.
Definition: TeamTalk.cs:6998
bool SetUserMute(int nUserID, StreamType nStreamType, bool bMute)
Mute a user.
Definition: TeamTalk.cs:7840
const bool DEFAULT_ECHO_ENABLE
Definition: TeamTalk.cs:1498
Invalid username or password for account.
int [] inputSampleRates
Supported sample rates by device for recording. A zero value terminates the list of supported sample ...
Definition: TeamTalk.cs:256
string szOpPassword
Password to become channel operator.
Definition: TeamTalk.cs:2626
int GetChannelIDFromPath(string szChannelPath)
Get the channel ID of the supplied path. Channels are separated by &#39;/&#39;.
Definition: TeamTalk.cs:7616
string szFromUsername
The originators username.
Definition: TeamTalk.cs:2523
SpeexDSP(bool set_defaults)
Definition: TeamTalk.cs:1212
static string GetErrorMessage(ClientError nError)
Get textual discription of an error message.
Definition: TeamTalk.cs:8141
int DoMakeChannel(Channel lpChannel)
Make a new channel on the server.
Definition: TeamTalk.cs:7123
long nUptimeMSec
The server&#39;s uptime in msec.
Definition: TeamTalk.cs:2025
int nGainLevel
Gain level between BearWare.SoundLevel.SOUND_GAIN_MIN and BearWare.SoundLevel.SOUND_GAIN_MAX. Default is BearWare.SoundLevel.SOUND_GAIN_DEFAULT (no gain).
Definition: TeamTalk.cs:1255
int DoKickUser(int nUserID, int nChannelID)
Kick user from either channel or server.
Definition: TeamTalk.cs:6960
bool bKeyFrame
Whether the image acquired is a key-frame. If it is not a key-frame and there has been packet loss or...
Definition: TeamTalk.cs:669
Windows legacy audio system. Should be used on Windows Mobile.
static bool GetWaveInControlSelected(int nWaveDeviceID, int nControlIndex)
Get the selected state of a Wave-In device in the Windows Mixer.
Definition: TeamTalk.cs:9109
Subscribing to custom user messages.
int nMaxInputChannels
The maximum number of input channels.
Definition: TeamTalk.cs:249
ListUserAccount OnCmdUserAccount
A new user account has been listed by the server. Event handler for BearWare.ClientEvent.CLIENTEVENT_CMD_USERACCOUNT.
Definition: TeamTalk.cs:8524
int nUserID
The user&#39;s ID. A value from 1 - BearWare.TeamTalkBase.TT_USERID_MAX. This property is set by the serv...
Definition: TeamTalk.cs:2312
void ProcessMsg(TTMessage msg)
Event handler for BearWare.TTMessage.
Definition: TeamTalk.cs:4532
const int TT_CHANNELS_OPERATOR_MAX
Definition: TeamTalk.cs:4299
bool PumpMessage(ClientEvent nClientEvent, int nIdentifier)
Cause client instance event thread to schedule an update event.
Definition: TeamTalk.cs:4487
uint uReserved
Reserved. To preserve alignment.
Definition: TeamTalk.cs:4003
string szDeviceName
The name of the sound device.
Definition: TeamTalk.cs:221
FileUpdate OnCmdFileRemove
A file has been removed from a channel.
Definition: TeamTalk.cs:8517
Properties to prevent server abuse.
Definition: TeamTalk.cs:2101
AudioPreprocessor audioPreprocessor
Option to activate audio preprocessor on local media file playback.
Definition: TeamTalk.cs:1691
string szNote
Additional notes about this user.
Definition: TeamTalk.cs:2146
bool Connect(string szHostAddress, int nTcpPort, int nUdpPort, int nLocalTcpPort, int nLocalUdpPort, bool bEncrypted)
Connect to a server.
Definition: TeamTalk.cs:6495
BearWare.UserRight GetMyUserRights()
Convenience method for TeamTalkBase.GetMyUserAccount()
Definition: TeamTalk.cs:7754
string szTopic
Topic of the channel.
Definition: TeamTalk.cs:2606
Helper class for extracting Windows HWND handles and controlling mouse and keyboard.
Definition: TeamTalk.cs:9209
The client instance successfully logged on to server.
OPUS audio codec settings. For detailed information about the OPUS codec check out http://www...
Definition: TeamTalk.cs:1042
Struct describing the audio format used by a media file.
Definition: TeamTalk.cs:581
int DoNewUserAccount(UserAccount lpUserAccount)
Issue command to create a new user account on the server.
Definition: TeamTalk.cs:7278
WebRTCAudioPreprocessor(bool set_defaults)
Definition: TeamTalk.cs:1382
UserType uUserType
The uUserType of the user&#39;s BearWare.UserAccount. This property is set by the server and will not cha...
Definition: TeamTalk.cs:2327
Speex audio codec settings for Constant Bitrate mode (CBR).
Definition: TeamTalk.cs:909
AudioFileFormat
Media file formats supported for muxed audio recordings.
Definition: TeamTalk.cs:542
int nCommandsIntervalMSec
Commands within given interval.
Definition: TeamTalk.cs:2114
bool bEnableDenoise
Enable noise suppression.
Definition: TeamTalk.cs:315
long nVoiceBytesRX
The number of bytes in audio packets received by the server from clients.
Definition: TeamTalk.cs:1995
int nErrorNo
Error number based on BearWare.ClientError.
Definition: TeamTalk.cs:3359
A user account has been received from the server.
int nBufferMSecMediaFile
The size of the buffer (in msec) to hold media file content.
Definition: TeamTalk.cs:2430
User&#39;s IP-address is logged to file by serer.
OPUS audio codec.
bool [] stereoPlaybackMediaFile
Check what speaker a user is outputting to. If index 0 is TRUE then left speaker is playing...
Definition: TeamTalk.cs:2422
int nVerifyDepth
Set limit to depth in the certificate chain during the verification procedure.
Definition: TeamTalk.cs:2903
The client instance was kicked from a channel.
ServerLogEvent uServerLogEvents
The events that are logged on the server.
Definition: TeamTalk.cs:1971
long nVoicePacketsRecv
Number of voice packets received from user.
Definition: TeamTalk.cs:2450
The selected BearWare.AudioCodec exceeds what the server allows.
int nWndX
X coordinate of the window relative to the Windows desktop.
Definition: TeamTalk.cs:9194
Subscribing to user text messages.
A user has sent the position of the mouse cursor.
If set the client instance will auto position users in a 180 degree circle using 3D-sound. This option is only available with BearWare.SoundSystem.SOUNDSYSTEM_DSOUND.
AudioFormat audioFmt
The audio properties of the media file.
Definition: TeamTalk.cs:1664
Store audio in the same format as the BearWare.Channel&#39;s configured audio codec.
int nUserTimeout
The number of seconds before a user who hasn&#39;t responded to keepalives will be kicked off the server...
Definition: TeamTalk.cs:1945
Cannot upload file because disk quota will be exceeded.
The maximum size of the payload put into UDP packets has been updated.
A command issued by TeamTalkBase.Do* methods is being processed.
bool PaintVideoFrameEx(int nUserID, System.IntPtr hDC, int XDest, int YDest, int nDestWidth, int nDestHeight, int XSrc, int YSrc, int nSrcWidth, int nSrcHeight, ref VideoFrame lpVideoFrame)
Paint user&#39;s video frame using a Windows&#39; DC (device context).
Definition: TeamTalk.cs:5827
bool EnableAudioBlockEvent(int nUserID, StreamType uStreamTypes, AudioFormat lpAudioFormat, bool bEnable)
Same as TeamTalkBase.EnableAudioBlockEvent() but option to specify audio output format.
Definition: TeamTalk.cs:5380
bool bFEC
Forward error correction. Corrects errors if there&#39;s packetloss.
Definition: TeamTalk.cs:1058
int nRcTargetBitrate
Same as rc_target_bitrate.
Definition: TeamTalk.cs:1512
int nMaxUsers
The maximum number of users allowed on the server. A user with admin account can ignore this...
Definition: TeamTalk.cs:1909
int nUdpPingTimeMs
Response time to server on UDP (based on ping/pong sent at a specified interval. Set to -1 if not cur...
Definition: TeamTalk.cs:2994
User was kicked is logged to file by the server.
AudioPreprocessorType
The types of supported audio preprocessors.
Definition: TeamTalk.cs:1456
int nFrameBufferSize
The size in bytes of the buffer allocate in frameBuffer.
Definition: TeamTalk.cs:674
string szErrorMsg
Text message describing the error.
Definition: TeamTalk.cs:3362
bool StartRecordingMuxedAudioFile(AudioCodec lpAudioCodec, string szAudioFileName, AudioFileFormat uAFF)
Store all audio conversations with specific BearWare.AudioCodec settings to a single file...
Definition: TeamTalk.cs:5576
User downloaded a file is logged to file by the server.
CommandProcessing OnCmdProcessing
A command issued by Do* methods is being processed.
Definition: TeamTalk.cs:8327
int nToUserID
Set to zero if channel message.
Definition: TeamTalk.cs:2525
int nFPS_Denominator
The denominator of the video capture device&#39;s video format. Divinding nFPS_Numerator with nFPS_Denomi...
Definition: TeamTalk.cs:638
A default channel is a channel which disappears after the last user leaves the channel.
long nTotalBytesTX
The number of bytes sent from the server to clients.
Definition: TeamTalk.cs:1986
const bool DEFAULT_WEBRTC_GAINCTL_ENABLE
Definition: TeamTalk.cs:1440
Subscribing to BearWare.StreamType.STREAMTYPE_VOICE.
BearWare.SoundDeviceEffects failed to initialize.
If set the user currently has an active video stream. If this flag changes the event BearWare...
MediaFileStatus
Status of media file being written to disk.
Definition: TeamTalk.cs:521
static bool RestartSoundSystem()
Reinitialize sound system (in order to detect new/removed devices).
Definition: TeamTalk.cs:4776
bool HotKey_RemoveTestHook()
Remove the test hook again so the OnHotKeyTest event will no longer be notified.
Definition: TeamTalk.cs:8226
static bool GetDefaultSoundDevices(ref int lpnInputDeviceID, ref int lpnOutputDeviceID)
Get the default sound devices.
Definition: TeamTalk.cs:4729
bool QueryMaxPayload(int nUserID)
Query the maximum size of UDP data packets to the user or server.
Definition: TeamTalk.cs:6592
FileUpdate OnCmdFileNew
A new file is added to a channel.
Definition: TeamTalk.cs:8511
User can download files from channels.
Media file being streamed to a channel is processing.
bool StartStreamingMediaFileToChannel(string szMediaFilePath, MediaFilePlayback lpMediaFilePlayback, VideoCodec lpVideoCodec)
Stream media file to channel, e.g. avi-, wav- or MP3-file.
Definition: TeamTalk.cs:5990
FourCC
The picture format used by a capture device.
Definition: TeamTalk.cs:601
int DoPing()
Ping server and wait for server to reply.
Definition: TeamTalk.cs:6657
bool CancelFileTranfer(int nTransferID)
Cancel an active file transfer.
Definition: TeamTalk.cs:8126
uint uSampleIndex
The index of the first sample in lpRawAudio. Its value will be a multiple of nSamples. The sample index can be used to detect overflows of the internal buffer. When a user initially starts talking the nSampleIndex will be 0 and while the user is talking nSampleIndex will be greater than 0. When the user stops talking nSampleIndex will be reset to 0 again.
Definition: TeamTalk.cs:497
int DoUnsubscribe(int nUserID, Subscription uSubscriptions)
Unsubscribe to user events/data. This can be used to ignore messages or voice data from a specific us...
Definition: TeamTalk.cs:7094
The server uses a protocol which is incompatible with the client instance.
Subscribing to BearWare.StreamType.STREAMTYPE_DESKTOP.
A struct containing a mouse or keyboard event.
Definition: TeamTalk.cs:813
int DoBanUser(int nUserID, int nChannelID)
Issue a ban command on a user in a specific channel.
Definition: TeamTalk.cs:7331
bool ConnectSysID(string szHostAddress, int nTcpPort, int nUdpPort, int nLocalTcpPort, int nLocalUdpPort, bool bEncrypted, string szSystemID)
Same as Connect() but the option of providing a unique system-ID.
Definition: TeamTalk.cs:6529
uint uElapsedMSec
The elapsed time of the media file in miliseconds.
Definition: TeamTalk.cs:1670
int nStatusMode
The user&#39;s current status mode. Invoke TeamTalkBase.DoChangeStatus() to change this value...
Definition: TeamTalk.cs:2365
PulseAudio API. PulseAudio is typically used on Ubuntu 22.
Translate from Mac OS X Carbon kVK_* key-code to TTKEYCODE. The Mac OS X key-codes are defined in Car...
long nVideoCaptureFramesRecv
Number of video frames received from user.
Definition: TeamTalk.cs:2457
Struct used for specifying which audio codec a channel uses.
Definition: TeamTalk.cs:1568
int nQuality
A value from 1-10. As of DLL version 4.2 also 0 is supported.
Definition: TeamTalk.cs:918
int nActiveAdaptiveDelayMSec
The currently active adaptive jitter delay for received voice streams for this user.
Definition: TeamTalk.cs:2434
A struct containing the properties of a video capture format.
Definition: TeamTalk.cs:623
static bool SetWaveInControlSelected(int nWaveDeviceID, int nControlIndex)
Set the selected state of a Wave-In device in the Windows Mixer.
Definition: TeamTalk.cs:9096
static bool SetWaveOutVolume(int nWaveDeviceID, MixerControl nControl, int nVolume)
Set the volume of a Windows Mixer Wave-Out device from the &#39;enum&#39; of devices.
Definition: TeamTalk.cs:8952
BearWare.ClientFlag GetFlags()
Get a bitmask describing the client&#39;s current state.
Definition: TeamTalk.cs:4501
long nVideoCaptureBytesTX
The number of bytes in video packets sent from the server to clients.
Definition: TeamTalk.cs:1998
Only one user can transmit at a time.
The BearWare.SoundDevice is the default communication device. This feature is only supported on BearW...
UserRecordMediaFile OnUserRecordMediaFile
An media file recording has changed status.
Definition: TeamTalk.cs:8603
Audio configuration specifying how recorded audio from sound input device should be preprocessed befo...
Definition: TeamTalk.cs:1141
A new video frame from a video media file was received from a user.
Subscribing to broadcast text messsages.
SpeexDSP speexdsp
Used when nPreprocessor is BearWare.AudioPreprocessorType.SPEEXDSP_AUDIOPREPROCESSOR.
Definition: TeamTalk.cs:1479
string szLocalFilePath
The file path on local disk.
Definition: TeamTalk.cs:2810
string szServerProtocolVersion
The version of the server&#39;s protocol.
Definition: TeamTalk.cs:1951
long nDiskQuota
Number of bytes available for file storage.
Definition: TeamTalk.cs:2622
bool SendDesktopCursorPosition(ushort nPosX, ushort nPosY)
Send the position of mouse cursor to users in the same channel.
Definition: TeamTalk.cs:6348
A channel&#39;s properties has been updated.
float [] soundPositionMediaFile
User&#39;s position when using 3D-sound (DirectSound option). Index 0 is x-axis, index 1 is y-axis and in...
Definition: TeamTalk.cs:2410
bool GetChannelFile(int nChannelID, int nFileID, ref RemoteFile lpRemoteFile)
Get information about a file which can be downloaded.
Definition: TeamTalk.cs:7661
bool HotKey_InstallTestHook()
Install a test hook which calls the event OnHotKeyTest whenever a key or mouse button is pressed...
Definition: TeamTalk.cs:8207
static bool SetWaveInMute(int nWaveDeviceID, bool bEnable)
Mute/unmute microphone input.
Definition: TeamTalk.cs:9041
StreamType GetTransmitStreamTypes(int nUserID)
Helper function for getting the BearWare.StreamType a user can transmit by querying transmitUsers...
Definition: TeamTalk.cs:2735
Speex constants for BearWare.SpeexCodec and BearWare.SpeexVBRCodec.
Definition: TeamTalk.cs:986
int nTcpKeepAliveIntervalMSec
Client instance&#39;s interval between TeamTalkBase.DoPing() command. Read-only value. Will be half of BearWare.ServerProperties&#39; nUserTimeout.
Definition: TeamTalk.cs:2930
bool bEnable
Enable level estimater. When enabled TeamTalkBase.GetSoundInputLevel() will return a value based on W...
Definition: TeamTalk.cs:1378
GainController2 gaincontroller2
Definition: TeamTalk.cs:1367
bool GetMessage(ref TTMessage pMsg, int nWaitMs)
Poll for events in the client instance.
Definition: TeamTalk.cs:4456
Command flooding prevented by server.
long nDesktopBytesTX
The number of bytes in desktop packets sent from the server to clients.
Definition: TeamTalk.cs:2010
bool bEnableAGC
Enable Automatic Gain Control.
Definition: TeamTalk.cs:298
int nTimeOutTimerVoiceMSec
Time out timer for voice stream. The maximum time in miliseconds a user can transmit voice without ch...
Definition: TeamTalk.cs:2710
Sound system denoting invalid or not found.
static System.IntPtr GetDesktopActiveHWND()
Get the handle (HWND) of the window which is currently active (focused) on the Windows desktop...
Definition: TeamTalk.cs:9213
TTType ttType
Specifies which member to access in the union.
Definition: TeamTalk.cs:4001
IDs for sound devices.
Definition: TeamTalk.cs:336
long nMediaFileBytesTX
The number of bytes in media file packets sent from the server to clients.
Definition: TeamTalk.cs:2004
bool bSupports3D
Whether the sound device supports 3D-sound effects.
Definition: TeamTalk.cs:247
MyselfLoggedOut OnCmdMyselfLoggedOut
The client instance logged out of a server.
Definition: TeamTalk.cs:8385
int DoTextMessage(TextMessage lpTextMessage)
Send a text message to either a user or a channel.
Definition: TeamTalk.cs:6884
Subscribing to BearWare.StreamType.STREAMTYPE_DESKTOPINPUT.
bool bEnable
Enable pre-amplifier. Replacement for TT_SetSoundInputGainLevel()
Definition: TeamTalk.cs:1280
Translate from TTKEYCODE to Mac OS X Carbon kVK_* key-code.
int DoJoinChannel(Channel lpChannel)
Create a new channel and join it.
Definition: TeamTalk.cs:6768
ClientFlag
Flags used to describe the the client instance current state.
Definition: TeamTalk.cs:4101
int nWidth
The width in pixels of the image contained in frameBuffer.
Definition: TeamTalk.cs:655
User&#39;s channel text messages are logged to file by the server.
string szServerName
The server&#39;s name.
Definition: TeamTalk.cs:1892
int DoChangeStatus(int nStatusMode, string szStatusMessage)
Change the client instance&#39;s currect status.
Definition: TeamTalk.cs:6862
If set GetSoundInputLevel() is higher than the voice activation level. To enable voice transmission i...
int nVolumeVoice
The user&#39;s voice volume level. Note that it&#39;s a virtual volume which is being set since the master vo...
Definition: TeamTalk.cs:2384
static IntPtr StartSoundLoopbackTest(int nInputDeviceID, int nOutputDeviceID, int nSampleRate, int nChannels, bool bDuplexMode, SpeexDSP lpSpeexDSP)
Perform a record and playback test of specified sound devices along with an audio configuration and a...
Definition: TeamTalk.cs:4784
int nAudioCodecBpsLimit
Bandwidth restriction for audio codecs created by this user. This value will hold the highest bitrate...
Definition: TeamTalk.cs:2161
Subscription
A user by default accepts audio, video and text messages from all users. Using subscribtions can...
Definition: TeamTalk.cs:2196
static bool GetDesktopWindowHWND(int nIndex, ref System.IntPtr lpHWnd)
Get the all the handles (HWND) of visible windows.
Definition: TeamTalk.cs:9225
If set the user currently streams an audio file. If user is streaming a video file with audio then th...
bool EnableAudioBlockEvent(int nUserID, StreamType uStreamTypes, bool bEnable)
Enable/disable access to raw audio from individual users, local microphone input or muxed stream of a...
Definition: TeamTalk.cs:5347
static bool GetWindow(System.IntPtr hWnd, ref ShareWindow lpShareWindow)
Get the properties of a window from its window handle (HWND).
Definition: TeamTalk.cs:9233
A banned user has been received from the server.
UserState uUserState
A bitmask of the user&#39;s current state, e.g. talking, muted, etc.
Definition: TeamTalk.cs:2374
NewDesktopWindow OnUserDesktopWindow
A new or updated desktop window has been received from a user.
Definition: TeamTalk.cs:8577
Configuration of WebRTC&#39;s level estimater.
Definition: TeamTalk.cs:1371
static int DesktopInputExecute(DesktopInput[] lpDesktopInputs)
Execute desktop (mouse or keyboard) input.
Definition: TeamTalk.cs:9288
The maximum number of channels has been exceeded.
UserRight
The rights users have once they have logged on to the server.
Definition: TeamTalk.cs:1726
A struct containing the properties of a user account.
Definition: TeamTalk.cs:2126
Core Audio. Should be used on MacOS.
BearWare.AudioPreprocessor failed to initialize.
Users who log onto the server has none of the rights below.
int nUdpKeepAliveRTXMSec
Client instance&#39;s interval for retransmitting UDP keep alive packets. If server hasn&#39;t responded to U...
Definition: TeamTalk.cs:2942
User can kick users off the server.
long nTransferred
The number of bytes transferred so far.
Definition: TeamTalk.cs:2817
string szCADir
Path to directory containing Certificate Authority (CA) Certificates in PEM format.
Definition: TeamTalk.cs:2877
If set the client instance is currently transmitting video.
User can make other users channel operator.
Speex audio codec settings for Variable Bitrate mode (VBR).
Definition: TeamTalk.cs:945
int GetSoundOutputVolume()
Get master volume.
Definition: TeamTalk.cs:5241
bool SetUserPosition(int nUserID, StreamType nStreamType, float x, float y, float z)
Set the position of a user.
Definition: TeamTalk.cs:7926
bool InitSoundInputSharedDevice(int nSampleRate, int nChannels, int nFrameSize)
Setup sample rate, channels and frame size of shared sound input device.
Definition: TeamTalk.cs:4905
const ushort DESKTOPINPUT_MOUSEPOS_IGNORE
Definition: TeamTalk.cs:869
int nFrameSizeMSec
OPUS supports 2.5, 5, 10, 20, 40, 60, 80, 100 and 120 msec. If nFrameSizeMSec is 0 then nFrameSizeMSe...
Definition: TeamTalk.cs:1081
User with all rights.
const int DEFAULT_AGC_DEC_MAXDB
Definition: TeamTalk.cs:1494
bool StartRecordingMuxedAudioFile(int nChannelID, string szAudioFileName, AudioFileFormat uAFF)
Store audio conversations from a specific channel into a single file.
Definition: TeamTalk.cs:5605
static bool GetWaveInName(int nWaveDeviceID, ref string szMixerName)
Get the name of the mixer associated with a wave-in device.
Definition: TeamTalk.cs:8888
string szFileName
The name of the file.
Definition: TeamTalk.cs:2834
string szBanTime
Date and time when user was banned. Read-only property.
Definition: TeamTalk.cs:2063
static bool RemoveAppException(string szExecutable)
Remove an application from the Windows Firewall exception list.
Definition: TeamTalk.cs:9178
Codec nCodec
Specifies whether the member speex, speex_vbr or opus holds the codec settings.
Definition: TeamTalk.cs:1573
ClientEvent
TeamTalk client event messages.
Definition: TeamTalk.cs:3374
int nBytesPerLine
The number of bytes for each scan-line in the bitmap. Zero means 4-byte aligned.
Definition: TeamTalk.cs:775
string szServerVersion
The server version.
Definition: TeamTalk.cs:1948
bool CloseDesktopWindow()
Close the current desktop session.
Definition: TeamTalk.cs:6214
Configure the audio preprocessor specified by nPreprocessor.
Definition: TeamTalk.cs:1472