Commit Graph

56 Commits

Author SHA1 Message Date
Bruce Sun
e422707343 Bug 904177 - Extract MediaStreamResource. r=sotaro, r=cpearce 2014-07-16 15:34:30 +08:00
Edwin Flores
ba3c31b695 Bug 1038467 - Rename MediaPlugin* classes r=cpearce 2014-07-17 13:32:56 +12:00
Andrew Osmond
e19fb1ef53 Bug 1030007 - Throttle updating the preview window when CPU low and/or encoder falls behind. r=mikeh, r=cpearce 2014-07-02 19:55:00 -04:00
Eric Phan
d7e21aee71 Bug 1015985 - Set decoder seekable members outside of ReadMetadata by StateMachine. r=cpearce 2014-06-23 22:08:34 +12:00
Chris Pearce
763787ecd7 Bug 979104 - MediaDecoderReader/StateMachine asynchronous decoding. r=kinetik 2014-06-18 17:07:02 +12:00
Ehsan Akhgari
3b9861ed6a Backed out changeset 0cdef46c65c1 (bug 979104) for causing bug 1024324 2014-06-13 16:20:37 -04:00
Jonathan Watt
49bf9acb82 Bug 1022667, part 2 - Remove BytesToTime from MediaOmxReader.cpp. r=cpearce 2014-06-10 16:42:21 +01:00
Chris Pearce
5f9673dc9d Bug 979104 - MediaDecoderReader/StateMachine asynchronous decoding. r=kinetik 2014-06-10 19:31:09 +12:00
JW Wang
5f4967bb8e Bug 1000841 - remove SetActive() from MediaDecoderReader. Its user needs to know when to call SetIdle() only. r=cpearce 2014-05-19 04:23:00 +02:00
Ming
e48ee4a3eb Bug 994015 - [tarako]some mp4 video plays not smoothly r=cpearce 2014-04-11 02:10:00 +02:00
Chris Pearce
7dc5ed8d90 Bug 993753 - Don't set media decoders idle while seeking. r=kinetik 2014-04-15 15:01:34 +12:00
Andrea Marchesini
8204cc0528 Bug 987064 - Remove AudioChannelType. r=roc, r=mchen, r=bent 2014-04-10 18:39:20 +01:00
Vasanthakumar Pandurangan
c9894c6b30 Bug 976172 - Part 1 Changes in MediaOmxDecoder to enable audio offloading r=roc
This adds support in MediaOmxDecoder to dynamically switch between
MediaDecoderStateMachine and AudioOffloadPlayer
2014-04-08 20:59:07 +05:30
Chris Pearce
a8e52798ff Bug 778077 - Implement HTMLMediaElement.fastSeek(time). r=cajbir
Implement HTMLMediaElement.fastSeek(), basically by changing all the
MediaDecoderReader::Seek() overrides to not call
MediaDecoderReader::DecodeToTarget(), and have MediaDecoderReader::DecodeSeek()
call DecodeToTarget() if we're doing an accurate (non-fast) seek.

Update gizmo.mp4 to have a keyframe every second, instead of only 1 keyframe at
the start of stream. This makes the unit test I added more useful for mp4...

I pushed most of the seek target clamping logic in MediaDecoder up into
HTMLMediaElement, so that we're clamping in fewer places. Note
MediaDecoderStateMachine::Seek() still sanity checks the seek target.

We have to update the currentTime/MediaDecoder playback position after a seek
completes now, rather than assuming the seek always got it exactly right.

