/** * Insert a media item, with options, to the play-list. * * @param index position at which to insert the media item (counting from zero) * @param mrl media resource locator * @param mediaOptions zero or more media item options */ public void InsertMedia(int index, string mrl, params string[] mediaOptions) { Logger.Debug("InsertMedia(index={},mrl={},mediaOptions={})", index, 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_insert_media(mediaListInstance, mediaDescriptor, index); // Release the native reference ReleaseMediaDescriptor(mediaDescriptor); } finally { UnlockList(); } }