Beispiel #1
0
    public bool StartVideoFromMemory(string name, System.IntPtr moviePointer, uint movieLength, bool loop, bool allowNativeFormat, bool useBT709)
    {
        Filename = name;
        if (moviePointer != System.IntPtr.Zero && movieLength > 0)
        {
            if (_movieHandle < 0)
            {
                _movieHandle = AVProWindowsMediaPlugin.GetInstanceHandle();
            }

            if (AVProWindowsMediaPlugin.LoadMovieFromMemory(_movieHandle, moviePointer, movieLength, loop, allowNativeFormat))
            {
                CompleteVideoLoad(useBT709);
            }
            else
            {
                Debug.LogWarning("[AVProWindowsMedia] Movie failed to load");
                Close();
            }
        }
        else
        {
            Debug.LogWarning("[AVProWindowsMedia] No movie file specified");
            Close();
        }

        return(_movieHandle >= 0);
    }
Beispiel #2
0
    public bool StartVideoFromMemory(string name, System.IntPtr moviePointer, long movieLength, bool allowNativeFormat, bool useBT709, bool allowAudio, bool useAudioDelay, bool useAudioMixer, bool useDisplaySync, bool ignoreFlips, FilterMode textureFilterMode, TextureWrapMode textureWrapMode)
    {
        Filename = name;
        if (moviePointer != System.IntPtr.Zero && movieLength > 0)
        {
            if (_movieHandle < 0)
            {
                _movieHandle = AVProWindowsMediaPlugin.GetInstanceHandle();
            }

            if (AVProWindowsMediaPlugin.LoadMovieFromMemory(_movieHandle, moviePointer, movieLength, allowNativeFormat, allowAudio, useAudioDelay, useAudioMixer, useDisplaySync))
            {
                CompleteVideoLoad(useBT709, ignoreFlips, textureFilterMode, textureWrapMode);
            }
            else
            {
                Debug.LogWarning("[AVProWindowsMedia] Movie failed to load");
                Close();
            }
        }
        else
        {
            Debug.LogWarning("[AVProWindowsMedia] No movie file specified");
            Close();
        }

        return(_movieHandle >= 0);
    }