Пример #1
0
        public static VlcMedia CreateFromFileDescriptor(VlcInstance instance, int fd)
        {
            VlcMedia m = new VlcMedia();

            m.Handle = LibVlc.libvlc_media_new_fd(instance.Handle, fd);
            return(m);
        }
Пример #2
0
        public static VlcMedia CreateFromUrl(VlcInstance instance, string url)
        {
            VlcMedia m = new VlcMedia();

            m.Handle = LibVlc.libvlc_media_new_location(instance.Handle, url);
            return(m);
        }
Пример #3
0
        public static VlcMedia CreateFromFilepath(VlcInstance instance, string file)
        {
            VlcMedia m = new VlcMedia();

            m.Handle = LibVlc.libvlc_media_new_path(instance.Handle, file);
            return(m);
        }
Пример #4
0
 public void SetMediaFile(string path)
 {
     if (!File.Exists(path))
     {
         return;
     }
     using (VlcMedia media = VlcMedia.CreateFromFilepath(instance, path))
     {
         SetMedia(media);
     }
 }
Пример #5
0
 public void SetMedia(VlcMedia media)
 {
     LibVlc.libvlc_media_player_set_media(Handle, media.Handle);
 }
Пример #6
0
 public VlcMediaPlayer(VlcMedia media)
 {
     Handle               = LibVlc.libvlc_media_player_new_from_media(media.Handle);
     IsKeyInputConsumed   = false;
     IsMouseInputConsumed = false;
 }