hawkeye camera support(not tested)

This commit is contained in:
meelstorm
2025-08-19 12:45:50 +02:00
parent f80b275ad8
commit 6ef6aced8d
170 changed files with 20190 additions and 72 deletions

View File

@@ -0,0 +1,43 @@
using System;
namespace Inspectron.HawkEye.RTSP.Messages
{
public class RtspRequestSetup : RtspRequest
{
// Constructor
public RtspRequestSetup()
{
Command = "SETUP * RTSP/1.0";
}
/// <summary>
/// Gets the transports associate with the request.
/// </summary>
/// <value>The transport.</value>
public RtspTransport[] GetTransports()
{
if (!Headers.ContainsKey(RtspHeaderNames.Transport))
return new RtspTransport[] { new RtspTransport() };
string[] items = Headers[RtspHeaderNames.Transport].Split(',');
return Array.ConvertAll<string, RtspTransport>(items,
new Converter<string, RtspTransport>(RtspTransport.Parse));
}
public void AddTransport(RtspTransport newTransport)
{
string actualTransport = string.Empty;
if(Headers.ContainsKey(RtspHeaderNames.Transport))
actualTransport = Headers[RtspHeaderNames.Transport] + ",";
Headers[RtspHeaderNames.Transport] = actualTransport + newTransport.ToString();
}
}
}