Пример #1
0
        public int DeleteItem(int item)
        {
            int ret = libvlc_playlist_delete_item(VlcInstance.VlcInstanceHandle, item, _excp);

            VlcException.HandleVlcException(ref _excp);
            return(ret);
        }
Пример #2
0
 public static void HandleVlcException(ref VlcException ex)
 {
     if (ex.Raised)
     {
         throw ex;
     }
 }
Пример #3
0
        public int Add(string uri, string name)
        {
            int ret = libvlc_playlist_add(VlcInstance.VlcInstanceHandle, uri, name, _excp);

            VlcException.HandleVlcException(ref _excp);
            return(ret);
        }
Пример #4
0
        private bool has_next()
        {
            int ret = libvlc_log_iterator_has_next(iter, _excp);

            VlcException.HandleVlcException(ref _excp);
            return(ret == 1 ? true : false);
        }
Пример #5
0
 private void free()
 {
     if (!iter.IsInvalid)
     {
         libvlc_log_iterator_free(iter, _excp);
         VlcException.HandleVlcException(ref _excp);
     }
 }
Пример #6
0
        public VlcInstance(VlcConfig vlcConfig)
        {
            VlcConfig = vlcConfig;

            VlcInstanceHandle = libvlc_new(VlcConfig.Arguments.Length, VlcConfig.Arguments, _excp);
            VlcException.HandleVlcException(ref _excp);

            VlcPlaylist = new VlcPlaylist(this);
        }
Пример #7
0
 public void Clear()
 {
     lock (SyncRoot)
     {
         if (Count > 0)
         {
             libvlc_log_clear(_log, _excp);
             VlcException.HandleVlcException(ref _excp);
         }
     }
 }
Пример #8
0
        public virtual bool MoveNext()
        {
            bool ret = has_next();

            if (ret)
            {
                libvlc_log_message_t msg = new libvlc_log_message_t();
                msg.message_size = (uint)Marshal.SizeOf(typeof(libvlc_log_message_t));

                IntPtr p = libvlc_log_iterator_next(iter, ref msg, _excp);
                VlcException.HandleVlcException(ref _excp);

                last_ptr = (libvlc_log_message_t)Marshal.PtrToStructure(p, typeof(libvlc_log_message_t));
            }

            return(ret);
        }
Пример #9
0
        protected override bool ReleaseHandle()
        {
            bool ret = true;

            if (!IsInvalid)
            {
                VlcException _excp = new VlcException();
                libvlc_log_iterator_free(this, _excp);
                if (!_excp.Raised)
                {
                    handle = IntPtr.Zero;
                }
                else
                {
                    Console.WriteLine("Failed to Release VlcLogEnum Handle: " + _excp.Message);
                    ret = false;
                }
            }

            return(ret);
        }
Пример #10
0
 private void get_iter()
 {
     iter = libvlc_log_get_iterator(log, _excp);
     VlcException.HandleVlcException(ref _excp);
 }
Пример #11
0
 public void TakeSnapshot(string fileName)
 {
     libvlc_video_take_snapshot(_input, fileName, _excp);
     VlcException.HandleVlcException(ref _excp);
 }
Пример #12
0
 public void Clear()
 {
     libvlc_playlist_clear(VlcInstance.VlcInstanceHandle, _excp);
     VlcException.HandleVlcException(ref _excp);
 }
Пример #13
0
 public void Next()
 {
     libvlc_playlist_next(VlcInstance.VlcInstanceHandle, _excp);
     VlcException.HandleVlcException(ref _excp);
 }
Пример #14
0
 public void Prev()
 {
     libvlc_playlist_prev(VlcInstance.VlcInstanceHandle, _excp);
     VlcException.HandleVlcException(ref _excp);
 }
Пример #15
0
 public void Stop()
 {
     libvlc_playlist_stop(VlcInstance.VlcInstanceHandle, _excp);
     VlcException.HandleVlcException(ref _excp);
 }
Пример #16
0
 internal VlcLog(VlcInstanceHandle instance)
 {
     _instance = instance;
     _log      = libvlc_log_open(_instance, _excp);
     VlcException.HandleVlcException(ref _excp);
 }
Пример #17
0
 public void Play(Int32 item)
 {
     libvlc_playlist_play(VlcInstance.VlcInstanceHandle, item, 0, null, _excp);
     VlcException.HandleVlcException(ref _excp);
 }
Пример #18
0
 public void VideoToggleFullScreen()
 {
     libvlc_toggle_fullscreen(_input, _excp);
     VlcException.HandleVlcException(ref _excp);
 }
Пример #19
0
 public void ToggleMute()
 {
     libvlc_audio_toggle_mute(VlcInstanceHandle, _excp);
     VlcException.HandleVlcException(ref _excp);
 }