/* 
 * Created on 2004/08/13 
 * Author aki@www.xucker.jpn.org 
 * License Apache2.0 or Common Public License 
 */ 
package org.jpn.xucker.audiotowma9; 
 
import java.io.File; 
 
import org.jpn.xucker.commons.swt.series.ResultData; 
import org.jpn.xucker.commons.swt.series.wfs.WrapperExecuter; 
 
/** 
 *  
 * 
 */ 
public class AudioToWma9Executer extends WrapperExecuter{ 
 
    /* (non-Javadoc) 
     * @see org.jpn.xucker.commons.swt.series.wfs.WrapperExecuter#setResultValue(org.jpn.xucker.commons.swt.series.ResultData, java.lang.String, java.io.File, java.io.File, java.io.File) 
     */ 
    protected void setResultValue(ResultData result, String rootPath, File outputDir, File input, File output) { 
        // TODO Auto-generated method stub 
        if(output.exists()){ 
            result.setValue(resultLabel[0],""); 
        }else{ 
            result.setValue(resultLabel[0],"s"); 
        } 
        
        result.setValue(resultLabel[1],output.getName()); 
        result.setValue(resultLabel[2],output.getParent()); 
    } 
 
    /* (non-Javadoc) 
     * @see org.jpn.xucker.commons.swt.series.wfs.WrapperExecuter#createArgs(java.io.File, java.io.File) 
     */ 
    protected String[] createArgs(File inputFile, File outputFile) { 
       isDebug=true; 
       isPrint=true; 
        
        String args[]=null; 
            args = new String[] { "cscript",commandPath, "-input",inputFile.getAbsolutePath(), 
                    "-output",outputFile.getAbsolutePath(), "-a_codec","WMA9LSL","-a_mode","2" }; 
         
        return args; 
    } 
 
}
    
    |