Skip to content

Commit

Permalink
feat: atem ip as startup parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Nov 9, 2021
1 parent ed7e497 commit 75df93a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion AtemProxy/ClientConnectionList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public AtemServerConnection FindOrCreateConnection(EndPoint ep, out bool isNew)
return val;
}

val = new AtemServerConnection(ep, 0x8008);// TODO - make dynamic
val = new AtemServerConnection(ep, 0x8008);// 0x8008 or 0x26B6? TODO - make dynamic
_connections[ep] = val;
val.OnDisconnect += RemoveTimedOut;

Expand Down
12 changes: 8 additions & 4 deletions AtemProxy/Program.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;
using LibAtem;
using LibAtem.Commands;
using LibAtem.Commands.Audio;
using LibAtem.Commands.Audio.Fairlight;
using LibAtem.Util;
using log4net;
using log4net.Config;

Expand All @@ -20,6 +17,13 @@ public class Program
{
public static void Main(string[] args)
{
if (args.Length == 0)
{
Console.WriteLine("Please include IP address for ATEM.");
return;
}

string ipAddress = args[0];
var logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly());
XmlConfigurator.Configure(logRepository, new FileInfo("log4net.config"));

Expand All @@ -29,7 +33,7 @@ public static void Main(string[] args)
var currentStateCommands = new CommandQueue();
var unknownCommandId = 1;

var upstream = new UpstreamConnection("10.42.13.95");
var upstream = new UpstreamConnection(ipAddress);

var server = new AtemServer(currentStateCommands);
server.Connections.OnReceive += (sender, pkt) =>
Expand Down

0 comments on commit 75df93a

Please sign in to comment.