C# Class MeGUI.Calculator

Mostra file Open project: pphh77/MeGui Class Usage Examples

Public Methods

Method Description
Calculator ( MeGUI.MainForm mainForm ) : System
SetDefaults ( ulong nbFrames, double framerate, int hRes, int vRes, MeGUI.VideoCodecSettings vSettings, List audioStreams ) : void

sets video, audio and codec defaults

Protected Methods

Method Description
AddAudio ( ) : AudioTrackSizeTab
AddAutoSelectHandler ( Control control ) : void
AddExtra ( ) : ExtraSizeTab
Calculate ( ) : void

Calculates by the selected method

GetAudioStreams ( ) : IEnumerable

Gets the audio streams by finding them in the form

GetAudioTypes ( ) : IEnumerable

Gets the audio types used by the audio streams

GetTotalExtraSize ( ) : FileSize

Gets the total extra size by finding the extras and summing their sizes

SetAudioLength ( ) : void
TagIndexes ( ) : void
UpdateContainers ( ) : void

Determines which containers can be selected based on video and audio streams

UpdateTotalFrames ( ) : void
UpdateTotalSeconds ( ) : void

Private Methods

Method Description
addAudioLink_Clicked ( object sender, EventArgs e ) : void
addAudioToolStripMenuItem_Click ( object sender, EventArgs e ) : void
addExtraToolStripMenuItem_Click ( object sender, EventArgs e ) : void
audio_SelectedIndexChanged ( object sender, EventArgs e ) : void
bframes_CheckedChanged ( object sender, EventArgs e ) : void
calculationMode_CheckedChanged ( object sender, EventArgs e ) : void

handles the change in between bitrate and size calculation mode

codec_CheckedChanged ( object sender, EventArgs e ) : void

handles codec selection change the choice is not limited for any codec

fpsChooser_SelectionChanged ( object sender, string val ) : void
picTime_Click ( object sender, EventArgs e ) : void

Switches between showing h m s and total seconds

targetSize_SelectionChanged ( object sender, string val ) : void
textField_TextChanged ( object sender, EventArgs e ) : void
time_ValueChanged ( object sender, EventArgs e ) : void

Method Details

AddAudio() protected method

protected AddAudio ( ) : AudioTrackSizeTab
return AudioTrackSizeTab

AddAutoSelectHandler() protected method

protected AddAutoSelectHandler ( Control control ) : void
control Control
return void

AddExtra() protected method

protected AddExtra ( ) : ExtraSizeTab
return ExtraSizeTab

Calculate() protected method

Calculates by the selected method
protected Calculate ( ) : void
return void

Calculator() public method

public Calculator ( MeGUI.MainForm mainForm ) : System
mainForm MeGUI.MainForm
return System

GetAudioStreams() protected method

Gets the audio streams by finding them in the form
protected GetAudioStreams ( ) : IEnumerable
return IEnumerable

GetAudioTypes() protected method

Gets the audio types used by the audio streams
protected GetAudioTypes ( ) : IEnumerable
return IEnumerable

GetTotalExtraSize() protected method

Gets the total extra size by finding the extras and summing their sizes
protected GetTotalExtraSize ( ) : FileSize
return FileSize

SetAudioLength() protected method

protected SetAudioLength ( ) : void
return void

SetDefaults() public method

sets video, audio and codec defaults
public SetDefaults ( ulong nbFrames, double framerate, int hRes, int vRes, MeGUI.VideoCodecSettings vSettings, List audioStreams ) : void
nbFrames ulong number of frames of the video source
framerate double framerate of the video source
hRes int
vRes int
vSettings MeGUI.VideoCodecSettings
audioStreams List
return void

TagIndexes() protected method

protected TagIndexes ( ) : void
return void

UpdateContainers() protected method

Determines which containers can be selected based on video and audio streams
protected UpdateContainers ( ) : void
return void

UpdateTotalFrames() protected method

protected UpdateTotalFrames ( ) : void
return void

UpdateTotalSeconds() protected method

protected UpdateTotalSeconds ( ) : void
return void