Normally the C# VLC WinForm Library works very well, but it has a problem with aimetis Symphony RTSP.
Unfortunately, my Program is abnormally closed with messages.
(After I add "--verbose=2" option, I get the debug message also)
Code: Select all
..... other logs .....
Received 84 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 500 Internal Server Error
CSeq: 3
Date: Tue, Jul 31 2018 10:11:17 GMT
[061689bc] live555 demux debug: we will now try HTTP tunneling mode <-- Debug Message
The program '[8660] MyProgram.exe' has exited with code -1073740940 (0xc0000374). <-- Error Message
..... My demo program is abnormally closed after this log .....
After the library get 500 error from the Symphony RTSP server, it tries to connect using "the HTTP tunneling mode"
And then, the program is closed.
My demo source code is like that.
Code: Select all
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Vlc.DotNet.Forms;
namespace VLCTest2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void vlcControl1_VlcLibDirectoryNeeded(object sender, VlcLibDirectoryNeededEventArgs e)
{
e.VlcLibDirectory = new DirectoryInfo(@"vlclib\x86\");
}
private void button1_Click(object sender, EventArgs e)
{
if (vlcControl1.VlcMediaplayerOptions != null)
{
foreach (String option in vlcControl1.VlcMediaplayerOptions)
{
Console.WriteLine("option= " + option);
}
}
Console.WriteLine("\n\n\n\n\n\n\n\n");
String strURL = "rtsp://Aimetis_Symphony_RTSP";
vlcControl1.SetMedia(strURL);
vlcControl1.Play();
}
}
}
So, I tried to use "--no-rtsp-http" option, but it still tries to use the "HTTP tunneling mode".
If it cannot, is there any method to validate RTSP url in VLC library?
Or, Can I catch the exception?
I tried to use try catch for "Play()" function, but it cannot catch Exception.