在C#中,是否有可能使用“System.net.httpwebrequest”来使用RTSP视频流?如果不行,请告诉我另一个替代方案。
//从中下载文件的URL
string basepath = @"rtsp://ip.worldonetv.com:1935/live/ ";
// the path to write the file to
// string sFilePathToWriteFileTo = "d:\\Download";
// first, we need to get the exact size (in bytes) of the file we are downloading
Uri url = new Uri(basepath);
System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(url);
System.Net.HttpWebResponse response = (System.Net.HttpWebResponse)request.GetResponse();
response.Close();