hawkeye camera support(not tested)
This commit is contained in:
31
framework/Inspectron.HawkEye/RTSP/Sdp/ConnectionIP6.cs
Normal file
31
framework/Inspectron.HawkEye/RTSP/Sdp/ConnectionIP6.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Inspectron.HawkEye.RTSP.Sdp
|
||||
{
|
||||
public class ConnectionIP6 : Connection
|
||||
{
|
||||
internal new static ConnectionIP6 Parse(string ipAddress)
|
||||
{
|
||||
string[] parts = ipAddress.Split('/');
|
||||
|
||||
if (parts.Length > 2)
|
||||
throw new FormatException("Too much address subpart in " + ipAddress);
|
||||
|
||||
ConnectionIP6 result = new ConnectionIP6();
|
||||
|
||||
result.Host = parts[0];
|
||||
|
||||
int numberOfAddress;
|
||||
if (parts.Length > 1)
|
||||
{
|
||||
if (!int.TryParse(parts[1], NumberStyles.Integer, CultureInfo.InvariantCulture, out numberOfAddress))
|
||||
throw new FormatException("Invalid number of address : " + parts[1]);
|
||||
result.NumberOfAddress = numberOfAddress;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user