Beispiel #1
0
    public bool Update(bool force)
    {
        bool updated = false;

        if (_movieHandle >= 0)
        {
            AVProWindowsMediaPlugin.Update(_movieHandle);
            if (_formatConverter != null)
            {
                bool ready = true;

//#if UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4_0_1 || UNITY_4_0
#if !UNITY_3_5 && !UNITY_3_4 && !UNITY_3_3 && !UNITY_3_2 && !UNITY_3_1 && !UNITY_3_0
                ready = true;
#else
                if (AVProWindowsMediaManager.ConversionMethod.Unity35_OpenGL == AVProWindowsMediaManager.Instance.TextureConversionMethod)
                {
                    ready = true;
                }
                else if (!force)
                {
                    ready = AVProWindowsMediaPlugin.IsNextFrameReadyForGrab(_movieHandle);
                }
#endif

                if (ready)
                {
                    updated = _formatConverter.Update();
#if UNITY_EDITOR
                    if (updated)
                    {
                        UpdateFPS();
                    }
#endif
                }
            }
            else
            {
                updated = false;
            }
        }
        return(updated);
    }
Beispiel #2
0
    public bool Update(bool force)
    {
        bool updated = false;

        if (_movieHandle >= 0)
        {
            AVProWindowsMediaPlugin.Update(_movieHandle);
            if (_formatConverter != null)
            {
                updated = _formatConverter.Update();
#if AVPROWINDOWSMEDIA_FPS
                if (updated)
                {
                    UpdateFPS();
                }
#endif
            }
        }
        return(updated);
    }