We disabled MP3 playback on Windows using DirectShow as the duration was
being incorrectly reported. While DirectShow was disabled, we supported
MP3 playback via Windows Media Foundation, and we still used DirectShow
on WinXP. Now that bug 918135 has landed the duration calculation has
been fixed, so we can re-enable DirectShow for MP3 playback for all
Windows versions. This enables us to avoid suffering from bug 882537 for
MP3 on Windows.
Adds comments to PlatformDecoderModule.h, and describes the call model
better. Renames CreateAudioDecoder and CreateVideoDecoder to
CreateAACDecoder and CreateH264Decoder. We may change them to accept a
codec parameter and have more general names in future when we need to
support more codecs here.
findFirstNonZeroSample() won't return an offset > buffer length, so clamping
the result to <= 2048 is not necessary.
--HG--
extra : transplant_source : %28HV%B3%9A%AA%D6%8C6n%FD%18%AE%D6g%83%03%EA%09%D4
New wave files differ from those generated from ogg files using sox 14.4.1 and
libvorbis 1.3.3 by being one quantum less on about half of the samples.
--HG--
extra : transplant_source : B%27%8F%2B%40%22%C5%25%0CS%22%28%40%C0%C3%0EM%87%87%A7
Using double precision for the processing means the main loop is unlikely to
encounter subnormals and provides suitable extra precision to minimize
accumulation of error.
If the tail output values are denormalized when converted to single precision
then flush them to zero to reduce downstream computation cost.
--HG--
extra : transplant_source : %08%09u%C48%E3i%AB%23%1B%D8_kz%E5%A8_%3D%C4%93
Support the Opus audio codec in the WebM (Matroska) container.
This is part of the "WebM 2" proposed spec, which also includes
the new VP9 video codec. Alas we weren't able to get concensus
to change the doctype of filename extension to mark the revision
allowing the new codecs.
This patch introduces two more MP3 test cases to exercise MP3FrameParser:
* vbr-head.mp3: This file contains a Xing header which gives an exact duration
of 10 seconds. However, it only contains 4 MP3 frames total for a real
duration of around 1 second. It is expected that we read the Xing header
and report 10 seconds.
* huge-id3.mp3: This file contains more than 130KB of ID3 tags. When we search
for MP3 frames, we give up after X KB of non-MP3 data. ID3 tags should not
count towards the non-MP3 count, since they can be very large. This test
case makes sure the skipping of ID3 tags works correctly.
Now that we have stopped counting ID3 tags towards our count of non-MP3 data in
the MP3 frame parser, our threshold for claiming a stream is not MP3 can be far
lower than before.
This patch adds support for our home-grown MP3 frame parser to the GStreamer
backend so that our duration estimation is consistent across all platforms.
This patch adds support for Xing and VBRI headers to MP3FrameParser so that we
can calculate the exact duration of an MP3 file if these headers are present.
It is also now more robust against large ID3 tags and discontinuities in input.
We monitor the stream's output current time via a new MediaStreamListener
owned by DecodedStreamData. We also track its main-thread Finished status.
While we're writing to a DecodedStreamData stream that hasn't finished its
output, we stay in the DECODER_STATE_COMPLETED state so we can keep updating
video and firing timeupdates.
GetClock() uses the DecodedStreamData stream's current time as the source for
the clock if there is one.
--HG--
extra : rebase_source : aba1d092d3d347e26ebd823d61fcbfa40a8cd1fe