示例#1
0
    public void StopStreaming()
    {
        MJMedia.Logger.LogInfo("StopStreaming() called.");

        if (framePusher != null)
        {
            framePusher.Stop();
            framePusher = null;
        }
        if (frameDecoder != null)
        {
            frameDecoder.Stop();
            frameDecoder = null;
        }
    }
示例#2
0
 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();
 }