C# Class SCSharp.Smk.SmackerDecoder

ファイルを表示 Open project: kangaroo/scsharp Class Usage Examples

Private Properties

Property Type Description
DecodeVideo void
SmackerDecoder System
UpdatePalette void

Public Methods

Method Description
GetAudioData ( int streamIndex ) : byte[]

Returns the audiodata from the specified audiostream

GetIndex ( uint x, uint y ) : uint
GetVideoDataBitmap ( ) : Bitmap

Encapsulates the video data from the last decoded frame in a System.Drawing.Bitmap

ReadNextFrame ( ) : void

Reads the next frame.

Reset ( ) : void

Resets the decoder to the first frame, if there is a ring frame the first frame is skipped as it should.

SeekTo ( int i ) : void

Set the decoder to decode the specified frame next

Protected Methods

Method Description
GetColorPalette ( uint nColors ) : System.Drawing.Imaging.ColorPalette

Hack as described on MSDN to get a clean palette

Private Methods

Method Description
DecodeVideo ( ) : void
SmackerDecoder ( SCSharp.Smk.SmackerFile file ) : System

Creates a new decoder for the specified file

UpdatePalette ( ) : void

Method Details

GetAudioData() public method

Returns the audiodata from the specified audiostream
public GetAudioData ( int streamIndex ) : byte[]
streamIndex int The index of the stream to return audio data for, should be between 0 and 7
return byte[]

GetColorPalette() protected method

Hack as described on MSDN to get a clean palette
protected GetColorPalette ( uint nColors ) : System.Drawing.Imaging.ColorPalette
nColors uint the number of colors the palette should contain (between 2-256)
return System.Drawing.Imaging.ColorPalette

GetIndex() public method

public GetIndex ( uint x, uint y ) : uint
x uint
y uint
return uint

GetVideoDataBitmap() public method

Encapsulates the video data from the last decoded frame in a System.Drawing.Bitmap
public GetVideoDataBitmap ( ) : Bitmap
return System.Drawing.Bitmap

ReadNextFrame() public method

Reads the next frame.
public ReadNextFrame ( ) : void
return void

Reset() public method

Resets the decoder to the first frame, if there is a ring frame the first frame is skipped as it should.
public Reset ( ) : void
return void

SeekTo() public method

Set the decoder to decode the specified frame next
public SeekTo ( int i ) : void
i int the index of the next frame the decoder should decode
return void