Ejemplo n.º 1
0
        private void CreateSynchronisationMasterListener()
        {
            synchronisationMasterTimeConfirmedByUser = false;

            synchronisationMasterListener?.Dispose();
            synchronisationMasterListener = new OscListener(MainForm.SynchronisationMasterPort);
            synchronisationMasterListener.Attach("/sync", OnSyncMessage);
            synchronisationMasterListener.Connect();
        }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        listener = new OscListener(IPAddress.Parse(ipAddress), recvPort);
        listener.Connect();
        listener.Attach("/prediction", OnPrediction);


        sender = new OscSender(IPAddress.Parse(ipAddress), sendPort);
        sender.Connect();
    }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        listener = new OscListener(IPAddress.Parse(ipAddress), recvPort);
        listener.Connect();
        listener.Attach("/prediction", OnPrediction);

        block = new MaterialPropertyBlock();

        sender = new OscSender(IPAddress.Parse(ipAddress), sendPort);
        sender.Connect();

        leftRenderer  = leftHand.GetComponentInChildren <Renderer>();
        rightRenderer = rightHand.GetComponentInChildren <Renderer>();
    }
Ejemplo n.º 4
0
        public Server(AmcpClient Client, String[] IngestDecklinkDevices, Boolean ChannelGrid = false)
        {
            this.RecordingHeadPositionUpdated   += new OscMessageEvent(Server_RecordingHeadPositionUpdated);
            this.PlayHeadPositionUpdated        += new OscMessageEvent(Server_PlayHeadPositionUpdated);
            this.VirtualPlayHeadPositionUpdated += new OscMessageEvent(Server_VirtualPlayHeadPositionUpdated);

            client = Client;

            channels = new List <Channel>();

            channels.Add(new Channel(1));
            channels.Add(new Channel(2));
            channels.Add(new Channel(3));

            string Channel1FileName = CurrentTimeDate() + "-IN1";
            string Channel2FileName = CurrentTimeDate() + "-IN2";
            string Channel3FileName = CurrentTimeDate() + "-IN3";

            foreach (string Input in IngestDecklinkDevices)
            {
                (new AmcpRequest(client, "PLAY", channels[0], "DECKLINK", Input)).GetResponse();
            }

            (new AmcpRequest(client, "ADD", channels[0], "REPLAY", Channel1FileName)).GetResponse();
            channels[0].Consumer = new ReplayConsumer(Channel1FileName);

            (new AmcpRequest(client, "ADD", channels[1], "REPLAY", Channel2FileName)).GetResponse();
            channels[1].Consumer = new ReplayConsumer(Channel2FileName);

            (new AmcpRequest(client, "ADD", channels[2], "REPLAY", Channel3FileName)).GetResponse();
            channels[2].Consumer = new ReplayConsumer(Channel3FileName);

            channels.Add(new Channel(4));

            Thread.Sleep(250);
            (new AmcpRequest(client, "PLAY", channels[3], Channel1FileName)).GetResponse();

            channels[3].Producer = new ReplayProducer();

            try
            {
                oscListener = new OscListener(6250);
                oscListener.Attach("/channel/1/output/file/frame", RecordingHeadPositionUpdated);
                oscListener.Attach("/channel/2/output/file/frame", RecordingHeadPositionUpdated);
                oscListener.Attach("/channel/3/output/file/frame", RecordingHeadPositionUpdated);


                oscListener.Attach("/channel/4/stage/layer/0/file/frame", PlayHeadPositionUpdated);
                oscListener.Attach("/channel/4/stage/layer/0/file/vframe", VirtualPlayHeadPositionUpdated);
                oscListener.Connect();
            }
            catch (Exception ioe)
            {
                Console.Error.WriteLine(ioe.ToString());
            }


            if (ChannelGrid)
            {
                (new AmcpRequest(client, "CHANNEL_GRID", 0)).NoResponseRequest();
                Thread.Sleep(1000);
                (new AmcpRequest(client, "MIXER", 5, "GRID", "2", "2")).GetResponse();
            }
        }