internal static MediaStatsEvent FromNative( CDOMediaStatsEvent mediaStatsEvnt) { MediaStatsEvent result = new MediaStatsEvent(); result._scopeId = mediaStatsEvnt.scopeId.body; result._mediaType = MediaType.FromString(mediaStatsEvnt.mediaType.body); result._remoteUserId = mediaStatsEvnt.remoteUserId; result._stats = new MediaStats(mediaStatsEvnt.stats); return result; }
private void on_media_stats_callback_t(IntPtr opaque, ref CDOMediaStatsEvent e) { try { Console.Error.WriteLine("Media stats: " + e.stats.bitRate); if (_listener != null) _listener.onMediaStats( MediaStatsEvent.FromNative(e)); } catch (Exception ) { } }