Commit Graph

55 Commits

Author SHA1 Message Date
Thomas Zimmermann
aa0552cb38 Bug 947905: Release OmxDecoder on main thread
OmxDecoder refers to MediaResource, which must be released on
the main thread. This patch changes the MP3 parser logic to send
a runnable to the main thread for releasing OmxDecoder.
2013-12-12 09:57:56 +01:00
Ethan Tseng
02ae3ae476 Bug 938512 - HTMLMediaElement does not fire loadedmetadata. r=sworkman 2013-11-26 17:25:40 +08:00
Bruce Sun
0d03bd6791 Bug 933091 - Re-enable MP3FrameParser to parse MP3 duration. r=sotaro, r=doublec 2013-11-01 11:02:53 +08:00
Peter Chang
59195f23b7 Bug 922510 - Extend GonkNativeWindow to support android JB 4.2.2, r=sotaro,gps 2013-10-18 10:42:43 +08:00
Benjamin Chen
a9ca45668c Bug 831645 - part2, Rtsp media resource and decoder. r=roc, doublec, sworkman, khuey, gps 2013-09-23 17:53:36 +08:00
Sotaro Ikeda
852bed7c7d Bug 923848 - Reuse mp3 file format check result. r=doublec 2013-10-14 07:37:09 -04:00
Thomas Zimmermann
ba40fab0c9 Bug 924678: Stop MP3 parser if decoder got cleared, r=doublec
If the decoder has been cleaned up, there is no point in further
parsing the MP3 file. This patch makes the I/O logic stop in that
case.

The patch also fixes a bug where the beginning of an MP3 chunk was
parsed multiple times if the chunk is larger than 4 GiB.

--HG--
extra : rebase_source : d247ed3995991d362c51a0666274e9de3b90b7d2
2013-10-14 10:38:48 +02:00
Thomas Zimmermann
568572011d Bug 924678: Explicitly clear OmxDecoder::mDecoder, r=doublec
The MediaDecoderStateMachine frees the Decoder during its own
shutdown. If the the MediaDecoderStateMachine for an MP3 file
gets cleaned up before the MP3 frame parser is finished, the
OmxDecoder operates with an invalid Decoder.

With this patch, the MediaDecoderStateMachine informs the
OmxDecoder to clear the decoder field. The MP3 parser logic
detects this case and returns.

