C# Класс 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

Наследование: ISupportBinaryImage
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
RiffChunk ( RiffChunk preRead, string typeID ) : System

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

Приватные методы

Метод Описание
ISupportBinaryImage ( byte buffer, int startIndex, int length ) : int
RiffChunk ( ) : System

Описание методов

Clone() публичный Метод

Creates a copy of the RiffChunk.
public Clone ( ) : RiffChunk
Результат RiffChunk

GenerateBinaryImage() публичный Метод

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.
Результат int

ReadNext() публичный статический Метод

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.
Результат RiffChunk

RiffChunk() защищенный Метод

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.
Результат System

RiffChunk() публичный Метод

Constructs a new RiffChunk for the given typeID.
public RiffChunk ( string typeID ) : System
typeID string Expected type ID.
Результат System