public void StopStreaming() { MJMedia.Logger.LogInfo("StopStreaming() called."); if (framePusher != null) { framePusher.Stop(); framePusher = null; } if (frameDecoder != null) { frameDecoder.Stop(); frameDecoder = null; } }
private void StartStreamingCommon(StartConnectionFunc startConnection) { MJMedia.Logger.LogInfo("StartStreaming() called."); StopStreaming(); if (!TurboJpegDecoder.TurboAvailable) { MJMedia.Logger.LogError("Error! TurboJPEG is not available."); return; } if (framePusher != null) { framePusher.Stop(); } framePusher = new FramePusher(); StartCoroutine(FramePushStartReconnectable(startConnection)); frameDecoder = new DelaylessFrameDecoder(frameQueue); frameDecoder.Start(); }