Bug 831224: Added MP3 frame parser, r=padenot

MP3 streams consist of small frames, with each frame containing the
audio data of a few hundred milliseconds. The actual duration of the
encoded audio can among frames.

Each frame consists of a 4-byte frame header, some optional extra
information, and the audio data. The MP3 frame parser walks over the
content of an MP3 stream, computes the duration of each frame from
the frame header, and sums them up to the streams complete duration.

The MP3 frame parser does not decode the actual audio data.

--HG--
extra : rebase_source : 1b101d8f9bf73e62672933d0f5d20253d7b25491
Bug 831224: Allow update of the media duration, r=padenot

With MP3 streams, the media duration might change after we received
new data. This patch adds infrastructure to signal the new duration
to the media decoder and state machine. It will also fire an event
of type 'durationchange' to the DOM.

--HG--
extra : rebase_source : f417b968e81d9c9a1aff8ae3174079a297eb371b
Bug 831224: Parse MP3 frame headers in OmxDecoder, r=padenot

On FirefoxOS, the Android libraries estimate the duration of MP3 streams
by examining the first MP3 frame header. This only works for streams with
constant bit rate. For streams with variable bit rate, a too short or too
long duration is computed.

This patch adds support for parsing MP3 frame headers. The decoder handles
file streams by reading them at once at the beginning and parsing them
immediately. Network streams are updated when a new fragment arrives.

--HG--
extra : rebase_source : bffb9447a5fdba4145e83f5aeb3c2accfb7872d6
Bug 831224: Use multi-threaded I/O for reading and processing MP3 frames, r=padenot

Reading large MP3 files from a slow medium, such as an SD card, takes
several seconds. This is too long for interactive applications like the
music app.

With this patch, the OmxDecoder reads large MP3 file in smaller chunks
and hands over each chunk individually to the MP3 parser. Reading the
file is done in the I/O thread, which is allowed to block, parsing is
done on the main thread.

The current chunk size is 8 MiB, which is small enough to not cause any
delay.

--HG--
extra : rebase_source : 4effb86db481c405a97760cd98f4218dde42104d
Bug 831224: Added mochitest for variable-bitrate MP3s, r=padenot

The test checks the duration of an MP3 file with variable bitrate. The
MP3 file only contains silence. It uses a high bit-rate encoding for its
first half, a low bit-rate encoding for its second half. The correct
duration is 10 seconds, but an incorrect implementation will return a
much shorter value.

--HG--
extra : rebase_source : f62cf69a631a276c4e6e96e827ab615367cad877
Bumping gaia.json for 2 gaia-central revision(s)

========

https://hg.mozilla.org/integration/gaia-central/rev/1d71d406d7fe
Author: George <georgeiscoming@gmail.com>
Desc: Merge pull request #11380 from cctuan/896934

Bug 896934 - [Settings] Listen new system message for Bluetooth pairing requests in connectivity.js

========

https://hg.mozilla.org/integration/gaia-central/rev/2a769b49413e
Author: cctuan <georgeiscoming@gmail.com>
Desc: Bug 896934 - [Settings] Listen new system message for Bluetooth pairing requests in connectivity.js
Bug 902480 - B2G RIL: follow up to bug 743150 - this._sendTelephonyMessage is not a function. r=allstars.chh
Bug 891257 - Disconnect gracefully when the user turns off Bluetooth, r=mrbkap
Bumping gaia.json for 2 gaia-central revision(s)

========

https://hg.mozilla.org/integration/gaia-central/rev/20258a9a0b11
Author: Etienne Segonzac <etienne@segonzac.info>
Desc: Merge pull request #10929 from lissyx/bug892520

Bug 892520 - Ensure serialization of upgrade path

========

https://hg.mozilla.org/integration/gaia-central/rev/bc8ab7a1d3bd
Author: Alexandre Lissy <lissyx+github@lissyx.dyndns.org>
Desc: Bug 892520 - Ensure proper upgrade path
Bumping gaia.json for 4 gaia-central revision(s)

