public void Stop() { if (request != null) { //request.Abort (); request = null; } if (mjpgReader != null) { mjpgReader.Stop(); mjpgReader = null; } if (response != null) { response.Close(); response = null; } if (thread != null) { //thread.Abort (); thread = null; } lock (this) { frameQueue = null; } }
public void Start(string _url, FrameQueue _frameQueue, OnDisconnect _onDisconnect = null) { Stop(); url = _url; frameQueue = _frameQueue; onDisconnect = _onDisconnect; eof = false; failed = false; thread = new Thread(ReadThread); thread.Priority = System.Threading.ThreadPriority.AboveNormal; thread.Start(); }
private void StartAsync(FrameQueue _frameQueue, HttpWebRequest request, OnDisconnect _onDisconnect = null) { if (mjpgReader != null) { Debug.LogError("previous play not stopped."); return; } frameQueue = _frameQueue; onDisconnect = _onDisconnect; eof = false; failed = false; StartConnectionAsync(request); }
public void Stop() { Logger.LogInfo("DelaylessFrameDecoder.Stop() called."); frameQueue = null; requestTermination = true; }
public DelaylessFrameDecoder(FrameQueue _queue) { frameQueue = _queue; }
// for POST public void StartAsync(string _url, FrameQueue _frameQueue, byte[] postBytes, OnDisconnect _onDisconnect = null) { HttpWebRequest request = CreateRequestForPOST(_url, postBytes); StartAsync(_frameQueue, request, _onDisconnect); }
// for GET public void StartAsync(string _url, FrameQueue _frameQueue, OnDisconnect _onDisconnect = null) { HttpWebRequest request = CreateRequestForGET(_url); StartAsync(_frameQueue, request, _onDisconnect); }