C# Class GSF.Media.RiffChunk

Represents the type ID and size for a "chunk" in a RIFF media format file.

The Resource Interchange File Format (RIFF) is a generic meta-format for storing data in tagged chunks. It was introduced in 1991 by Microsoft and IBM, and was presented by Microsoft as the default format for Windows 3.1 multimedia files. It is based on Electronic Arts's Interchange File Format, introduced in 1985, the only difference being that multi-byte integers are in little-endian format, native to the 80x86 processor series used in IBM PCs, rather than the big-endian format native to the 68k processor series used in Amiga and Apple Macintosh computers, where IFF files were heavily used. (The specification for AIFF, the big-endian analogue of RIFF, was published by Apple Computer in 1988.) The Microsoft implementation is mostly known through file formats like AVI, ANI and WAV, which use the RIFF meta-format as their basis.

Some common RIFF file types: File extension Description WAV Windows audio file AVI Windows audio/video file ANI Animated Windows cursors RMI Windows RIFF MIDI file CDR CorelDRAW vector graphics file

Inheritance: ISupportBinaryImage
Afficher le fichier Open project: GridProtectionAlliance/gsf Class Usage Examples

Méthodes publiques

Méthode Description
Clone ( ) : RiffChunk

Creates a copy of the RiffChunk.

GenerateBinaryImage ( byte buffer, int startIndex ) : int

Generates a binary representation of this RiffChunk and copies it into the given buffer.

ReadNext ( Stream source ) : RiffChunk

Attempts to read the next RIFF chunk from the source stream.

RiffChunk ( string typeID ) : System

Constructs a new RiffChunk for the given typeID.

Méthodes protégées

Méthode Description
RiffChunk ( RiffChunk preRead, string typeID ) : System

Constructor for derived classes used to initialize and validate RiffChunk properties.

Private Methods

Méthode Description
ISupportBinaryImage ( byte buffer, int startIndex, int length ) : int
RiffChunk ( ) : System

Method Details

Clone() public méthode

Creates a copy of the RiffChunk.
public Clone ( ) : RiffChunk
Résultat RiffChunk

GenerateBinaryImage() public méthode

Generates a binary representation of this RiffChunk and copies it into the given buffer.
is null. /// or is less than 0 -or- /// and will exceed length. ///
public GenerateBinaryImage ( byte buffer, int startIndex ) : int
buffer byte Buffer used to hold generated binary image of the source object.
startIndex int 0-based starting index in the to start writing.
Résultat int

ReadNext() public static méthode

Attempts to read the next RIFF chunk from the source stream.
RIFF chunk too small, media file corrupted.
public static ReadNext ( Stream source ) : RiffChunk
source Stream Source stream for next RIFF chunk.
Résultat RiffChunk

RiffChunk() protected méthode

Constructor for derived classes used to initialize and validate RiffChunk properties.
protected RiffChunk ( RiffChunk preRead, string typeID ) : System
preRead RiffChunk Pre-parsed header.
typeID string Expected type ID.
Résultat System

RiffChunk() public méthode

Constructs a new RiffChunk for the given typeID.
public RiffChunk ( string typeID ) : System
typeID string Expected type ID.
Résultat System