Beispiel #1
0
        public void Dispose()
        {
            if (LoadFailed)
            {
                return;
            }

            Internal.deleteVideo(videoInternal);
            videos.Remove(videoInternal);

            sound?.Dispose();

            texture.Dispose();
        }
Beispiel #2
0
        public void Dispose()
        {
            LibVlcWrapper.LibVlcMethods.libvlc_media_player_stop(mediaPlayer);

            Monitor.Enter(mutex);
            //just waiting for callbacks to be done
            Monitor.Exit(mutex);

            Marshal.FreeHGlobal(unmanagedData);

            sound.Dispose();

            LibVlcWrapper.LibVlcMethods.libvlc_media_release(media);
            LibVlcWrapper.LibVlcMethods.libvlc_media_player_release(mediaPlayer);

            texture.Dispose();

            videos.Remove(videoId);
        }