MediaSessionMgr.cs 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 2.0.9
  4. *
  5. * Do not make changes to this file unless you know what you are doing--modify
  6. * the SWIG interface file instead.
  7. * ----------------------------------------------------------------------------- */
  8. namespace org.doubango.tinyWRAP {
  9. using System;
  10. using System.Runtime.InteropServices;
  11. public class MediaSessionMgr : IDisposable {
  12. private HandleRef swigCPtr;
  13. protected bool swigCMemOwn;
  14. internal MediaSessionMgr(IntPtr cPtr, bool cMemoryOwn) {
  15. swigCMemOwn = cMemoryOwn;
  16. swigCPtr = new HandleRef(this, cPtr);
  17. }
  18. internal static HandleRef getCPtr(MediaSessionMgr obj) {
  19. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  20. }
  21. ~MediaSessionMgr() {
  22. Dispose();
  23. }
  24. public virtual void Dispose() {
  25. lock(this) {
  26. if (swigCPtr.Handle != IntPtr.Zero) {
  27. if (swigCMemOwn) {
  28. swigCMemOwn = false;
  29. tinyWRAPPINVOKE.delete_MediaSessionMgr(swigCPtr);
  30. }
  31. swigCPtr = new HandleRef(null, IntPtr.Zero);
  32. }
  33. GC.SuppressFinalize(this);
  34. }
  35. }
  36. public bool sessionSetInt32(twrap_media_type_t media, string key, int value) {
  37. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_sessionSetInt32(swigCPtr, (int)media, key, value);
  38. return ret;
  39. }
  40. public int sessionGetInt32(twrap_media_type_t media, string key) {
  41. int ret = tinyWRAPPINVOKE.MediaSessionMgr_sessionGetInt32(swigCPtr, (int)media, key);
  42. return ret;
  43. }
  44. public QoS sessionGetQoS(twrap_media_type_t media) {
  45. IntPtr cPtr = tinyWRAPPINVOKE.MediaSessionMgr_sessionGetQoS(swigCPtr, (int)media);
  46. QoS ret = (cPtr == IntPtr.Zero) ? null : new QoS(cPtr, true);
  47. return ret;
  48. }
  49. public bool consumerSetInt32(twrap_media_type_t media, string key, int value) {
  50. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_consumerSetInt32(swigCPtr, (int)media, key, value);
  51. return ret;
  52. }
  53. public bool consumerSetInt64(twrap_media_type_t media, string key, long value) {
  54. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_consumerSetInt64(swigCPtr, (int)media, key, value);
  55. return ret;
  56. }
  57. public bool producerSetInt32(twrap_media_type_t media, string key, int value) {
  58. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_producerSetInt32(swigCPtr, (int)media, key, value);
  59. return ret;
  60. }
  61. public bool producerSetInt64(twrap_media_type_t media, string key, long value) {
  62. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_producerSetInt64(swigCPtr, (int)media, key, value);
  63. return ret;
  64. }
  65. public Codec producerGetCodec(twrap_media_type_t media) {
  66. IntPtr cPtr = tinyWRAPPINVOKE.MediaSessionMgr_producerGetCodec(swigCPtr, (int)media);
  67. Codec ret = (cPtr == IntPtr.Zero) ? null : new Codec(cPtr, true);
  68. return ret;
  69. }
  70. public ProxyPlugin findProxyPluginConsumer(twrap_media_type_t media) {
  71. IntPtr cPtr = tinyWRAPPINVOKE.MediaSessionMgr_findProxyPluginConsumer(swigCPtr, (int)media);
  72. ProxyPlugin ret = (cPtr == IntPtr.Zero) ? null : new ProxyPlugin(cPtr, false);
  73. return ret;
  74. }
  75. public ProxyPlugin findProxyPluginProducer(twrap_media_type_t media) {
  76. IntPtr cPtr = tinyWRAPPINVOKE.MediaSessionMgr_findProxyPluginProducer(swigCPtr, (int)media);
  77. ProxyPlugin ret = (cPtr == IntPtr.Zero) ? null : new ProxyPlugin(cPtr, false);
  78. return ret;
  79. }
  80. public static uint registerAudioPluginFromFile(string path) {
  81. uint ret = tinyWRAPPINVOKE.MediaSessionMgr_registerAudioPluginFromFile(path);
  82. return ret;
  83. }
  84. public ulong getSessionId(twrap_media_type_t media) {
  85. ulong ret = tinyWRAPPINVOKE.MediaSessionMgr_getSessionId(swigCPtr, (int)media);
  86. return ret;
  87. }
  88. public static bool defaultsSetProfile(tmedia_profile_t profile) {
  89. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetProfile((int)profile);
  90. return ret;
  91. }
  92. public static tmedia_profile_t defaultsGetProfile() {
  93. tmedia_profile_t ret = (tmedia_profile_t)tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetProfile();
  94. return ret;
  95. }
  96. public static bool defaultsSetBandwidthLevel(tmedia_bandwidth_level_t bl) {
  97. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetBandwidthLevel((int)bl);
  98. return ret;
  99. }
  100. public static tmedia_bandwidth_level_t defaultsGetBandwidthLevel() {
  101. tmedia_bandwidth_level_t ret = (tmedia_bandwidth_level_t)tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetBandwidthLevel();
  102. return ret;
  103. }
  104. public static bool defaultsSetCongestionCtrlEnabled(bool enabled) {
  105. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetCongestionCtrlEnabled(enabled);
  106. return ret;
  107. }
  108. public static bool defaultsSetVideoMotionRank(int video_motion_rank) {
  109. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetVideoMotionRank(video_motion_rank);
  110. return ret;
  111. }
  112. public static bool defaultsSetVideoFps(int video_fps) {
  113. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetVideoFps(video_fps);
  114. return ret;
  115. }
  116. public static bool defaultsSetBandwidthVideoUploadMax(int bw_video_up_max_kbps) {
  117. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetBandwidthVideoUploadMax(bw_video_up_max_kbps);
  118. return ret;
  119. }
  120. public static bool defaultsSetBandwidthVideoDownloadMax(int bw_video_down_max_kbps) {
  121. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetBandwidthVideoDownloadMax(bw_video_down_max_kbps);
  122. return ret;
  123. }
  124. public static bool defaultsSetPrefVideoSize(tmedia_pref_video_size_t pref_video_size) {
  125. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetPrefVideoSize((int)pref_video_size);
  126. return ret;
  127. }
  128. public static bool defaultsSetPrefVideoSizeOutRange(tmedia_pref_video_size_t min, tmedia_pref_video_size_t max) {
  129. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetPrefVideoSizeOutRange((int)min, (int)max);
  130. return ret;
  131. }
  132. public static bool defaultsSetAdaptativeVideoSizeOutEnabled(bool enabled) {
  133. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetAdaptativeVideoSizeOutEnabled(enabled);
  134. return ret;
  135. }
  136. public static bool defaultsSetJbMargin(uint jb_margin_ms) {
  137. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetJbMargin(jb_margin_ms);
  138. return ret;
  139. }
  140. public static bool defaultsSetJbMaxLateRate(uint jb_late_rate_percent) {
  141. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetJbMaxLateRate(jb_late_rate_percent);
  142. return ret;
  143. }
  144. public static bool defaultsSetEchoTail(uint echo_tail) {
  145. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetEchoTail(echo_tail);
  146. return ret;
  147. }
  148. public static uint defaultsGetEchoTail() {
  149. uint ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetEchoTail();
  150. return ret;
  151. }
  152. public static bool defaultsSetEchoSkew(uint echo_skew) {
  153. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetEchoSkew(echo_skew);
  154. return ret;
  155. }
  156. public static bool defaultsSetEchoSuppEnabled(bool echo_supp_enabled) {
  157. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetEchoSuppEnabled(echo_supp_enabled);
  158. return ret;
  159. }
  160. public static bool defaultsGetEchoSuppEnabled() {
  161. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetEchoSuppEnabled();
  162. return ret;
  163. }
  164. public static bool defaultsSetAgcEnabled(bool agc_enabled) {
  165. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetAgcEnabled(agc_enabled);
  166. return ret;
  167. }
  168. public static bool defaultsGetAgcEnabled() {
  169. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetAgcEnabled();
  170. return ret;
  171. }
  172. public static bool defaultsSetAgcLevel(float agc_level) {
  173. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetAgcLevel(agc_level);
  174. return ret;
  175. }
  176. public static float defaultsGetAgcLevel() {
  177. float ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetAgcLevel();
  178. return ret;
  179. }
  180. public static bool defaultsSetVadEnabled(bool vad_enabled) {
  181. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetVadEnabled(vad_enabled);
  182. return ret;
  183. }
  184. public static bool defaultsGetGetVadEnabled() {
  185. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetGetVadEnabled();
  186. return ret;
  187. }
  188. public static bool defaultsSetNoiseSuppEnabled(bool noise_supp_enabled) {
  189. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetNoiseSuppEnabled(noise_supp_enabled);
  190. return ret;
  191. }
  192. public static bool defaultsGetNoiseSuppEnabled() {
  193. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetNoiseSuppEnabled();
  194. return ret;
  195. }
  196. public static bool defaultsSetNoiseSuppLevel(int noise_supp_level) {
  197. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetNoiseSuppLevel(noise_supp_level);
  198. return ret;
  199. }
  200. public static int defaultsGetNoiseSuppLevel() {
  201. int ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetNoiseSuppLevel();
  202. return ret;
  203. }
  204. public static bool defaultsSetConditionalRingingEnabled(bool _cond_ringing_enabled) {
  205. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetConditionalRingingEnabled(_cond_ringing_enabled);
  206. return ret;
  207. }
  208. public static bool defaultsGetConditionalRingingEnabled() {
  209. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetConditionalRingingEnabled();
  210. return ret;
  211. }
  212. public static bool defaultsSet100relEnabled(bool _100rel_enabled) {
  213. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSet100relEnabled(_100rel_enabled);
  214. return ret;
  215. }
  216. public static bool defaultsGet100relEnabled() {
  217. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGet100relEnabled();
  218. return ret;
  219. }
  220. public static bool defaultsSetScreenSize(int sx, int sy) {
  221. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetScreenSize(sx, sy);
  222. return ret;
  223. }
  224. public static bool defaultsSetAudioGain(int producer_gain, int consumer_gain) {
  225. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetAudioGain(producer_gain, consumer_gain);
  226. return ret;
  227. }
  228. public static bool defaultsSetAudioPtime(int ptime) {
  229. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetAudioPtime(ptime);
  230. return ret;
  231. }
  232. public static bool defaultsSetAudioChannels(int channel_playback, int channel_record) {
  233. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetAudioChannels(channel_playback, channel_record);
  234. return ret;
  235. }
  236. public static bool defaultsSetRtpPortRange(ushort range_start, ushort range_stop) {
  237. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetRtpPortRange(range_start, range_stop);
  238. return ret;
  239. }
  240. public static bool defaultsSetRtpSymetricEnabled(bool enabled) {
  241. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetRtpSymetricEnabled(enabled);
  242. return ret;
  243. }
  244. public static bool defaultsSetMediaType(twrap_media_type_t media_type) {
  245. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetMediaType((int)media_type);
  246. return ret;
  247. }
  248. public static bool defaultsSetVolume(int volume) {
  249. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetVolume(volume);
  250. return ret;
  251. }
  252. public static int defaultsGetVolume() {
  253. int ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetVolume();
  254. return ret;
  255. }
  256. public static bool defaultsSetInviteSessionTimers(int timeout, string refresher) {
  257. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetInviteSessionTimers(timeout, refresher);
  258. return ret;
  259. }
  260. public static bool defaultsSetSRtpMode(tmedia_srtp_mode_t mode) {
  261. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetSRtpMode((int)mode);
  262. return ret;
  263. }
  264. public static tmedia_srtp_mode_t defaultsGetSRtpMode() {
  265. tmedia_srtp_mode_t ret = (tmedia_srtp_mode_t)tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetSRtpMode();
  266. return ret;
  267. }
  268. public static bool defaultsSetSRtpType(tmedia_srtp_type_t srtp_type) {
  269. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetSRtpType((int)srtp_type);
  270. return ret;
  271. }
  272. public static tmedia_srtp_type_t defaultsGetSRtpType() {
  273. tmedia_srtp_type_t ret = (tmedia_srtp_type_t)tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetSRtpType();
  274. return ret;
  275. }
  276. public static bool defaultsSetRtcpEnabled(bool enabled) {
  277. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetRtcpEnabled(enabled);
  278. return ret;
  279. }
  280. public static bool defaultsGetRtcpEnabled() {
  281. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetRtcpEnabled();
  282. return ret;
  283. }
  284. public static bool defaultsSetRtcpMuxEnabled(bool enabled) {
  285. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetRtcpMuxEnabled(enabled);
  286. return ret;
  287. }
  288. public static bool defaultsGetRtcpMuxEnabled() {
  289. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetRtcpMuxEnabled();
  290. return ret;
  291. }
  292. public static bool defaultsSetStunEnabled(bool stun_enabled) {
  293. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetStunEnabled(stun_enabled);
  294. return ret;
  295. }
  296. public static bool defaultsSetIceStunEnabled(bool icestun_enabled) {
  297. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetIceStunEnabled(icestun_enabled);
  298. return ret;
  299. }
  300. public static bool defaultsSetIceTurnEnabled(bool iceturn_enabled) {
  301. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetIceTurnEnabled(iceturn_enabled);
  302. return ret;
  303. }
  304. public static bool defaultsSetStunServer(string server_ip, ushort server_port) {
  305. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetStunServer(server_ip, server_port);
  306. return ret;
  307. }
  308. public static bool defaultsSetStunCred(string username, string password) {
  309. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetStunCred(username, password);
  310. return ret;
  311. }
  312. public static bool defaultsSetIceEnabled(bool ice_enabled) {
  313. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetIceEnabled(ice_enabled);
  314. return ret;
  315. }
  316. public static bool defaultsSetByPassEncoding(bool enabled) {
  317. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetByPassEncoding(enabled);
  318. return ret;
  319. }
  320. public static bool defaultsGetByPassEncoding() {
  321. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetByPassEncoding();
  322. return ret;
  323. }
  324. public static bool defaultsSetByPassDecoding(bool enabled) {
  325. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetByPassDecoding(enabled);
  326. return ret;
  327. }
  328. public static bool defaultsGetByPassDecoding() {
  329. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetByPassDecoding();
  330. return ret;
  331. }
  332. public static bool defaultsSetVideoJbEnabled(bool enabled) {
  333. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetVideoJbEnabled(enabled);
  334. return ret;
  335. }
  336. public static bool defaultsGetVideoJbEnabled() {
  337. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetVideoJbEnabled();
  338. return ret;
  339. }
  340. public static bool defaultsSetVideoZeroArtifactsEnabled(bool enabled) {
  341. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetVideoZeroArtifactsEnabled(enabled);
  342. return ret;
  343. }
  344. public static bool defaultsGetVideoZeroArtifactsEnabled() {
  345. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetVideoZeroArtifactsEnabled();
  346. return ret;
  347. }
  348. public static bool defaultsSetRtpBuffSize(uint buffSize) {
  349. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetRtpBuffSize(buffSize);
  350. return ret;
  351. }
  352. public static uint defaultsGetRtpBuffSize() {
  353. uint ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetRtpBuffSize();
  354. return ret;
  355. }
  356. public static bool defaultsSetAvpfTail(uint tail_min, uint tail_max) {
  357. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetAvpfTail(tail_min, tail_max);
  358. return ret;
  359. }
  360. public static bool defaultsSetAvpfMode(tmedia_mode_t mode) {
  361. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetAvpfMode((int)mode);
  362. return ret;
  363. }
  364. public static bool defaultsSetOpusMaxCaptureRate(uint opus_maxcapturerate) {
  365. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetOpusMaxCaptureRate(opus_maxcapturerate);
  366. return ret;
  367. }
  368. public static bool defaultsSetOpusMaxPlaybackRate(uint opus_maxplaybackrate) {
  369. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetOpusMaxPlaybackRate(opus_maxplaybackrate);
  370. return ret;
  371. }
  372. public static bool defaultsSetMaxFds(int max_fds) {
  373. bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetMaxFds(max_fds);
  374. return ret;
  375. }
  376. }
  377. }