Qcp File Format Parsing

Source: Internet
Author: User

General View of qcp subchunks

<Qlcm-form>
Riff ('qlcm'
<Format chunk 'fmt'> // required
[<Variable Rate chunk-'vrat'>] // required
[<Label chunk 'labl'>] // optional
[<Offsets in increments chunk-'offs'>] // optional

<Codec packet data chunk-'data'> // required
[<Configuration chunk-'cnfg'>] // optional
[<Text chunk-'text'>] // optional
)

Detailed view of qcp subchunks

Riff 'qlcm '{
Byte [4] id = {'R', 'I', 'F', 'F '}
Uint32 size = size of riff chunk excluding ID and size
Byte [4] = {'Q', 'l', 'C', 'M '}

<Format chunk-'fmt'> {
Byte [4] id = {'F', 'M','t ',''}
Uint32 size = size of 'fmt' subchunk excluding ID and
Size
Byte mjv = major version of this format (see note 1)
Byte mnv = minor version of this format (see note 1)
Struct type_qpl_info {
Struct guid {
Uint32 data1;
Uint16 data2;
Uint16 data3;
Byte data4 [8];
} = ID; // unique ID of this
// Codec
Uint16 version; // version # Of
// Codec
Byte name [80]; // proper name of
// Codec
Uint16 avgbitspersec; // avg bps of
// Codec
Uint16 bytesperpacket; // size of a packet in
// Bytes (max rate)
// Including Header
// Byte for that
// Packet
Uint16 samplesperblock; // size of a block in
// Samples
// Encoder encodes one
// Block into one
// Packet
// Decoder decodes one
// Packet into one
// Block
Uint16 samplespersec; // SPS of input needed
// For The Encoder
// And output from the decoder

Uint16 bitspersample; // bits per sample
// The above
// Contains rate Header Format info
Struct type_qpl_variable_rate {
Uint32 numofrates; // # of Rates
// High byte = rate, low byte = size of following
// Packet
Uint16 bytesperpacket [8];
} = Variablerate;

Uint32 reserved [5]; // Reserved
} = Codec info
}
<Variable Rate chunk-'vrat'> {
Byte [4] id = {'V', 'R', 'A','t '}
Uint32 size = size of 'vrat' subchunk excluding ID and size
Uint32 variablerate;
// If (= 0) packet data is fixed rate
// Else if (<0xffff0000) Variable Rate
Uint32 sizeinpackets;
// The data chunk size in packets
}
[<Label chunk-'labl'>] // see optional chunks
[<Offsets in increments chunk-'offs'>] // see optional chunks
<Codec packet data chunk-'data'> {
Byte [4] id = {'D', 'A', 't', 'A '}
Uint32 size = size of 'data' subchunk excluding ID and size
Byte [] = actual packet data (see note 2)
}
[<Configuration chunk-'cnfg'>] // see optional chunks
[<Text chunk-'text'>] // see optional chunks
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.