public VlcLog CreateVlcLog(ILog log, ILogVerbosityManager logVerbosityManager)
        {
            if (log == null)
            {
                throw new ArgumentNullException("log");
            }
            //
            IntPtr libvlc_log_t = LibVlcInterop.libvlc_log_open(vlclibDescriptor);

            if (libvlc_log_t == IntPtr.Zero)
            {
                throw new VlcInternalException(LibVlcInterop.libvlc_errmsg());
            }
            //
            return(new VlcLog(libvlc_log_t, logVerbosityManager, log));
        }
Example #2
0
        public VlcLog CreateVlcLog(ILog log, ILogVerbosityManager logVerbosityManager)
        {
            if (log == null)
            {
                throw new ArgumentNullException("log");
            }
            //
            libvlc_exception_t exc = new libvlc_exception_t();

            LibVlcInterop.libvlc_exception_init(ref exc);
            IntPtr libvlc_log_t = LibVlcInterop.libvlc_log_open(vlclibDescriptor, ref exc);

            if (exc.b_raised != 0)
            {
                throw new VlcInternalException(exc.Message);
            }
            //
            return(new VlcLog(libvlc_log_t, logVerbosityManager, log));
        }