Ejemplo n.º 1
0
        private static IntPtr createInstance(string[] parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }
            //
            IntPtr res = LibVlcInterop.libvlc_new(parameters);

            if (IntPtr.Zero == res)
            {
                throw new VlcInternalException(LibVlcInterop.libvlc_errmsg());
            }
            //
            return(res);
        }
Ejemplo n.º 2
0
        private static IntPtr createInstance(string[] parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }
            //
            libvlc_exception_t exc = new libvlc_exception_t();

            LibVlcInterop.libvlc_exception_init(ref exc);
            IntPtr res = LibVlcInterop.libvlc_new(parameters, ref exc);

            if (exc.b_raised != 0)
            {
                throw new VlcInternalException(exc.Message);
            }
            //
            return(res);
        }