public string GetDirectoryDidl() { string list = ""; foreach (Item item in items) { list += item.Definition; } return(DidlUtil.BeginDidl() + list + DidlUtil.EndDidl()); }
public void Start() { device.StartDevice(); foreach (IPEndPoint ipep in device.LocalIPEndPoints) { if (ipep.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) { Console.WriteLine("DLNA server STARTED listening @ " + ipep.ToString()); // create HTTP resource server endpoint ipEndPoint = new IPEndPoint(ipep.Address, ipep.Port + 1); break; } } S1 = HttpBaseURL + "capture"; S2 = DidlUtil.BeginDidl(); CaptureDevice defaultDevice = WasapiLoopbackCapture2.GetDefaultLoopbackCaptureDevice(); List <CaptureDevice> devices = WasapiLoopbackCapture2.GetLoopbackCaptureDevices(); S2 += GenerateCaptureDeviceEntry(1, defaultDevice, S1); int id = 0; foreach (CaptureDevice captureDevice in devices) { if (captureDevice != defaultDevice) { S2 += GenerateCaptureDeviceEntry(id + 2, captureDevice, S1 + "?id=" + id); } id++; } S2 += DidlUtil.EndDidl(); S2count = (uint)devices.Count; }
public string GetDidl() { return(DidlUtil.BeginDidl() + Definition + DidlUtil.EndDidl()); }