Пример #1
0
        /**
         * Set a local meta data value for a media instance.
         * <p>
         * Setting meta does not affect the underlying media file until {@link #save()} is called.
         *
         * @param metaType type of meta data
         * @param media media instance
         * @param value meta data value
         */
        private void SetMeta(libvlc_meta_e metaType, string metaValue)
        {
            Logger.Trace("SetMeta(metaType={},media={},value={})", metaType, media, metaValue);
            IntPtr metaValuePtr = NativeString.StringPointer(metaValue);

            try {
                LibVlc.libvlc_media_set_meta(media, (int)metaType, metaValuePtr);
            }
            finally {
                NativeString.Release(metaValuePtr);
            }
        }
 /**
  * Set a local meta data value for a media instance.
  * <p>
  * Setting meta does not affect the underlying media file until {@link #save()} is called.
  * 
  * @param metaType type of meta data
  * @param media media instance
  * @param value meta data value
  */
 private void SetMeta(libvlc_meta_e metaType, string metaValue) {
     Logger.Trace("SetMeta(metaType={},media={},value={})", metaType, media, metaValue);
     IntPtr metaValuePtr = NativeString.StringPointer(metaValue);
     try {
         LibVlc.libvlc_media_set_meta(media, (int)metaType, metaValuePtr);
     }
     finally {
         NativeString.Release(metaValuePtr);
     }
 }
Пример #3
0
        /*	    protected void finalize() throws Throwable {
         *      Logger.Debug("finalize()");
         *      Logger.Debug("Meta data has been garbage collected");
         *      // FIXME should this invoke release()?
         *  }*/

        /**
         * Get a local meta data value for a media instance.
         *
         * @param metaType type of meta data
         * @return meta data value
         */
        private string GetMeta(libvlc_meta_e metaType)
        {
            Logger.Trace("GetMeta(metaType={},media={})", metaType, media);
            return(NativeString.GetNativeString(LibVlc.libvlc_media_get_meta(media, (int)metaType)));
        }
 /*	    protected void finalize() throws Throwable {
         Logger.Debug("finalize()");
         Logger.Debug("Meta data has been garbage collected");
         // FIXME should this invoke release()?
     }*/
 
     /**
      * Get a local meta data value for a media instance.
      * 
      * @param metaType type of meta data
      * @return meta data value
      */
     private string GetMeta(libvlc_meta_e metaType) {
         Logger.Trace("GetMeta(metaType={},media={})", metaType, media);
         return NativeString.GetNativeString(LibVlc.libvlc_media_get_meta(media, (int)metaType));
     }