========

https://hg.mozilla.org/integration/gaia-central/rev/dbfb03ac7296
Author: Etienne Segonzac <etienne@segonzac.info>
Desc: Merge pull request #10865 from lissyx/bug889245

Bug 889245 - [Call log] When user make a voicemail call, call log shows ...

========

https://hg.mozilla.org/integration/gaia-central/rev/89fb5a99c545
Author: Alexandre Lissy <lissyx+mozillians@lissyx.dyndns.org>
Desc: Bug 889245 - [Call log] Display emergency number or Voicemail string

========

https://hg.mozilla.org/integration/gaia-central/rev/a212e78a202b
Author: Arthur Chen <crh0716@gmail.com>
Desc: Merge pull request #11333 from crh0716/900386

Bug 900386 - Use localize function to do localization r=evelyn

========

https://hg.mozilla.org/integration/gaia-central/rev/e6fa4ecb565c
Author: crh0716 <crh0716@gmail.com>
Desc: Bug 900386 - Use localize function to do localization
Bumping gaia.json for 4 gaia-central revision(s)

========

https://hg.mozilla.org/integration/gaia-central/rev/80cde7ce278e
Author: Jose M. Cantera <jmcanterafonseca@gmail.com>
Desc: Merge pull request #11378 from jmcanterafonseca/align_fb_active_merge

Bug 901571 - FB Contacts must not match under different circumstances

========

https://hg.mozilla.org/integration/gaia-central/rev/f11cf9fe096d
Author: Jose M. Cantera <jmcanterafonseca@gmail.com>
Desc: Bug 901571 - FB Contacts must not match under different circumstances

========

https://hg.mozilla.org/integration/gaia-central/rev/45321dab19db
Author: Jose M. Cantera <jmcanterafonseca@gmail.com>
Desc: Merge pull request #11419 from jmcanterafonseca/edit_active_merge

Bug 902391 - Active merge in edit mode for Contacts

========

https://hg.mozilla.org/integration/gaia-central/rev/316758208a3c
Author: Jose M. Cantera <jmcanterafonseca@gmail.com>
Desc: Bug 902391 - Active merge in edit mode for Contacts
Bumping gaia.json for 1 gaia-central revision(s)

========

https://hg.mozilla.org/integration/gaia-central/rev/cf4b9e1d77d1
Author: Julien Wajsberg <felash@gmail.com>
Desc: Bug 902390 - [sms][mms] the input is 1px too high with the 'Moz' font r=borja
merge mozilla-central to b2g-inbound
Bumping gaia.json for 2 gaia-central revision(s)

========

https://hg.mozilla.org/integration/gaia-central/rev/f10c7f33dcf5
Author: Etienne Segonzac <etienne@segonzac.info>
Desc: Merge pull request #11421 from lissyx/bug900848

Bug 900848 - Use withheld-number string key instead of unknown in call log r=etienne

========

https://hg.mozilla.org/integration/gaia-central/rev/bb08fbdbb2bf
Author: Alexandre Lissy <lissyx+github@lissyx.dyndns.org>
Desc: Bug 900848 - Use withheld-number string key instead of unknown in call log

Also remove a portion of dead code that was referring to the unknown
key: since |Utils.getPhoneNumberPrimaryInfo| will return null in case
|matchingTel| is invalid, it means that either way we will have been
thrown out of this code previously, since the |matchingTel| is being
checked for in the if() code just above.
Bumping gaia.json for 5 gaia-central revision(s)

========

https://hg.mozilla.org/integration/gaia-central/rev/20da670c9645
Author: Fabien Cazenave <fabien@cazenave.cc>
Desc: Merge pull request #11055 from fabi1cazenave/smsCursorScroll-bug875338

Bug 875338: the content is not scrolled down when sending an MMS, r=gnarf

========

https://hg.mozilla.org/integration/gaia-central/rev/8dd470c59d5d
Author: Fabien Cazenave <fabien@cazenave.cc>
Desc: Bug 875338: unit tests

