示例#1
0
        /**
         * Starts a VLC interface plugin.
         *
         * @param name name of the interface plugin (e.g. "http", "qt4", ...)
         */
        public void AddInterface(string name)
        {
            U8String uname = new U8String(name);

            LibVLC.AddIntf(Handle, uname, ex);
            Raise();
        }
示例#2
0
        /**
         * Throws a managed exception if LibVLC has returned a native
         * unmanaged exception. Clears the native exception.
         */
        public void Raise()
        {
            if (raised == 0)
            {
                return;
            }

            string msg = U8String.FromNative(message);

            try
            {
                if (msg != null)
                {
                    throw new VLCException(code, msg);
                }
                else
                {
                    throw new VLCException(code);
                }
            }
            finally
            {
                LibVLC.ExceptionClear(this);
            }
        }
示例#3
0
文件: media.cs 项目: rdp/vlc-1
        /**
         * Creates a Media object.
         *
         * @param instance VLC instance
         * @param mrl Media Resource Locator (file path or URL)
         */
        public Media(VLC instance, string mrl)
        {
            U8String umrl = new U8String(mrl);

            handle = LibVLC.MediaCreate(instance.Handle, umrl, ex);
            Raise();
            Attach();
        }
示例#4
0
        /**
         * Loads the native LibVLC and creates a LibVLC instance.
         *
         * @param args VLC command line parameters for the LibVLC Instance.
         */
        public VLC(string[] args)
        {
            U8String[] argv = new U8String[args.Length];
            for (int i = 0; i < args.Length; i++)
            {
                argv[i] = new U8String(args[i]);
            }

            handle = LibVLC.Create(argv.Length, argv, ex);
            Raise();
        }
示例#5
0
文件: media.cs 项目: rdp/vlc-1
        /**
         * Add VLC input item options to the media.
         * @code
         * Media m = new Media(vlc, "http://www.example.com/music.ogg");
         * m.AddOptions(":http-user-agent=LibVLC.Net "
         *            + ":http-proxy=proxy:8080", true);
         * @endcode
         * @param options VLC options in VLC input item format
         *                (see example below)
         * @param trusted whether the options are set by a trusted agent
         *                (e.g. the local computer configuration) or not
         *                (e.g. a downloaded file).
         * @version VLC 0.9.9 if trusted is false
         */
        public void AddOptions(string options, bool trusted)
        {
            U8String uopts = new U8String(options);

            if (trusted)
            {
                LibVLC.MediaAddOption(Handle, uopts, ex);
            }
            else
            {
                LibVLC.MediaAddUntrustedOption(Handle, uopts, ex);
            }
            Raise();
        }
示例#6
0
文件: media.cs 项目: rdp/vlc-1
        /**
         * Add VLC input item options to the media.
         * @code
         * Media m = new Media(vlc, "http://www.example.com/music.ogg");
         * m.AddOptions(":http-user-agent=LibVLC.Net "
         *            + ":http-proxy=proxy:8080", true);
         * @endcode
         * @param options VLC options in VLC input item format
         *                (see example below)
         * @param trusted whether the options are set by a trusted agent
         *                (e.g. the local computer configuration) or not
         *                (e.g. a downloaded file).
         * @version VLC 0.9.9 if trusted is false
         */
        public void AddOptions(string options, bool trusted)
        {
            U8String uopts = new U8String (options);

            if (trusted)
                LibVLC.MediaAddOption (Handle, uopts, ex);
            else
                LibVLC.MediaAddUntrustedOption (Handle, uopts, ex);
            Raise ();
        }
示例#7
0
文件: media.cs 项目: rdp/vlc-1
        /**
         * Creates a Media object.
         *
         * @param instance VLC instance
         * @param mrl Media Resource Locator (file path or URL)
         */
        public Media(VLC instance, string mrl)
        {
            U8String umrl = new U8String (mrl);

            handle = LibVLC.MediaCreate (instance.Handle, umrl, ex);
            Raise ();
            Attach ();
        }
示例#8
0
文件: instance.cs 项目: rdp/vlc-1
        /**
         * Starts a VLC interface plugin.
         *
         * @param name name of the interface plugin (e.g. "http", "qt4", ...)
         */
        public void AddInterface(string name)
        {
            U8String uname = new U8String (name);

            LibVLC.AddIntf (Handle, uname, ex);
            Raise ();
        }
示例#9
0
文件: instance.cs 项目: rdp/vlc-1
        /**
         * Loads the native LibVLC and creates a LibVLC instance.
         *
         * @param args VLC command line parameters for the LibVLC Instance.
         */
        public VLC(string[] args)
        {
            U8String[] argv = new U8String[args.Length];
            for (int i = 0; i < args.Length; i++)
                argv[i] = new U8String (args[i]);

            handle = LibVLC.Create (argv.Length, argv, ex);
            Raise ();
        }
示例#10
0
文件: libvlc.cs 项目: mfk78/vlc
 void MediaAddOption(MediaHandle media, U8String options,
                     NativeException ex);
示例#11
0
文件: libvlc.cs 项目: mfk78/vlc
 MediaHandle MediaCreateAsNode(InstanceHandle inst, U8String name,
                               NativeException ex);
示例#12
0
文件: libvlc.cs 项目: mfk78/vlc
 MediaHandle MediaCreate(InstanceHandle inst, U8String mrl,
                         NativeException ex);
示例#13
0
文件: libvlc.cs 项目: mfk78/vlc
 void AddIntf(InstanceHandle h, U8String name, NativeException ex);
示例#14
0
文件: ustring.cs 项目: rdp/vlc-1
 /**
  * Converts an heap-allocated nul-terminated UTF-8 characters array
  * into a managed string.
  * @return the resulting managed string.
  */
 public override string ToString()
 {
     return(U8String.FromNative(handle));
 }
示例#15
0
 void MediaAddOptionWithFlag(MediaHandle media, U8String options,
                             MediaOptionFlag flag,
                             NativeException ex);