Example #1
0
 public void EchoCancellation(LinphoneCall linphoneCall, bool value)
 {
     if (linphoneCall.IsExist())
     {
         MediaModule.linphone_call_enable_echo_cancellation(linphoneCall.LinphoneCallPtr, value);
     }
 }
Example #2
0
 public void SetRingbackSound(string file)
 {
     if (LinphoneCore.IsNonZero())
     {
         MediaModule.linphone_core_set_ringback(LinphoneCore, file);
     }
 }
Example #3
0
 /// <summary>
 /// Set speaker gain between 0..1f
 /// </summary>
 /// <param name="linphoneCall"></param>
 /// <param name="value"></param>
 public void SetSpeakerValue(LinphoneCall linphoneCall, double value)
 {
     if (linphoneCall.IsExist())
     {
         MediaModule.linphone_call_set_speaker_volume_gain(linphoneCall.LinphoneCallPtr, (float)value);
     }
 }
Example #4
0
 public void SetIncomingRingSound(string file)
 {
     if (LinphoneCore.IsNonZero())
     {
         MediaModule.linphone_core_set_ring(LinphoneCore, file);
     }
 }
Example #5
0
        public IEnumerable <Device> GetSoundDevices()
        {
            MediaModule.linphone_core_reload_sound_devices(softphone.LinphoneWrapper.LinphoneCore);
            var soundDevsPtr = MediaModule.linphone_core_get_sound_devices(softphone.LinphoneWrapper.LinphoneCore);

            return(soundDevsPtr
                   .ToStringCollection()
                   .Select(device => new Device(device, IsAudioCaptureDevice(device) ? DeviceType.SoundCapture : DeviceType.Playback)));
        }
Example #6
0
        public IEnumerable <Device> GetVideoCaptureDevices()
        {
            MediaModule.linphone_core_reload_video_devices(softphone.LinphoneWrapper.LinphoneCore);
            var videoDevsPtr = MediaModule.linphone_core_get_video_devices(softphone.LinphoneWrapper.LinphoneCore);

            return(videoDevsPtr
                   .ToStringCollection()
                   .Select(devID => new Device(devID, DeviceType.VideoCapture)));
        }
Example #7
0
        public double GetSpeakerSound(LinphoneCall linphoneCall)
        {
            var result = 0f;

            if (linphoneCall.IsExist())
            {
                result = MediaModule.linphone_call_get_speaker_volume_gain(linphoneCall.LinphoneCallPtr);
            }
            return(result);
        }
Example #8
0
        public bool TrySetPlaybackDevice(string deviceId)
        {
            bool result = false;

            if (!string.IsNullOrWhiteSpace(deviceId) && MediaModule.linphone_core_sound_device_can_playback(softphone.LinphoneWrapper.LinphoneCore, deviceId))
            {
                int code = MediaModule.linphone_core_set_playback_device(softphone.LinphoneWrapper.LinphoneCore, deviceId);
                result = code != Constants.BOOL_T_FAILED_CODE;
            }
            return(result);
        }
Example #9
0
 public AppWebServer(
     ILoggerFactory loggerFactory,
     ITelemetryService telemetryService,
     IFFmpegService ffmpegService,
     IFileService fileService,
     IPlayer player,
     IAppSettingsService appSettings)
 {
     _loggerFactory    = loggerFactory;
     _logger           = loggerFactory.CreateLogger <AppWebServer>();
     _telemetryService = telemetryService;
     _ffmpegService    = ffmpegService;
     _fileService      = fileService;
     _player           = player;
     _appSettings      = appSettings;
     _mediaModule      = new MediaModule(_logger, ffmpegService, telemetryService, fileService, AppWebServerConstants.MediaPath);
 }
Example #10
0
 public void ReloadDevices()
 {
     MediaModule.linphone_core_reload_sound_devices(softphone.LinphoneWrapper.LinphoneCore);
     MediaModule.linphone_core_reload_video_devices(softphone.LinphoneWrapper.LinphoneCore);
 }
Example #11
0
 public bool IsAudioCaptureDevice(string device)
 {
     return(MediaModule.linphone_core_sound_device_can_capture(softphone.LinphoneWrapper.LinphoneCore, device));
 }
Example #12
0
 public bool IsPlaybackDevice(string device)
 {
     return(MediaModule.linphone_core_sound_device_can_playback(softphone.LinphoneWrapper.LinphoneCore, device));
 }