public MJpegServer(int port, VideoSource source, QualityDefinition qualityDefinition)
 {
     this._server = new ThreadedServer(port, System.Net.IPAddress.Parse("127.0.0.1"), 100);
     this._server.ClientDataReceived += new ThreadedServer.ClientDataReceivedEventHandler(this.OnClientDataReceived);
     this._server.SocketError        += new ThreadedServer.SocketErrorEventHandler(this.OnSocketError);
     this._streamer = new MJPEGStreamer(source, qualityDefinition);
 }
Exemple #2
0
    /*//test encoding phase, every x seconds
     * IEnumerator SendPhase(bool value){
     *      yield return new WaitForSeconds(TCP_Config.numSecondsBeforeAlignment);
     *      while(true){
     *              myServer.SendStateEvent(GameClock.SystemTime_Milliseconds, "ENCODING", value);
     *              yield return new WaitForSeconds(10.0f);
     *      }
     * }*/

    void RunServer()
    {
        UnityEngine.Debug.Log("creating threaded server");
        myServer = new ThreadedServer();
        //SetupClient();
        myServer.Start();
    }
Exemple #3
0
 public SimpleServer(int port, VideoSource source, QualityDefinition qualityDefinition)
 {
     _server = new ThreadedServer(port);
     _server.ClientDataReceived += OnClientDataReceived;
     _server.SocketError        += OnSocketError;
     _streamer = new MJPEGStreamer(source, qualityDefinition);
 }
 void Start()
 {
     myServer = new ThreadedServer();
     UnityEngine.Debug.Log("starting");
     myServer.Start();
 }
Exemple #5
0
 void RunServer()
 {
     myServer = new ThreadedServer();
     myServer.Start();
 }