/** * 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(); }
/** * 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); } }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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 (); }
/** * 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 (); }
/** * 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 (); }
/** * 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 (); }
void MediaAddOption(MediaHandle media, U8String options, NativeException ex);
MediaHandle MediaCreateAsNode(InstanceHandle inst, U8String name, NativeException ex);
MediaHandle MediaCreate(InstanceHandle inst, U8String mrl, NativeException ex);
void AddIntf(InstanceHandle h, U8String name, NativeException ex);
/** * 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)); }
void MediaAddOptionWithFlag(MediaHandle media, U8String options, MediaOptionFlag flag, NativeException ex);