private async void btStart_Click(object sender, EventArgs e) { mmLog.Text = ""; tbSpeed.Value = 10; _player.Debug_Mode = cbDebugMode.Checked; _player.Audio_Play = cbPlayAudio.Checked; _player.Audio_OutputDevice = cbAudioOutputDevice.Text; _player.Subtitles_Enabled = cbSubtitlesEnabled.Checked; AddAudioEffects(); AddVideoEffects(); AddMotionDetection(); AddBarcodeReader(); string source = edFilenameOrURL.Text; if (source.Contains("rtsp://")) { var rtspSource = new RTSPSourceSettings(new Uri(source), true) { Login = edRTSPUserName.Text, Password = edRTSPPassword.Text, Latency = tbRTSPLatency.Value, RTPBlockSize = tbRTSPRTPBlockSize.Value * 1024, UDPBufferSize = tbRTSPUDPBufferSize.Value * 1024 }; switch (cbRTSPProtocol.SelectedIndex) { case 0: break; case 1: rtspSource.AllowedProtocols = RTSPSourceProtocol.TCP; break; case 2: rtspSource.AllowedProtocols = RTSPSourceProtocol.UDP; break; case 3: rtspSource.AllowedProtocols = RTSPSourceProtocol.HTTP; break; } await _player.OpenAsync(rtspSource); } else { var uniSource = new UniversalSourceSettings(new Uri(source)); await _player.OpenAsync(uniSource); } await _player.PlayAsync(); tmPosition.Start(); GC.Collect(); GC.Collect(); }
private async void btStart_Click(object sender, EventArgs e) { isSeeking = false; _player.Audio_Effects_AddOrUpdate(new GSTTrueBass(2048, 7000)); await _player.OpenAsync(new Uri(edURL.Text)); await _player.PlayAsync(); tmPosition.Start(); }
private async void btStart_Click(object sender, RoutedEventArgs e) { tbSpeed.Value = 10; _player.Debug_Mode = cbDebugMode.IsChecked == true; string source = edFilenameOrURL.Text; _player.Audio_Play = cbPlayAudio.IsChecked == true; _player.Audio_OutputDevice = cbAudioOutputDevice.SelectedItem.ToString(); await _player.OpenAsync(new Uri(source)); await _player.PlayAsync(); _tmPosition.Start(); }