code: public static MediaInfo mediaInfo(String filename) {
          MediaInfo result;
          LibMediaInfo lib = LibMediaInfo.INSTANCE;
          Pointer handle = lib.MediaInfo_New();
          if (handle != null) {
              try {
                  int opened = lib.MediaInfo_Open(handle, new WString(filename));
                  if (opened == 1) {
                      WString data = lib.MediaInfo_Inform(handle);
                      lib.MediaInfo_Close(handle);
                      result = new Parser(data.toString()).parse();
                  }
                  else {
                      result = null;
                  }
              }
              finally {
                  lib.MediaInfo_Delete(handle);
              }
          }
          else {
              result = null;
          }
          return result;
      }
docs: Extract media information for a particular file.
  
  @param filename name of the file
  @return media information
  @throws MediaInfoParseException if a parse error occurs