示例#1
0
        public Player()
        {
            // Initialization (TODO: Make all the stuff configurable, of course)
            Playlist            = new Playlist();
            PlayedHistory       = new List <Song>();
            totalHistory        = new List <Song>();
            Queue               = new List <Song>();
            RandomSettings      = new PlayerRandomSettings(100, true);
            PlaybackState       = TP_PLAYBACKSTATE.Stopped;
            playbackMode        = TP_PLAYBACKMODE.Playlist;
            playbackDirection   = TP_PLAYBACKDIRECTION.Forward;
            PlaybackLoggingMode = TP_PLAYBACKLOG.After80Percent;
            historyPosition     = -1;

            // VLC Initialization
            string[] args = new string[] {
                "--ignore-config",
                @"--plugin-path=C:\Program Files (x86)\VideoLAN\VLC\plugins",
                //,"--vout-filter=deinterlace", "--deinterlace-mode=blend"
            };

            instance = new VlcInstance(args);
            vlc      = null;
            factory  = new MediaPlayerFactory();

            /*vlc = factory.CreatePlayer<IVideoPlayer>();
             * vlc.Events.MediaEnded += new EventHandler(Events_MediaEnded);
             * vlc.Events.TimeChanged += new EventHandler<Declarations.Events.MediaPlayerTimeChanged>(Events_TimeChanged);
             * vlc.Events.PlayerPlaying += new EventHandler(Events_PlayerPlaying);*/
        }
示例#2
0
 public VlcMedia(VlcInstance instance, string url)
 {
     Handle = LibVlc.libvlc_media_new_location(instance.Handle, url);
     if (Handle == IntPtr.Zero)
     {
         throw new VlcException();
     }
 }