Example #1
0
 /**
  * Add a media item, with options, to the play-list.
  *
  * @param mrl media resource locator
  * @param mediaOptions zero or more media item options
  */
 public void AddMedia(string mrl, params string[] mediaOptions)
 {
     Logger.Debug("AddMedia(mrl={},mediaOptions={})", mrl, mediaOptions);
     try {
         LockList();
         // Create a new native media descriptor
         IntPtr mediaDescriptor = newMediaDescriptor(mrl, mediaOptions);
         // Insert the media descriptor into the media list
         LibVlc.libvlc_media_list_add_media(mediaListInstance, mediaDescriptor);
         // Release the native reference
         ReleaseMediaDescriptor(mediaDescriptor);
     }
     finally {
         UnlockList();
     }
 }