private void TryPlay() { using (VlcMedia media = new VlcMedia(VlcInstanceHandle, mLocation)) { VlcMediaPlayerHandle = LibVlc.libvlc_media_player_new_from_media(media.Handle); if (VlcMediaPlayerHandle == IntPtr.Zero) { throw new VlcException(); } } LibVlc.libvlc_media_player_set_hwnd(VlcMediaPlayerHandle, mDrawHandle); LibVlc.libvlc_media_player_play(VlcMediaPlayerHandle); }
private void TryPlay() { using (VlcMedia media = new VlcMedia(VlcInstanceHandle, mLocation)) { VlcMediaPlayerHandle = LibVlc.libvlc_media_player_new_from_media(media.Handle); if (VlcMediaPlayerHandle == IntPtr.Zero) throw new VlcException(); } LibVlc.libvlc_media_player_set_hwnd(VlcMediaPlayerHandle, mDrawHandle); LibVlc.libvlc_media_player_play(VlcMediaPlayerHandle); }
public VlcMediaPlayer(VlcMedia media) { Handle = LibVlc.libvlc_media_player_new_from_media(media.Handle); if (Handle == IntPtr.Zero) throw new VlcException(); }