3 * @brief Media descriptor class
7 /**********************************************************************
8 * Copyright (C) 2007-2009 RĂ©mi Denis-Courmont. *
9 * This program is free software; you can redistribute and/or modify *
10 * it under the terms of the GNU General Public License as published *
11 * by the Free Software Foundation; version 2 of the license, or (at *
12 * your option) any later version. *
14 * This program is distributed in the hope that it will be useful, *
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
17 * See the GNU General Public License for more details. *
19 * You should have received a copy of the GNU General Public License *
20 * along with this program; if not, you can get it from: *
21 * http://www.gnu.org/copyleft/gpl.html *
22 **********************************************************************/
25 //using System.Collections.Generic;
26 using System.Runtime.InteropServices;
28 namespace VideoLAN.LibVLC
31 * @brief MediaHandle: unmanaged LibVLC media pointer
34 internal sealed class MediaHandle : NonNullHandle
36 protected override void Destroy ()
38 LibVLC.MediaRelease (handle);
43 * @brief Media: a source media
44 * Use this class to extract meta-informations from a media.
46 public class Media : BaseObject
48 internal MediaHandle Handle
52 return handle as MediaHandle;
57 * Creates a Media object.
59 * @param instance VLC instance
60 * @param mrl Media Resource Locator (file path or URL)
62 public Media (VLC instance, string mrl)
64 U8String umrl = new U8String (mrl);
66 handle = LibVLC.MediaCreate (instance.Handle, umrl, ex);
70 public void AddOptions (string options, bool trusted)
72 U8String uopts = new U8String (options);
75 LibVLC.MediaAddOption (Handle, uopts, ex);
77 LibVLC.MediaAddUntrustedOption (Handle, uopts, ex);