WAV is too generic to impose more-or-less arbitrary boundaries on the
sample rate and channel count caps. For example, there are 384 kHz WAV
files. Another example: it is in theory possible that somebody puts DSD
data into a WAV file, which will then have a sample rate of ~2.8 MHz.
For this reason, get rid of the rate and channel caps unless they are
fixed values. Downstream anyway usually knows the limitations better.
https://bugzilla.gnome.org/show_bug.cgi?id=761514
Windows Media Video Screen (WMV Screen) are video formats that
specilise in screencast content. This provides a correct media type
for them instead of just video/x-asf-unknown.
Xsub (fourcc DXSB) is a subpicture stream used for embeded
subtitles on divx files. This provides a correct media type
for them instead of just video/x-avi-unknown.
Some ADPCM encoding tools like Oxelon generate WAV files with
wrong format header declaring an invalid bitrate.
As wavparse uses the average bitrate to calculate timestamps
and duration the decoder can be confused by receiving timestamps
completely out of sync with the decoded samples.
ADPCM is a CBR audio codec so we can calculate the average bitrate
instead of trusting the format header.
https://bugzilla.gnome.org/show_bug.cgi?id=636245
gst_buffer_copy_into() will append to any existing
memory region, so don't create a buffer and alloc
some memory, but just create an empty buffer and
let _copy_into() append the memory we want. Fixes
the palette being 2048 bytes with the first half
being filled with garbage.
https://bugzilla.gnome.org/show_bug.cgi?id=686046
... which is supposed to align with WAVEFORMATEX, but has confusing
names compared to the last 2 fields in the latter (and still
misses 1 field compared to the latter).
Remove the _ in front of the endianness prefix.
Remove the _3 postfix for the 24 bits formats.
Add a _32 postfix after the formats that occupy extra space beyond their
natural size.
The result is that the GST_AUDIO_NE() macro can simply append the endianness
after all formats and that we only specify a different sample width when it is
different from the natural size of the sample. This makes things more consistent
and follows the pulseaudio conventions instead of the alsa ones.