DSPRelated.com
Forums

ASF container format

Started by mano...@yahoo.com July 6, 2007
Hi all,

I am working on ASF container format & not getting how the extra codec specific data is calculated for different codecs included in ASF file.

I have included below the 18 bytes of WAVEFORMATEX header which is padded with 22 bytes of extra type specific data. Microsofts msdn library specifies this structures at

http://msdn2.microsoft.com/en-us/library/ms790436.aspx

the structure is as follows :

/* 18 bytes WAVEFORMATEX header */
WORD format_tag
WORD number_of_channels
DWORD samples_per_second
DWORD average_number_of_bytes_per_second
WORD block_alignment
WORD bits_per_sample
WORD cbsize

/* 22 bytes WAVEFORMATEXENSIBLE header */
union
{
WORD valid_bits_per_sample;
WORD samples_per_block;
WORD reserved;

}samples;

DWORD channel_mask;
GUID subformat;
But not all the .asf files hold exact 22 bytes of type specific data but it varies like sometimes 10 byte or 16 bytes.

So can someone explain this to me the magic behind this varying type specific data.

Is it possible of writing ASF file without this type specific data ?

I will very much appreciate the help :)

Many thanks in advance,
Manoj