IEnumerator Start()
        {
            // Sync with FFmpeg pipe thread at the end of every frame.
            for (var eof = new WaitForEndOfFrame();;)
            {
                yield return(eof);

                _session?.CompletePushFrames();
            }
        }
Exemple #2
0
        IEnumerator Start()
        {
            _session = null;
            // Sync with FFmpeg pipe thread at the end of every frame.
            for (var eof = new WaitForEndOfFrame(); ;)
            {
                yield return(eof);

                if (_session != null)
                {
                    _session.CompletePushFrames();
                }
                else
                {
                    Debug.LogWarning("Stream Session is not Initialized");
                }
            }
        }