Removed those pesky assertions about seek target lying in the first frame after
seek, since actually sometimes the media doesn't have samples for all streams
after a seek (either due to the media being encoded like that, or because of a
bug in the platform's decoder, not entirely sure).

Green: https://tbpl.mozilla.org/?tree=Try&rev=b028258565e2
* * *
Bug 778077 - Fix up MediaOMXReader fastseek to ensure audio stream stays in sync with video stream. r=cajbir
2014-04-01 16:39:04 +13:00
Ed Morley
9d7a5cff30 Backed out changeset 00fa39c23b44 (bug 778077) for reftest failures 2014-03-28 12:31:29 +00:00
Chris Pearce
c9cd61eb5d Bug 778077 - Implement HTMLMediaElement.fastSeek(time). r=cajbir
Implement HTMLMediaElement.fastSeek(), basically by changing all the
MediaDecoderReader::Seek() overrides to not call
MediaDecoderReader::DecodeToTarget(), and have MediaDecoderReader::DecodeSeek()
call DecodeToTarget() if we're doing an accurate (non-fast) seek.

Update gizmo.mp4 to have a keyframe every second, instead of only 1 keyframe at
the start of stream. This makes the unit test I added more useful for mp4...

I pushed most of the seek target clamping logic in MediaDecoder up into
HTMLMediaElement, so that we're clamping in fewer places. Note
MediaDecoderStateMachine::Seek() still sanity checks the seek target.

We have to update the currentTime/MediaDecoder playback position after a seek
completes now, rather than assuming the seek always got it exactly right.

Removed those pesky assertions about seek target lying in the first frame after
seek, since actually sometimes the media doesn't have samples for all streams
after a seek (either due to the media being encoded like that, or because of a
bug in the platform's decoder, not entirely sure).

Green: https://tbpl.mozilla.org/?tree=Try&rev=b028258565e2
2014-03-28 22:36:10 +13:00
Phil Ringnalda
1a6280a756 Backed out 2 changesets (bug 778077, bug 631058)
CLOSED TREE

Backed out changeset dda301682977 (bug 631058)
Backed out changeset 25b633e7dcd5 (bug 778077)
2014-03-27 21:50:02 -07:00
Chris Pearce
b26d467d58 Bug 778077 - Implement HTMLMediaElement.fastSeek(time). r=cajbir
Implement HTMLMediaElement.fastSeek(), basically by changing all the
MediaDecoderReader::Seek() overrides to not call
MediaDecoderReader::DecodeToTarget(), and have MediaDecoderReader::DecodeSeek()
call DecodeToTarget() if we're doing an accurate (non-fast) seek.

Update gizmo.mp4 to have a keyframe every second, instead of only 1 keyframe at
the start of stream. This makes the unit test I added more useful for mp4...

I pushed most of the seek target clamping logic in MediaDecoder up into
HTMLMediaElement, so that we're clamping in fewer places. Note
MediaDecoderStateMachine::Seek() still sanity checks the seek target.

We have to update the currentTime/MediaDecoder playback position after a seek
completes now, rather than assuming the seek always got it exactly right.

Removed those pesky assertions about seek target lying in the first frame after
seek, since actually sometimes the media doesn't have samples for all streams
after a seek (either due to the media being encoded like that, or because of a
bug in the platform's decoder, not entirely sure).

Green: https://tbpl.mozilla.org/?tree=Try&rev=b028258565e2
2014-03-28 15:50:28 +13:00
Alfredo Yang
60cb2058ba Bug 975978 - Check display size in OMX backend playback. r=cpearce 2014-03-18 08:20:19 -04:00
Chris Pearce
517140e405 Bug 973408 - Set MediaDecoderReaders idle when they're not decoding. r=kinetik 2014-03-11 11:44:10 +08:00
Ms2ger
176399514a Bug 952033 - Part c: Use IntSize and IntRect in VideoData; r=roc 2014-02-09 09:04:38 +01:00
Ben Kelly
d71d6904a9 Bug 960873: Part 4: Make OMX use AudioCompactor. r=cpearce 2014-02-05 18:11:25 -05:00
Phil Ringnalda
1af4f7e752 Backed out 6 changesets (bug 960873) for Win64 build bustage
Backed out changeset 33d8989841ac (bug 960873)
Backed out changeset 6c9e404aeb3f (bug 960873)
Backed out changeset 36c8b10b0a31 (bug 960873)
Backed out changeset 29c36a7acfb0 (bug 960873)
Backed out changeset 6e3966e0eb40 (bug 960873)
Backed out changeset 612db692256b (bug 960873)
2014-02-05 09:28:14 -08:00
Ben Kelly
d59e1509d7 Bug 960873: Part 4: Make OMX use AudioCompactor. r=cpearce 2014-02-04 23:10:43 -05:00
Ben Kelly
1f1ea86463 Bug 960873: Part 1: Refactor MediaDecoderReader.h into separate headers. r=cpearce 2014-02-03 20:49:21 -05:00
Alfredo Yang
2b2a9d250c Bug 959861 - Check if the media is seekable in MediaOmxReader::ReadMetadata(). r=cdouble 2014-01-22 10:50:23 -05:00
Edwin Flores
c637986ec6 Bug 945864 - Remove buggy MediaOmxReader::GetBuffered method override r=cpearce 2014-01-14 12:38:40 +13:00
Sotaro Ikeda
6bb9ea150f Bug 948005 - Release reasources in MediaOmxReader's destructor. r=doublec 2014-01-07 09:44:02 -05:00
Sotaro Ikeda
683dfca3a0 Bug 941274 - Fix ResetDecode in MediaOmxReader. r=doublec 2013-12-02 22:38:16 -05:00
Sotaro Ikeda
2f8ac74186 Bug 932076 - Add check for MediaExtractor creation failure. r=doublec 2013-10-30 15:41:07 -04:00
Chris Pearce
3f98cc2f01 Bug 930829 - Add MediaData class as base for VideoData and AudioData to simplify writing a generic stream decoder. r=kinetik 2013-10-25 15:44:58 +13:00
Sotaro Ikeda
b019369717 Bug 925381 - Fix mpeg4 video seek failure. r=nical, r=doublec 2013-10-17 11:09:15 -04: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
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
Matthew Gregan
8d51f7a552 Bug 920867 - Split VideoInfo into Video and Audio objects, then encapsulate in new MediaInfo object. r=cpearce 2013-09-27 17:22:38 +12:00
Chris Pearce
5f3cb23252 Bug 915958 - Automatically Finish() MediaQueues, so that each backend doesn't need to remember to do it. r=edwin 2013-09-13 14:33:54 +12: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
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
2d645addc3 Bug 883744 - add pointer null check r=doublec 2013-06-22 08:58:12 -04:00
Robert O'Callahan
4ec5ce6398 Bug 880601. Emulate a form of keyframe skipping by allowing MediaOmxReader::DecodeVideoFrame to decode more than one video frame if video decoding is falling behind. r=cpearce
If we don't support this in any way, then we get into trouble when there is
plenty of compressed data buffered but for some reason video decoding falls
behind (maybe there was a short period where the video data wasn't available).
Audio playback continues normally, but MediaOmxReader keeps making one call
to ReadAudio and one to ReadVideo, and if each call to ReadAudio decodes at
least as much as the calls to ReadVideo, video decoding can never catch up
to the current audio playback position. So video never plays. And when the
video decoding point gets far enough away from the audio decoding point,
horrible things start to happen, such as video and audio reading completely
different parts of the media cache and interfering with the caching mechanism
(which assumes audio and video reads are close together).

This patch approximates keyframe skipping, and is basically just a way for
MediaOmxReader::DecodeVideoFrame to decode more than one frame at a time
if we need video decoding to catch up.

To prevent pathological situations, we cap both the maximum number of frames
decoded per DecodeVideoFrame and the amount of time we spend in the method
(excluding the time for the last frame).

--HG--
extra : rebase_source : cba95c537fe97df5b696581be8233b6e9cffb70b
2013-06-15 23:51:56 +12: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
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
Sotaro Ikeda
1ae52b18d9 Bug 837051 - Store less buffers for video playback at MediaOmxReader. r=doublec 2013-04-08 14:35:30 -04: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
Andrea Marchesini
8eaecd7c18 Bug 841014 - Rename nsTimeRanges.h to TimeRanges.h. r=Ms2ger
--HG--
rename : content/html/content/src/nsTimeRanges.cpp => content/html/content/src/TimeRanges.cpp
rename : content/html/content/src/nsTimeRanges.h => content/html/content/src/TimeRanges.h
2013-03-02 14:14:44 -05:00