//根据文件名提取出客户端请求的MPD,存储到本地 public static bool genFile(string sPhysicalFilePath) { try { int fileNameStart = sPhysicalFilePath.LastIndexOf('/'); int videoID = int.Parse(sPhysicalFilePath.Substring(fileNameStart + 1, 4)); MPDdata data = MPDdata.getServerData(videoID); return(WriteXml(data, sPhysicalFilePath)); } catch { return(false); } }