--HG--
extra : rebase_source : 0a00de3cf7b95ede77408e5d43cccbcd706750cd
2013-10-14 10:38:17 +02:00
Sotaro Ikeda
514fe61054 Bug 922334 - Add zero division check and prevent unncecessary mp3 parsing r=doublec 2013-10-03 10:53:21 +02:00
Sotaro Ikeda
c2ebe80f60 Bug 914870 - Reduce mp3 parse chunk buffer size to 32KiB. r=doublec 2013-10-01 08:06:57 -04:00
Sotaro Ikeda
81b1a4b5b1 Bug 871364 - Support GonkNativeWindow on gonk-JB r=jmuizelaar,mwu,doublec,mikeh,glandium 2013-09-12 11:40:26 +02:00
Chris Pearce
c438f19ab9 Bug 910897 - Use MP3FrameParser in DirectShow in order to calculate the duration. r=padenot 2013-09-10 12:45:33 +12:00
Chris Pearce
128925efa5 Bug 910966 - Use MP3FrameParser in DirectShow's SourceFilter, to more accurately determine the offset of the first MP3 frame. This enables us to only pass the MP3 data into DirectShow, which can't handle large ID3v2 tags. r=padenot 2013-09-09 09:47:54 +12:00
Ehsan Akhgari
3b48889d78 Bug 912702 - Minimize the #includes in content/media; r=roc 2013-09-05 16:25:17 -04:00
Ehsan Akhgari
22fac42fb0 Backed out changeset 2f15518f566e (bug 912702) because of B2G JB Emulator build bustage
--HG--
extra : rebase_source : 6c01ad3bc2f91b0e7e3edab84aedbfe064310a8b
2013-09-05 13:29:38 -04:00
Ehsan Akhgari
2ce2ec0cdb Bug 912702 - Minimize the #includes in content/media; r=roc 2013-09-04 17:58:14 -04:00
Thomas Zimmermann
107e31f04d 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.
2013-05-06 20:07:29 +02:00
Thomas Zimmermann
b0f7962d2b 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.
2013-01-24 13:38:32 +01:00
Ed Morley
2ac38e590a Backed out changeset e334b3139e2a (bug 831224) 2013-08-08 09:59:45 -07:00
Ed Morley
7d5f2c1626 Backed out changeset 909cddbd5af9 (bug 831224) 2013-08-08 09:59:42 -07:00
Thomas Zimmermann
df06d19b33 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
2013-05-06 20:07:29 +02:00
Thomas Zimmermann
04820e6a7e 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
2013-01-24 13:38:32 +01:00
Sotaro Ikeda
bcdff6ddb3 Bug 889238 - Add error handling to OMXCodecProxy. r=doublec 2013-07-07 16:33:57 -04:00
Marco Chen
8033c82e72 Bug 872462 - OmxDecoder::Pause/Start didn't follow AOSP's definition. r=doublec 2013-07-01 12:02:03 +08:00
Sotaro Ikeda
b5f87b6bb8 Bug 884654 - Fix deadlock come from OmxDecoder::statusChanged(). r=doublec 2013-06-26 09:36:22 -04:00
Sotaro Ikeda
2d8e4dae08 Bug 871485 - Share hw codec between applications/tasks. r=mwu, r=doublec, r=roc 2013-06-10 08:22:05 -04:00
Robert O'Callahan
a1197b8439 Bug 877461. Part 3: Retry libstagefright audio/video decoding if it fails due to a timeout. r=sotaro
--HG--
extra : rebase_source : 2ccd8afaca1e4055eb0105f25754176b0ff37034
2013-06-06 11:43:43 +12:00
Vladimir Vukicevic
ef8707b5f0 b=843599; use gralloc buffers for WebGL streaming on B2G; r=nical,jgilbert,jrmuizel 2013-05-27 10:12:13 -04:00
Sotaro Ikeda
c6a6b2489d Bug 874325 - Add lock to MediaStreamSource::readAt(). r=doublec 2013-06-03 10:41:54 -04:00
Vladimir Vukicevic
0640a22aff Backed out changeset fd25fb9e951e and 0f0c080ed1ba (bug 843599) for mac debug assertion failures on a CLOSED TREE 2013-05-27 11:45:59 -04:00
Vladimir Vukicevic
158e87ce65 b=843599; use gralloc buffers for WebGL streaming on B2G; r=nical,jgilbert,jrmuizel 2013-05-27 10:12:13 -04:00
Sotaro Ikeda
3f28dc4a02 Bug 871753 Part1 - fix deadlock during youtube video playback. r=doublec 2013-05-16 17:24:13 -07:00
Sotaro Ikeda
3a980ce9e1 Bug 868806 - Handle OMXCodec's error. r=doublec 2013-05-15 21:35:34 -04:00
Patrick Wang
340c832b1b Bug 871463 - allow to fallback to software codec in emulator. r=doublec 2013-05-13 17:38:49 +08:00
Sotaro Ikeda
1cc722ad6e Bug 864180 - Move audio software decoder to app's process. r=doublec 2013-05-06 08:43:18 -04:00
Chris Pearce
c8081a14c7 Bug 862182. r=roc,doublec 2013-05-03 10:59:18 +12:00
Chris Pearce
3262662a85 Bug 862182 - Revert bug 862183 due to frequent orange in 459439 crashtest. CLOSED TREE. r=philor 2013-05-01 13:33:33 +12:00
Chris Pearce
37aa644c0a Bug 862182 - Hold references to MediaResource in nsRefPtrs (content/media/omx), and fix some omx compiler warnings. r=doublec 2013-05-01 11:23:46 +12:00
Diego Wilson
6e5ca76079 Bug 860760 - Pause OMX media sources when playback is paused. r=sotaro, r=cdouble
OMXCodec needs to now when the stream is paused. Otherwise it will
prevent the device from lowering its power state when idle.
2013-04-10 17:58:25 -07:00
Diego Wilson
5e131253f0 Bug 847779 - Abort playback if OMX audio init fails. r=doublec, r=cpearce 2013-04-04 15:33:45 -07:00
Sotaro Ikeda
71f3d11c2f Bug 850566 - Part 3: Set video size to SurfaceDescriptorGralloc. r=doublec 2013-03-28 09:59:48 -04:00
Sotaro Ikeda
edb14d52b9 Bug 803471 - Part 5b - Change OmxDecode to use GonkNativeWindowClient. r=cdouble 2013-03-08 14:43:33 -05:00
Sotaro Ikeda
f598af80f7 Bug 803471 - Part 2 - Use OmxClient in OmxDecoder. r=cdouble 2013-03-08 14:43:32 -05:00
Sotaro Ikeda
a4a7b25f49 Bug 840154 - Do not release MediaBuffer during OMXCodec is seeking. r=cdouble 2013-02-15 21:27:18 -05:00
Chris Jones
cab9a378db Bug 834150: Just Say No to the fallback SW decoder. r=doublec a=blocking-b2g 2013-01-30 15:06:28 -08:00
Chris Double
fc9352b6d6 Bug 825485 - AAC files don't play on B2G - r=cjones 2013-01-07 12:55:50 +00:00
Chris Jones
347e4d552b Bug 824230: Handle UNKNOWN_ERROR in OmxDecoder. r=doublec 2012-12-24 15:43:10 -08:00
Chris Jones
f5531b428a Bug 819609: Don't try to send too-large videos to hardware video decoders. r=doublec a=blocking-basecamp 2012-12-10 23:48:58 -08:00
Edwin Flores
92700449d1 Bug 812756 - Remove seeking hack from OMX decoder r=cpearce 2012-11-27 17:08:40 +13:00
Thinker K.F. Li
dcba0eca6c Bug 805711 - check EOS against audio source for OmxDecoder. r=doublec 2012-11-24 20:25:02 +13:00