C# Class Business.AviSynthScriptBuilder

Facilitates the creation of AviSynth scripts.
显示文件 Open project: mysteryx93/NaturalGroundingPlayer Class Usage Examples

Public Methods

Method Description
AddPluginPath ( ) : void

Adds a line containing the plugin path. Must be called before loading any other plugin.

AppendLine ( ) : void

Appends a line break to the script.

AppendLine ( IFormatProvider culture, string value ) : void

Appends a line to the script following specified format. Line break is automatically added.

AppendLine ( string value ) : void

Appends a line to the script following specified format. Line break is automatically added.

AviSynthScriptBuilder ( ) : System
AviSynthScriptBuilder ( string script ) : System
Cleanup ( ) : void

Moves all LoadPlugin and Import commands to the beginning to make the script more readable.

GetAsciiPath ( string path ) : string
LoadPluginAvsi ( string fileName ) : void
LoadPluginDll ( string fileName ) : void

If script ends with DitherPost(), replace it with Dither_out() when rawOutput is true. If rawOutput is false, it does the reverse.

OpenAvi ( string fileName, bool audio ) : void
OpenDirect ( string fileName, string cacheFile, bool audio, int threads ) : void
RemoveMT ( ) : void

Removes MultiThreading commands from script.

Replace ( string oldValue, string newValue ) : void

Replaces all instances of oldValue with newValue.

WriteToFile ( string fileName ) : void

Private Methods

Method Description
GetShortPath ( string path ) : string
GetShortPathName ( [ path, [ shortPath, int shortPathLength ) : int
IsASCII ( string value ) : bool

Method Details

AddPluginPath() public method

Adds a line containing the plugin path. Must be called before loading any other plugin.
public AddPluginPath ( ) : void
return void

AppendLine() public method

Appends a line break to the script.
public AppendLine ( ) : void
return void

AppendLine() public method

Appends a line to the script following specified format. Line break is automatically added.
public AppendLine ( IFormatProvider culture, string value ) : void
culture IFormatProvider The culture to use while formatting.
value string The value or format to append.
return void

AppendLine() public method

Appends a line to the script following specified format. Line break is automatically added.
public AppendLine ( string value ) : void
value string The value or format to append.
return void

AviSynthScriptBuilder() public method

public AviSynthScriptBuilder ( ) : System
return System

AviSynthScriptBuilder() public method

public AviSynthScriptBuilder ( string script ) : System
script string
return System

Cleanup() public method

Moves all LoadPlugin and Import commands to the beginning to make the script more readable.
public Cleanup ( ) : void
return void

GetAsciiPath() public method

public GetAsciiPath ( string path ) : string
path string
return string

LoadPluginAvsi() public method

public LoadPluginAvsi ( string fileName ) : void
fileName string
return void

LoadPluginDll() public method

If script ends with DitherPost(), replace it with Dither_out() when rawOutput is true. If rawOutput is false, it does the reverse.
public LoadPluginDll ( string fileName ) : void
fileName string
return void

OpenAvi() public method

public OpenAvi ( string fileName, bool audio ) : void
fileName string
audio bool
return void

OpenDirect() public method

public OpenDirect ( string fileName, string cacheFile, bool audio, int threads ) : void
fileName string
cacheFile string
audio bool
threads int
return void

RemoveMT() public method

Removes MultiThreading commands from script.
public RemoveMT ( ) : void
return void

Replace() public method

Replaces all instances of oldValue with newValue.
public Replace ( string oldValue, string newValue ) : void
oldValue string The string to be replaced.
newValue string The string to replace with.
return void

WriteToFile() public method

public WriteToFile ( string fileName ) : void
fileName string
return void