========

https://hg.mozilla.org/integration/gaia-central/rev/91bcb68bfa1b
Author: Fabien Cazenave <fabien@cazenave.cc>
Desc: Bug 875338: the content is not scrolled down when sending an MMS, r=gnarf
+ do not scroll to bottom if the user already scrolled manually

========

https://hg.mozilla.org/integration/gaia-central/rev/347ba8341259
Author: ochameau <poirot.alex@gmail.com>
Desc: Merge pull request #11409 from ochameau/bug902625

Bug 902625 - DEVICE_DEBUG doesn't correctly set remote debugging mode r=@vingtetun

========

https://hg.mozilla.org/integration/gaia-central/rev/5415ffb74ea9
Author: Alexandre Poirot <poirot.alex@gmail.com>
Desc: Bug 902625 - DEVICE_DEBUG doesn't correctly set remote debugging mode
Bumping gaia.json for 3 gaia-central revision(s)

========

https://hg.mozilla.org/integration/gaia-central/rev/feae4d017673
Author: Fabien Cazenave <fabien@cazenave.cc>
Desc: Merge pull request #11428 from fabi1cazenave/smsCursorScroll-bug875338

Bug 875338: the content is not scrolled down when sending an MMS, r=julienw

========

https://hg.mozilla.org/integration/gaia-central/rev/ad7ba745f6df
Author: Fabien Cazenave <fabien@cazenave.cc>
Desc: Bug 875338: the content is not scrolled down when sending an MMS, r=julienw

========

https://hg.mozilla.org/integration/gaia-central/rev/5bb8a4a8dcbf
Author: Fabien Cazenave <fabien@cazenave.cc>
Desc: Revert "Merge pull request #11055 from fabi1cazenave/smsCursorScroll-bug875338"

This reverts commit 96e8da02b834bc15fc4adc402b40c08ba36b2a59, reversing
changes made to b3fb4af5ef69ac087afc77329fdd82d5c6d122a0.
Bumping gaia.json for 2 gaia-central revision(s)

========

https://hg.mozilla.org/integration/gaia-central/rev/6b84d29fdbb8
Author: Arthur Chen <crh0716@gmail.com>
Desc: Merge pull request #11336 from crh0716/895226

Bug 895226 - Add a check on active call r=etienne, a=leo+

========

https://hg.mozilla.org/integration/gaia-central/rev/7a870cd8850d
Author: crh0716 <crh0716@gmail.com>
Desc: Bug 895226 - Get the previous call from handledCalls directly
Bumping gaia.json for 2 gaia-central revision(s)

========

https://hg.mozilla.org/integration/gaia-central/rev/f7fe122995e7
Author: Francisco Jordano <arcturus@ardeenelinfierno.com>
Desc: Merge pull request #11420 from borjasalguero/paris_ftu_screen

Bug 902800 - [FTU] Flickering with start tour screen after About Firefox OS screen r=arcturus

========

https://hg.mozilla.org/integration/gaia-central/rev/e0b402a314ea
Author: borjasalguero <fbsc@tid.es>
Desc: Bug 902800 - [FTU] Flickering with start tour screen after About Firefox OS screen r=fcampo
Bumping gaia.json for 2 gaia-central revision(s)

========

https://hg.mozilla.org/integration/gaia-central/rev/2665bef33588
Author: Francisco Borja Salguero Castellano <fbsc@tid.es>
Desc: Merge pull request #11427 from borjasalguero/paris_sms_manifest

Bug 879199 - Remove mobileconnection permission from SMS app r=julienw

========

https://hg.mozilla.org/integration/gaia-central/rev/a1350cdec37c
Author: borjasalguero <fbsc@tid.es>
Desc: Bug 879199 - Remove mobileconnection permission from SMS app r=julienw
Bug 831224: List vbr.mp3 in Makefile.in, r=padenot

The MP3 file for testing variable-bitrate MP3's was not listed
in the Makefile; and thus missing from the installation. The
respective Mochitest always failed.