/** * 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(); }
public static int Main(string[] args) { string[] argv = new string[]{ "-vv", "-I", "dummy", "--plugin-path=../../modules" }; Console.WriteLine ("Running on LibVLC {0} ({1})", VLC.Version, VLC.ChangeSet); Console.WriteLine (" (compiled with {0})", VLC.Compiler); VLC vlc = new VLC (argv); foreach (string mrl in args) { Media media = new Media (vlc, mrl); Player player = new Player (media); DumpMedia (media); DumpMedia ((Media)media.Clone ()); media.StateChanged += WriteMediaState; /*foreach (MetaType type in Enum.GetValues (typeof (MetaType))) { string meta = media.GetMeta (type); if (meta != null) Console.WriteLine (" {0}: {1}", type, meta); }*/ player.Play (); do { DumpPlayer (player); Sleep (500); } while (player.IsPlaying); player.Stop (); media.Dispose (); player.Dispose (); } vlc.Dispose (); return 0; }
/** * 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 (); }
Media media; /**< Active media */ #endregion Fields #region Constructors /** * Creates a player with no medias. * An input media will be needed before this media player can be used. * * @param instance VLC instance */ public Player(VLC instance) { this.media = null; handle = LibVLC.PlayerCreate (instance.Handle, ex); Raise (); }
/** * Creates a player with no medias. * An input media will be needed before this media player can be used. * * @param instance VLC instance */ public Player(VLC instance) { this.media = null; handle = LibVLC.PlayerCreate(instance.Handle, ex); Raise(); }