Occurences of PR_MAX in layout/style/nsCSSProps.cpp and xpcom/glue/nsTArray.h
can not be converted without C++11 support (constexpr).
--HG--
extra : rebase_source : 3b4f7e26690fad487dd11594449948411d4e79bc
This is the full implementation of the AudioBuffer object. There are
two ways to create these objects from an audio context and this patch
implements only one of them.
The construction of the AudioBuffer object is a two step process: the
object should be created with operator new first, and then
InitializeBuffers should be called on it. InitializeBuffers is
fallible, because it uses the JS API to create the underlying typed
arrays, but that's fine, since the length of the buffers comes from web
content, and we don't want to use infallible allocations for those
anyways.
We hold on to the JS objects from the C++ implementation, and trace
through all of those objects, so that a GC does not kill those object
without us knowing.
The buffer should be possible to manipulate from both C++ and JS, and
the C++ object probably needs to support a set of methods for the C++
callers at some point.
Verify that we return metadata tags from streams with only a
single comment by adding a single comment to a file which
previously had none.
This bug went undetected because all our examples had either
multiple tags, or none.
This is the bare minimum that one needs in order to get those interfaces
implemented. The work to make the simplest of Web Audio test cases
actually pass will be done in bug 792649.
This is the bare minimum that one needs in order to get those interfaces
implemented. The work to make the simplest of Web Audio test cases
actually pass will be done in bug 792649.
Remember parsed comments from the OpusTags header in
an array member variable. Add a method to generate
the nsHTMLMediaElement::MetadataTags hash table from
those entries, performing the same validatation we
do for Vorbis.
This feature is tested by adding the existing opus
test file to gMetadataTests.
IsValidVorbisTagName is moved to a static method
on nsOggCodecState so it can be shared among the
subclasses and easily called externally.
MetadataTags generation for Vorbis streams is moved
to the same method name on nsVorbisState to allow
sharing of the parsing and validation code as much
as possible, since both formats use the same scheme.
It's arguable whether contrustuction better belongs to
nsOggReader or to the nsCodecState subclasses, since in
theory the various multiplexed streams interact in
determining the canonical tag list, but it is the
per-codec streams which contain the metadata in Ogg.
Bug 748144 switched our opus decoding to use the
opus_multistream api so we could handle surround
audio files. The version of opus in our tree at
the time didn't include extern "C" {} protection
in the corresponding header, so we had to provide
our own.
With the update to the opus 1.0.0 source release
in bug 790381, this oversight is corrected and
we can remove our work-around.
Add a new test file with some invalid comments and verify
they are filtered out of the mozGetMetadata() output.
The new file includes the following valid edge cases:
- empty tag name
- empty tag value
- punctuation in the tag name
and the following invalid cases:
- non-ascii tag name
- invalid characters in tag name
- non-utf-8 tag value
- no tag=value separator
Also updates the mochitest messages to be less confusing.
Verify that tag names are ASCII within the valid character
ranges and that values are UTF-8, skipping comments where
these checks fail.
As written, the check in IsValidVorbisTagName() for the
separator character isn't necessary, because we've already
split on the first occurance. However, it's better to run
the extra check in case the function is reused elsewhere.