Exemple #1
0
 /// <summary>
 /// Dispose of VlcManager
 /// </summary>
 public void Dispose()
 {
     if (myClient == null)
         return;
     myClient.Dispose();
     myClient = null;
 }
Exemple #2
0
 internal VideoLanManager(VideoLanClient vlc)
 {
     Vlc         = vlc;
     _Streams    = new VlmStreamCollection <VlmStream>();
     _Broadcasts = new VlmStreamCollection <VlmBroadcastStream>();
     _VODs       = new VlmStreamCollection <VlmVodStream>();
 }
Exemple #3
0
        private void TryToCreateClient()
        {
            if (myHandle == IntPtr.Zero)
                return;

            string path = string.IsNullOrEmpty(myVlcLibPath) ? AppDomain.CurrentDomain.BaseDirectory : myVlcLibPath;
            if (!File.Exists(Path.Combine(path, "libvlc.dll")) || !File.Exists(Path.Combine(path, "libvlccore.dll")))
                return;
            myClient = new VideoLanClient(path);
            myClient.PluginPath = Path.Combine(path, "plugins");
            myPlayer = myClient.CreateMediaPlayer(myHandle);
            myPlayer.Audio.Volume = Volume;
            myPlayer.Audio.Mute = Mute;
            //todo
            //myPlayer.PositionChanged +=
            //    delegate(object sender, VlcPositionChangedEventArgs e)
            //    {
            //        Position = e.Position;
            //    };
            myPlayer.StateChanged +=
                delegate(object sender, VlcStateChangedEventArgs e)
                {
                    if (e.NewState == VlcState.Ended)
                    {
                        Position = 0;
                    }
                };
        }
Exemple #4
0
 internal VideoLanManager(VideoLanClient vlc)
 {
     Vlc = vlc;
     _Streams = new VlmStreamCollection<VlmStream>();
     _Broadcasts = new VlmStreamCollection<VlmBroadcastStream>();
     _VODs = new VlmStreamCollection<VlmVodStream>();
 }