Beispiel #1
0
      private static void SrtWorkerThread(SrtReceiver client)
      {
          while (!_pendingExit)
          {
              client.Run();
              Console.WriteLine("\nConnection closed, resetting...");
              Thread.Sleep(100);
          }

          Environment.Exit(0);
      }
Beispiel #2
0
        private static int Run(Options opts)
        {
            _srtRecvr.SetHostname(opts.InputAdapterAddress);
            _srtRecvr.SetPort(opts.SrtPort);
            _srtRecvr.OnDataReceived += SrtRecvr_OnDataReceived;

            Console.WriteLine($"About to attempt to bind for listening as SRT TARGET on {_srtRecvr.GetHostname()}:{_srtRecvr.GetPort()}");

            PrepareOutputUdpClient(opts.OutputAdapterAddress, opts.MulticastAddress, opts.MulticastPort);

            _running = true;

            while (_running)
            {
                _srtRecvr.Run();
                Console.WriteLine("\nConnection closed, resetting...");
                System.Threading.Thread.Sleep(100);
            }

            return(0);
        }