Commit Graph

770 Commits

Author SHA1 Message Date
Jean-Yves Avenard
9d45d60388 Bug 1245463: [MSE] P2. Remove MediaSource's duration mirror. r=gerald
It served no purpose other than implementing the MSE spec by the letter. The spirit is preserved.
This allows to disable tail dispatching on the MediaSourceDemuxer's TaskQueue which prevents us from performing synchronous operation on the main thread.

MozReview-Commit-ID: G7aqfvGsf1e
2016-02-12 23:45:46 +11:00
Jean-Yves Avenard
aceca098dd Bug 1245463: [MSE] P1. Do not attempt to retrieve the buffered range if the mediasource is in closed state. r=gerald
The changes that follow may cause the active sourcebuffer list to be modified; which will trigger an assertion if the mediasource object is closed.

MozReview-Commit-ID: 8A1CMKAUyTq
2016-02-12 23:45:46 +11:00
Phil Ringnalda
6111439998 Back out 6 changesets (bug 1245463) for !mAppendRunning (Append is running) assertion failures
CLOSED TREE

Backed out changeset 75d96e417aaf (bug 1245463)
Backed out changeset dca0577d741c (bug 1245463)
Backed out changeset 17ffbe7ca24e (bug 1245463)
Backed out changeset 83a2de2fcf02 (bug 1245463)
Backed out changeset e8bb35ea72e4 (bug 1245463)
Backed out changeset 48364b868055 (bug 1245463)
2016-02-11 23:39:36 -08:00
Jean-Yves Avenard
656801b3a7 Bug 1245463: [MSE] P6. Fix incorrect assertions. r=me
mAppendRunning is set prior the append task being queued; so it is possible that the segment parser loop hasn't yet been started, yet mAppendRunning is true.

Separate this diagnostic with a new flag ON A CLOSED TREE.

MozReview-Commit-ID: GgTyyltKOJr
2016-02-12 15:18:43 +11:00
Jean-Yves Avenard
184fb6b1d4 Bug 1245463: [MSE] P5. Remove dead code. r=gerald
MozReview-Commit-ID: Elnm0WPuqHC
2016-02-12 15:18:41 +11:00
Jean-Yves Avenard
a6a8d0565d Bug 1245463: [MSE] P4. Remove no longer working Dump() commands. r=gerald
MozReview-Commit-ID: 71hgJ63ksPU
2016-02-12 10:30:16 +11:00
Jean-Yves Avenard
dda61422b8 Bug 1245463: [MSE] P3. When abort() is called, wait until the current appendBuffer completes. r=gerald
The W3C spec indicates that while everything in MSE is asynchronous, the abort() command is to interrupt the current segment parser loop and have the reset parser loop synchronously completes the frames present in the input buffer.
This causes a fundamental issue that abort() will never result in a deterministic outcome as the segment parser loop may be in different condition.

We used to really attempt to abort the current operation, however there could have been a race in the order in which tasks were queued. As such, we now simply wait for the current appendBuffer to complete.

This also simplifies the code greatly, as we don't need to worry about pending concurrent appendBuffer.

The actually happens to be similar to the Chromium behavior.

Similar to bug 1239983, we strongly assert should a segment parser loop be running when it must have completed.

MozReview-Commit-ID: 9772PLQEozf
2016-02-12 10:30:09 +11:00
Jean-Yves Avenard
e65199f63d Bug 1245463: [MSE] P2. Remove MediaSource's duration mirror. r=gerald
It served no purpose other than implementing the MSE spec by the letter. The spirit is preserved.
This allows to disable tail dispatching on the MediaSourceDemuxer's TaskQueue which prevents us from performing synchronous operation on the main thread.

MozReview-Commit-ID: G7aqfvGsf1e
2016-02-12 10:29:59 +11:00
Jean-Yves Avenard
5a49dc9392 Bug 1245463: [MSE] P1. Do not attempt to retrieve the buffered range if the mediasource is in closed state. r=gerald
The changes that follow may cause the active sourcebuffer list to be modified; which will trigger an assertion if the mediasource object is closed.

MozReview-Commit-ID: 8A1CMKAUyTq
2016-02-12 10:27:33 +11:00
Carsten "Tomcat" Book
f854f0417e Backed out changeset 5b37030dbfe3 (bug 1245463) for Android m-9 crashes 2016-02-10 11:20:31 +01:00
Carsten "Tomcat" Book
dc41ea5c25 Backed out changeset a9ccf315f1f2 (bug 1245463) 2016-02-10 11:20:16 +01:00
Carsten "Tomcat" Book
4626394d1c Backed out changeset 2376ec200aec (bug 1245463) 2016-02-10 11:20:15 +01:00
Carsten "Tomcat" Book
45b0b8a19f Backed out changeset 2affd4506079 (bug 1245463) 2016-02-10 11:20:13 +01:00
Carsten "Tomcat" Book
9f354ccec0 Backed out changeset 22641351f11f (bug 1245463) 2016-02-10 11:20:12 +01:00
Jean-Yves Avenard
7b7a27dd0f Bug 1245463: [MSE] P5. Remove no longer working Dump() commands. r=gerald
MozReview-Commit-ID: 71hgJ63ksPU
2016-02-10 20:07:29 +11:00
Jean-Yves Avenard
95de6fa2f8 Bug 1245463: [MSE] P4. Remove dead code. r=gerald
MozReview-Commit-ID: Elnm0WPuqHC
2016-02-10 20:07:28 +11:00
Jean-Yves Avenard
43fa8f611e Bug 1245463: [MSE] P3. Diags to ensure the Segment Parser Loop isn't running. r=gerald
This is similar to bug 1239983, we strongly assert should a segment parser loop be running when it must have completed.

MozReview-Commit-ID: CXqGoq9Opq0
2016-02-10 20:07:28 +11:00
Jean-Yves Avenard
018bf90ad7 Bug 1245463: [MSE] P2. When abort() is called, wait until the current appendBuffer completes. r=gerald
The W3C spec indicates that while everything in MSE is asynchronous, the abort() command is to interrupt the current segment parser loop and have the reset parser loop synchronously completes the frames present in the input buffer.
This causes a fundamental issue that abort() will never result in a deterministic outcome as the segment parser loop may be in different condition.

We used to really attempt to abort the current operation, however there could have been a race in the order in which tasks were queued. As such, we now simply wait for the current appendBuffer to complete.

This also simplifies the code greatly, as we don't need to worry about pending concurrent appendBuffer.

The actually happens to be similar to the Chromium behavior.

MozReview-Commit-ID: CHppUOGM1mk
2016-02-10 20:07:27 +11:00
Jean-Yves Avenard
f3b37cac73 Bug 1245463: [MSE] P1. Do not attempt to retrieve the buffered range if the mediasource is in closed state. r=gerald
The changes that follow may cause the active sourcebuffer list to be modified; which will trigger an assertion if the mediasource object is closed.

MozReview-Commit-ID: 8A1CMKAUyTq
2016-02-10 20:07:27 +11:00
Bryce Van Dyk
61408b539f Bug 1246842 - Rework previous commit to not used deprecated arguments.callee r=cpearce
MozReview-Commit-ID: DFWNOGN0FyY

--HG--
extra : transplant_source : %1E%0D%0E%F7%EB%AE%10%40%D6%C2%3F%03%EC%16%98%91Z%60%D8%20
2016-02-09 20:42:56 +13:00
Jean-Yves Avenard
8fa85e0c6e Bug 1246358: [MSE] Take pre-roll time into consideration when seeking. r=gerald 2016-02-08 17:36:17 +11:00
Jean-Yves Avenard
a1d2f88108 Bug 1246521: [MSE] P3. Only error during Prepare Append algorithm if the media element is in error. r=gerald 2016-02-08 16:38:45 +11:00
Jean-Yves Avenard
f501a23d19 Bug 1181981: [MSE] Force TrackId for MSE tracks. r=gerald
YouTube sets the track ID at 1 for both audio and video tracks. Attempting to use mozCaptureStream would cause an assert as it always expect tracks to have a different track Id.
2016-02-04 11:07:19 +11:00
Gerald Squelart
7511beb447 Bug 1239983 - Diags around TrackBuffersMgr promises - r=jya
Added diagnostics around demuxer init/reset promises, to catch early cases
where TrackBuffersManager::mInputDemuxer is destroyed while an init/reset
promise is in flight, which would cause later issues when the 'Then' clause
assumes that mInputDemuxer still exists.

Note: This is *not* an actual fix for crashes linked to this bug, but it should
help identify unexpected situations, or instead eliminate these patched
locations as sources of crashes.
A new bug will be needed to examine the fallout from this patch and produce a
real fix, or continue investigating.
2016-02-02 20:20:03 +11:00
Kyle Huey
91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Guang-De Lin
345a0e7d0e Bug 1229936 - Enable mse mp4 mochitests on linux. r=jya 2016-01-27 14:46:52 +08:00
Jean-Yves Avenard
58d924fab9 Bug 1236703: P2. Add methods to retrieve debugging data on plain readers. r=jwwang 2016-01-20 09:50:26 +11:00
Jean-Yves Avenard
e35b5b767d Bug 1236703: P1. Add debugging information for MSE to about:media plugin. r=kentuckyfriedtakahe
Add : number of frames decoded and number of frames skipped during skip to next key frame and if hardware acceleration is currently in use.
2016-01-20 09:50:25 +11:00
Jean-Yves Avenard
f079977e08 Bug 1240411: P8. Clean up MediaSource headers. r=cpearce
Remove redundant virtual keyword and add missing override if any.
2016-01-19 19:47:35 +11:00
Jean-Yves Avenard
3c25c690a7 Bug 1207220: Ensure MediaShutdownManager waits until all MediaDecoder have completed their shutdown. r=cpearce
XPCOM when shutting down expects all tasks to be run synchronously. As such, we must ensure that the remaining MediaDecoder are shut down before continuing on the next task.
In particular destroying gfxPlatforms must only ever happen after, as it is possible for the MediaDecoderReader to make use of gfx resources during shutdown.
2016-01-05 11:55:50 +11:00
Chris Peterson
88051371a9 Bug 1232223 - Part 1: Remove MOZ_WEBM #ifdefs because WebM is always supported, though not necessarily enabled. r=jya r=glandium 2015-12-12 13:49:07 -05:00
Jean-Yves Avenard
08597229bb Bug 1229987: P4. Stop pre-rolling when encountering WAITING_FOR_DATA. r=cpearce
This allows to start displaying frames even when we have less than 5 frames.
2015-12-18 19:26:54 +11:00
Jean-Yves Avenard
1e7e9a8d7c Bug 1229987: P3. Update mochitests and add new one verifying behavior. r=cpearce 2015-12-18 19:26:53 +11:00
Jean-Yves Avenard
7e9fd3bcf4 Bug 1229987: [MSE] P1. Ensure next random access point properly calculated after seek. r=gerald
When seeking, the next keyframe time would always be set to the seek time (as the next sample to be retrieved would be a keyframe). This could lead to the next key frame logic to be activated too aggressively.
2015-12-18 19:26:52 +11:00
Phil Ringnalda
45242f7699 Back out 4 changesets (bug 1229987) for ASan e10s timeout in test_playback.html, Mac timeouts in test_BufferingWait_mp4.html, and Win8 failures in test_WaitingToEndedTransition_mp4.html
Backed out changeset 707a87454058 (bug 1229987)
Backed out changeset 37003d495f20 (bug 1229987)
Backed out changeset c8f4e1eaf884 (bug 1229987)
Backed out changeset 42ca05d8546d (bug 1229987)
2015-12-10 23:10:20 -08:00
Jean-Yves Avenard
ad5e2f804f Bug 1230527: P2. Add mochitest. r=jwwang
It's also another way to check for 1130237: we make sure that seeking starts after playback when we have a gap at the beginning of the data
2015-12-10 14:08:06 -05:00
Jean-Yves Avenard
ce54507b17 Bug 1229987: P3. Update mochitests and add new one verifying behavior. r=cpearce 2015-12-10 12:17:26 -05:00
Jean-Yves Avenard
18c2b9cb12 Bug 1229987: [MSE] P1. Ensure next random access point properly calculated after seek. r=gerald
When seeking, the next keyframe time would always be set to the seek time (as the next sample to be retrieved would be a keyframe). This could lead to the next key frame logic to be activated too aggressively.
2015-12-10 12:17:25 -05:00
Jean-Yves Avenard
e786add25c Bug 1130237: [MSE] P3. Add mochitest testing behavior. r=gerald
We load data from [2ish, 4] and ensure that playback didn't start before data [0, 2ish] is loaded.
2015-12-09 09:55:37 -05:00
Carsten "Tomcat" Book
2257530fee Backed out changeset b8a9e34748f1 (bug 1130237) for m2 test failures 2015-12-07 11:20:35 +01:00
Jean-Yves Avenard
7084f9ab9c Bug 1130237: [MSE] P3. Add mochitest testing behavior. r=gerald
We load data from [2ish, 4] and ensure that playback didn't start before data [0, 2ish] is loaded.
2015-12-05 17:28:38 +11:00
Jean-Yves Avenard
a080f16503 Bug 1130237: [MSE] P1. Only ever return a frame if we have data. r=gerald
After a Reset() the definition is that the resource was seeked to 0. As such we should only return a frame if there's data at time==0.
2015-12-05 17:28:37 +11:00
Jean-Yves Avenard
d6b653ae10 Bug 1229605: [MSE] Allow webm/audio independently of video. r=kentuckyfriedtakahe
This adds a media.mediasource.webm.audio.enabled preference (true by default) to disable opus or vorbis audio in webm mediasource.
2015-12-04 14:43:47 +11:00
Jean-Yves Avenard
99d86bb64e Bug 1194624: [MSE] P4. Add mochitest testing new behaviour. r=jwwang
Ensure that the canplay/canplaythrough and readyState is properly updated according to buffering condition.
2015-12-03 19:22:07 +11:00
Jean-Yves Avenard
d77e4129ea Bug 1194624: [MSE] P3. Determine when canplaythrough can be fired. r=jwwang
We assume that if we have 30s of data buffered ahead of the current position or up to the element's duration that we can play ahead without interruption.
2015-12-03 19:22:06 +11:00
Jean-Yves Avenard
8e5e1f7311 Bug 1194624: [MSE] P2. Enable NextFrameBufferedStatus() for MediaSourceDecoder. r=jwwang
We require a slightly variation on the default implementation as mediasource allows for gaps of up to 125ms between samples and often videos do not start with a time of 0.
2015-12-03 19:22:05 +11:00
Jean-Yves Avenard
b43e4839aa Bug 1194624: [MSE] P1. Move definition of EOS_FUZZ to be public. r=gerald 2015-12-03 19:22:05 +11:00
Jean-Yves Avenard
664205b25d Bug 1229256: [MSE] P3. Prevent crash should buffered range be read while shutting down. r=gerald 2015-12-03 12:38:11 +11:00
Jean-Yves Avenard
aa942325d2 Bug 1229657: [MSE] Returns NotSupportedError if mimetype is invalid or not supported. r=gerald
InvalidStateError is only to be returned if the readyState attribute is not in the "open" state.
2015-12-03 12:38:09 +11:00
Jean-Yves Avenard
fdf27ff498 Bug 1227396: P9. Remove unnecessary monitor. r=cpearce
The Index and MoofParser are now only used via the MP4Demuxer which is guaranteed to always be called on the same taskqueue.
2015-11-30 11:29:35 +11:00
Jean-Yves Avenard
a7975b198f Bug 1227396: P8. Replace MediaByteRange with Interval<int64_t> typedef. r=cpearce
It's now okay to simplify.
2015-11-30 11:29:34 +11:00
Jean-Yves Avenard
c8c275cee2 Bug 1227396: P7. Replace nsTArray<MediaByteRange> with dedicated MediaByteRangeSet object. r=cpearce 2015-11-30 11:29:34 +11:00
Jean-Yves Avenard
70f2124283 Bug 1227396: P2. Rename some MediaByteRange methods. r=cpearce
Will facilitate the replacement of MediaByteRange by Interval<int64_t>
2015-11-30 11:29:30 +11:00
Jean-Yves Avenard
835f022d65 Bug 1226931: [MSE] Restrict leeway to append window start. r=gerald.
We only allow a leeway if the append window start is set to its default value (0)
2015-11-23 09:08:26 +11:00
sajitk
582e1a55fa Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian 2015-11-15 14:49:01 +01:00
JW Wang
8dedbfa33d Bug 1223599 - Remove the throttling argument from AbstractMediaDecoder::NotifyDataArrived(). r=jya. 2015-11-11 17:59:16 +08:00
Wes Kocher
f3a9eb2a26 Backed out changeset 1e5f3d1151d6 (bug 1219480) for cpp unittest bustage CLOSED TREE
--HG--
extra : commitid : BMVKq6cPeho
2015-11-11 09:36:56 -08:00
sajitk
3cbe348cdd Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian
--HG--
extra : rebase_source : c73098485fa005d914304fb6e7f8eba3c15e66dc
2015-11-11 06:52:00 +01:00
Jean-Yves Avenard
8dcb8265ce Bug 1220033: Fix HTMLMediaElement::seekable attribute for Mediasource. r=gerald
Interval is to start from 0 when duration is +infinity
2015-11-11 21:24:01 +11:00
JW Wang
2344481e8c Bug 1220558. Part 2 - remove unused members. r=jya. 2015-11-11 07:43:41 +08:00
JW Wang
4f2d0e76bc Bug 1220558. Part 1 - remove unused arguments from MediaDecoderReader::DispatchNotifyDataArrived() and its callees/callers. r=jya. 2015-11-11 07:43:38 +08:00
Jean-Yves Avenard
76a1ffa463 Bug 1220033: Don't use fuzz arithmetic for calculating internal buffered ranges r=gerald 2015-11-04 16:52:24 +13:00
Jean-Yves Avenard
3c3b1f1353 Bug 1213177: Enable WebM on machines where H264 HW decoding is disabled. r=kentuckyfriedtakahe 2015-10-29 10:18:59 +11:00
Jean-Yves Avenard
1796d31c83 Bug 1188887: P2. Add mochitest testing new seek behavior. r=jwwang 2015-10-28 10:45:59 +11:00
Jean-Yves Avenard
5b3264d688 Bug 1217170: [MSE] P2. Enable WebM/MSE on systems with no MP4/H264 support. r=kentuckyfriedtakahe 2015-10-27 23:57:35 +11:00
Jean-Yves Avenard
d1b1c57939 Bug 1217170: P1. Rename functions to explicitly reflect what they are doing. r=kentuckyfriedtakahe 2015-10-27 23:57:13 +11:00
Jean-Yves Avenard
a0f576a061 Bug 1215370: Maintain coded group continuity in sequence append mode when resetting parser state. r=gerald
W3C issue 29133.
2015-10-27 23:54:47 +11:00
JW Wang
a7589ce310 Bug 1218280. Part 1 - create MediaResourceCallback for MediaResource to send notifications. r=roc. 2015-10-27 10:28:26 +08:00
Guang-De Lin
5fc8c948b4 Bug 1150305 - sourcebuffer.buffered returns the same object if not changed. r=roc, r=bz, r=jya
--HG--
extra : rebase_source : ffacfcb39b567a6cd034b081f4330d88aacb98f4
2015-10-19 14:10:47 +08:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd
583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Jean-Yves Avenard
6db8b43cba Bug 1213176: P1. Remove most MediaFormatReader dependencies on its MediaDecoder parent. r=jwwang
The LayersBackend can be defined at construction time, however if a parent MediaDecoder exists, the value will be overwritten by the MediaDecoderOwner value.

--HG--
extra : rebase_source : fefad83560d5bfa2aee9f665fe138397eb390019
2015-10-15 02:04:00 +02:00
JW Wang
5147e1f0af Bug 1214989. Part 3 - remove MediaDecoder::Init() and its callers. r=gerald. 2015-10-15 11:39:45 +08:00
JW Wang
e868f91ff6 Bug 1214989. Part 2 - add MediaDecoderOwner to Clone() and overrides. r=gerald. 2015-10-15 11:37:47 +08:00
Eric Rahm
d4f1bff852 Bug 1190592 - Part 2: Add test for mediasource memory reporter. r=jya 2015-10-14 20:48:58 -07:00
Eric Rahm
88d7e6c28e Bug 1190592 - Part 1: Add mediasource memory reporter. r=jya
This adds asyncrounous reporting of MSE resources.
2015-08-20 18:10:33 -04:00
JW Wang
1cc6677a90 Bug 1214065 - Remove unused arguments from MediaDecoder::Load() and its friends. r=kinetik. 2015-10-14 11:46:27 +08:00
Eric Rahm
a67da92ff4 Bug 1212681 - Enable MSE mochitests on e10s. r=jya 2015-10-08 13:38:02 -07:00
Jean-Yves Avenard
628247fc4e Bug 1212176: Remove arguments passed to MediaDataDemuxer::NotifyDataArrived API. r=cpearce
Be more explicit on what it does and how it should be used.
2015-10-08 20:47:21 +11:00
Jean-Yves Avenard
d36aaa89f4 Bug 1211652: Add sourcebuffer.mode = sequence mochitest. r=gerald 2015-10-08 00:34:40 +11:00
Nigel Babu
1a01355c4f Backed out 16 changesets (bug 1206977, bug 1211652, bug 1211335) for linux bc7 bustage ON A CLOSED TREE
Backed out changeset 51b1b076a386 (bug 1206977)
Backed out changeset dec7c35469d1 (bug 1206977)
Backed out changeset bf9ddc78b394 (bug 1206977)
Backed out changeset 08f5cff5aa12 (bug 1206977)
Backed out changeset e4e91de99867 (bug 1206977)
Backed out changeset 696ecf2e2947 (bug 1206977)
Backed out changeset ab2d524a9b35 (bug 1206977)
Backed out changeset d66be0e4547f (bug 1206977)
Backed out changeset 64c58afbd6c1 (bug 1206977)
Backed out changeset eb10d09015e1 (bug 1206977)
Backed out changeset 042959216393 (bug 1206977)
Backed out changeset 7e0de7f62202 (bug 1206977)
Backed out changeset 3d095569f6ba (bug 1206977)
Backed out changeset 041418a07ae5 (bug 1206977)
Backed out changeset 654970da23e4 (bug 1211335)
Backed out changeset 8ba8e24a84d3 (bug 1211652)
2015-10-07 13:43:39 +05:30
Jean-Yves Avenard
3a86e96468 Bug 1211652: Add sourcebuffer.mode = sequence mochitest. r=gerald 2015-10-07 16:40:22 +11:00
Jean-Yves Avenard
5558525f6c Bug 1211328: [MSE] Fix timestampOffset attribute calculation in sequence mode. r=gerald 2015-10-05 15:45:56 +11:00
JW Wang
46d9f98520 Bug 1209890 - add main thread assertions and remove usage of decoder monitor from MediaSourceDecoder. r=jya. 2015-09-30 06:55:21 +08:00
Jean-Yves Avenard
822bab3238 Bug 1159171: [MSE] P4. Changing waiting time value. r=edwin.
When ffmpeg is enabled, it will use the FFmpeg's VPX decoder. FFmpeg appears to always buffer 15 frames before returning one (this is the same with h264) causing the waiting event to be fired much earlier than when using libvpx
2015-10-01 19:40:21 +10:00
JW Wang
489900ad10 Bug 1208922. Part 4 - remove AbstractMediaDecoder::GetCDMProxy() and devirtualize MediaDecoder::SetCDMProxy(). r=cpearce. 2015-09-27 18:59:08 +08:00
Jean-Yves Avenard
7ae057dc90 Bug 1207946: [MSE] P3. Reset cached demuxing index when new data overwrite the end. r=gerald
This will force an iterative search upon the next demux request.
2015-09-29 12:31:33 +10:00
Jean-Yves Avenard
488a0d19d9 Bug 1207946: [MSE] P2. Fix seek when target isn't found exactly in a buffered range. r=gerald 2015-09-29 12:31:32 +10:00
Jean-Yves Avenard
9cd4267bfc Bug 1207946: [MSE] P1. Ensure we stop on the closest keyframe when seeking. r=gerald
Should the first frame in the trackbuffer have a time superior to the seek target, mNextSampleTime would be incorrectly set to 0.
2015-09-29 12:31:32 +10:00
Jean-Yves Avenard
ce6cdc5ce3 Bug 1205470: [MSE] Remove assertion. r=cpearce
Can also remove mInitDone member as that information is redundant with the init promise being present
2015-09-22 08:21:04 +10:00
Jean-Yves Avenard
43f2be19a3 Bug 1204757: [MSE] P2. Remove use of MediaDecoder::NotifyWaitingForResourcesStatusChanged(). r=cpearce 2015-09-16 18:14:18 +10:00
Jean-Yves Avenard
023ff53978 Bug 1204757: P1. Update MediaDataDemuxer::Init() behavior. r=cpearce
A MediaDataDemuxer is now not to resolve the init promise until it has all the metadata.
Except MediaSource, all demuxers would be doing blocking read to scan for the metadata, and having partial metadata would be an error.
For MediaSource, we pass the NotifyDataArrived message which will cause the MediaSourceDemuxer to re-attempt to search for the metadata.

When used within MediaSource's TrackBuffersManager, a demuxer will never be created until we have received a complete init segment (this task is performed by the various ContainerParsers)
2015-09-16 18:14:17 +10:00
Jean-Yves Avenard
33e5945370 Bug 1204407: P2. Remove no longer required MediaDataDemuxer APIs. r=cpearce 2015-09-16 18:14:15 +10:00
Jean-Yves Avenard
71c5c9a7bf Bug 1204419: P4. Remove MediaDataDemuxer API no longer used. r=cpearce 2015-09-16 18:14:12 +10:00
Jean-Yves Avenard
eb81f3580e Bug 1204419: P2. Remove old MediaSource implementation. r=cpearce 2015-09-16 18:14:11 +10:00
Jean-Yves Avenard
21d2f1de2a Bug 1188238: [MSE] P2. Don't assert when unable to find position in frames array. r=gerald
Instead return an error which will terminate the video element.
2015-09-12 20:53:23 +10:00
Jean-Yves Avenard
506d208f9e Bug 1188238: [MSE] P1. Don't use Interval::Intersect to find the first frame of an interval. r=gerald
With H264, often the first frame of a media segment has no duration ; as such the time interval it represents is empty and will never intersect with anything.
2015-09-12 20:53:23 +10:00
James Cheng
6930bc717c Bug 1203047 - Make MediaDecoderReader know less about AudioData/VideoData by using MediaData instead. r=jya
--HG--
extra : rebase_source : 928721bb5a8669445725cab86e43be002f38c88a
2015-09-10 03:06:00 +02:00
JW Wang
7cab08fca3 Bug 1195158. Part 4 - remove unused code. r=cpearce. 2015-09-07 11:39:16 +08:00
Jean-Yves Avenard
69c6e36916 Bug 1199878: [MSE/webm] Properly calculate media segment duration. r=kinetik
We can know with certainty the duration of a block if we have a following one. We do not have to always rely on having a previous segment to estimate the duration.
2015-09-01 10:47:07 +12:00
Nicholas Nethercote
f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Jean-Yves Avenard
50c382495e Bug 1199879: [MSE] Use latest demux end time to detect discontinuities. r=gerald
The ContainerParser doesn't always return an accurate end time.
2015-08-30 20:48:07 +10:00
Jean-Yves Avenard
94c7c1cfc2 Bug 1199573: [MSE] Properly handle partial media header received prior a discontinuity. r=gerald 2015-08-29 12:01:23 +10:00
Jan Gerber
91c71f702c Bug 1199531 - Disable test_BufferingWait.html on Android due to timeouts. r=rillian
CLOSED TREE
2015-08-28 08:21:00 -04:00
Jean-Yves Avenard
ee6cc113c7 Bug 1199032: [MSE/webm] P2. Construct WebMDemuxer with special MSE handling. r=kinetik 2015-08-28 14:06:34 +10:00
Jan Gerber
e40e7cfa4c Bug 1190776 - Re-enable test_BufferingWait.html. r=rillian
--HG--
extra : rebase_source : 4c769a7b7cfc7efeae5354bdc6b0a3a9335d0a60
2015-08-25 12:51:17 +02:00
Chris Peterson
6b261a1c9e Bug 1197563 - Polyfill __func__ for MSVC 2013 and earlier. r=froydnj 2015-08-20 23:39:18 -07:00
Jean-Yves Avenard
3bca678d28 Bug 1197075: P2. Revert "Bug 1171257 - Add force decode ahead to MediaFormatReader r=jya,bholley". r=edwin 2015-08-26 15:36:53 +10:00
Jean-Yves Avenard
ab08fb8cb6 Bug 1195073: [MSE] P7. Determine a WebM Media Segment end as early as available information permits. r=kinetik
Most cluster contains information about their size. When known, we don't need to wait until the next media segment is received to determine its size.
2015-08-24 23:13:50 +10:00
Jean-Yves Avenard
e4dff83b7a Bug 1195073: [MSE] P5. Detect out of order appends and recreate demuxer. r=gerald
The webm demuxer will only handle data where frames's a monotonically increasing.
2015-08-24 23:13:49 +10:00
Jean-Yves Avenard
3cd00ea187 Bug 1195073: [MSE/webm] P4. Limit nestegg reads to the last block's boundaries. r=kinetik
This prevent entering into an unrecoverable error state when parsing incomplete data as often seen with MSE.
2015-08-24 23:13:48 +10:00
Jean-Yves Avenard
5b54a2f8a4 Bug 1195073: [MSE/webm] P1. Detect individual webm clusters. r=kinetik
WebMContainerParser was incorrectly reporting webm blocks rather than clusters, causing the webm demuxer to later fail to parse the remaining data.
2015-08-24 23:13:47 +10:00
Sebastian Hengst
a133c6114b Backed out changesets 7610baf4a3ae, 6226b99f19bd, 157e41e32906, 60a3b1862f71 (bug 1195158). r=backout
Backed out changeset 7610baf4a3ae (bug 1195158)
Backed out changeset 6226b99f19bd (bug 1195158)
Backed out changeset 157e41e32906 (bug 1195158)
Backed out changeset 60a3b1862f71 (bug 1195158)
2015-08-18 10:52:09 +02:00
JW Wang
b47fc2fd4d Bug 1195158. Part 4 - remove unused code. r=cpearce. 2015-08-18 11:12:39 +08:00
Bobby Holley
7cc6fc32f7 Bug 1188976 - Rename ProxyMediaCall to InvokeAsync. r=froydnj 2015-08-17 14:54:42 -07:00
Aryeh Gregor
0ccef27b6a Bug 1179451 - Part 1: Rewrite some ternary operators as if/else. r=froydnj
--HG--
extra : rebase_source : 161e415b6f518bf2b82e45b6f7f8d21298712d81
2015-08-13 15:22:48 +03:00
Jean-Yves Avenard
a8320dc97c Bug 1194197: [MSE] Properly propagate decoding and network errors to media element. r=cpearce
This is not 100% per spec, however neither is our handling of those errors in the media element.
2015-08-14 15:33:50 +10:00
Jean-Yves Avenard
0e869054eb Bug 1194188: [MSE] Don't allow call to appendBuffer if media element is in error. r=cpearce 2015-08-14 15:33:45 +10:00
Jean-Yves Avenard
cb1d7d0a7d Bug 1185827: [MSE] Error when detecting an audio format configuration change. r=gerald 2015-08-14 15:33:41 +10:00
Gerald Squelart
8d8c88b8d2 Bug 1193142 - Evict as many trailing frames as needed to meet the eviction request - r=jya
--HG--
extra : histedit_source : 8f1f1b760bb9d6842e940608648368ff136d0b40
2015-08-13 08:23:07 -07:00
Benjamin Chen
2b8b8c084b Bug 1188155: Enable MOZ_GONK_MEDIACODEC in moz.build. r=k17e
--HG--
extra : histedit_source : 2b0d3993540e96b092167f48d1b9966c8e34dac8
2015-08-12 18:28:49 +08:00
Jean-Yves Avenard
b55f0cf63a Bug 1190238: P1. Remove MediaResource::Read/Seek. r=cpearce
This functionality is now replaced with a dedicated new MediaResourceIndex class.
This allows for concurrent Read/Seek use of the MediaResource without having side effects.
2015-08-13 15:27:09 +10:00
Gerald Squelart
810e57cb4c Bug 1193123 - Remove redundant & wrong SetFuzz. r=jya 2015-08-11 22:14:00 -04:00
Jean-Yves Avenard
4d71465950 Bug 1180935: [MSE] P5. Disable some tests on windows 7. r=cpearce
The try machines do not have Service Pack 1 installed, the WMF decoder doesn't output frames until a full second of data has been added. Rendering those tests invalid.
2015-08-12 21:46:07 +10:00
Jean-Yves Avenard
3554ad0645 Bug 1180935: P2. Update mochitests due to new reader behaviour. r=cpearce 2015-08-12 21:46:06 +10:00
JW Wang
3a7d265755 Bug 1193603. Part 2 - Fix miscalculation in converting micro seconds to seconds. r=jya. 2015-08-12 18:02:34 +08:00
Jean-Yves Avenard
b083f82bf0 Bug 1180935: P4. Ensure endOfStream() is call in mochitest. r=gerald
In test_HaveMetadataUnbufferedSeek_mp4, do endOfStream after appending 2nd buffer in case decoder doesn't output enough frames to seek to the target point.
2015-08-08 23:48:27 +10:00
Jan Gerber
feb0c4eb75 Bug 1182946: [MSE] P2. Fix webm mediasource test. r=jya
End of first media segment is 25523, not 25223
2015-08-08 20:40:53 +10:00
Jan Gerber
97ea57847e Bug 1182946: [MSE] P1. Re-enable webm mediasource tests. r=jya,r=karlt 2015-08-08 20:40:52 +10:00
Jean-Yves Avenard
3a47f38c9e Bug 1191142: [MSE] P2. Round removed buffered intervals. r=gerald
Calculating intersections between two interval sets with different fuzz can lead to useless tiny intervals which could cause CheckNextInsertionIndex to fail.
2015-08-07 23:12:00 +10:00
Jean-Yves Avenard
875b5b12be Bug 1191142: [MSE] P1. Don't discard data if we can't detect type. r=gerald 2015-08-07 23:12:00 +10:00
Jean-Yves Avenard
aa36da29fe Bug 1192097: [MSE] P3. Add logging for when insertion index is reset. r=gerald 2015-08-07 23:12:00 +10:00
Jean-Yves Avenard
7c0c6f9e9b Bug 1192097: [MSE] P2. Abort current operation when mediasource is detached. r=gerald
Should a playback error occurs, the MediaSource element will be closed and will detach its sourcebuffers. Cancel any pending operations going in the sourcebuffers.
2015-08-07 23:11:59 +10:00
Jean-Yves Avenard
3ce206b23e Bug 1192097: [MSE] P1. Error when we detect invalid/incoherent data. r=gerald
Additionally, prevent assert due to incorrectly creating MozPromise (aka MediaPromise)
2015-08-07 23:11:59 +10:00
Carsten "Tomcat" Book
f9d9368a83 Backed out changeset b9c50a97ee3e (bug 1182946) for m3 mulet test failures in test_SeekableAfterEndOfStreamSplit.html on a CLOSED TREE 2015-08-07 14:57:25 +02:00
Jan Gerber
8da0ca76c8 Bug 1182946: [MSE] Re-enable webm mediasource tests. r=jya,r=karlt 2015-08-07 21:44:10 +10:00
Jean-Yves Avenard
34f14685e5 Bug 1190258: [MSE] P3. Use actual allocated size rather than logical size when calculating eviction rate. r=gerald
This makes eviction slightly more aggressive and ensure we are actually under the memory threshold.
2015-08-06 18:48:45 +10:00
Jean-Yves Avenard
8c8e3b2a70 Bug 1190258: P1. Use getter to access MediaRawData mData and mSize member. r=cpearce 2015-08-06 18:48:44 +10:00
Bobby Holley
c4645a718b Bug 1190496 - Namespace the SharedThreadPool.h include. r=cpearce 2015-08-04 14:00:25 -07:00
Jean-Yves Avenard
38f40fd819 Bug 1190019: [MSE] P2. Remove cycle between TrackBuffersManager and MediaSourceDemuxer. r=gerald 2015-08-04 16:19:15 +10:00
Jean-Yves Avenard
8905370e55 Bug 1190019: [MSE] P1. Remove cycle between SourceBuffer and TrackBuffersManager. r=cpearce
Instead we use a a ref-counted attribute holder to store those arguments.
2015-08-04 16:19:14 +10:00
Jan Gerber
15e7adedaf Bug 1187247: [MSE] P2. Enable WebM in MediaSource. r=jya 2015-08-01 08:34:00 +10:00
Jan Gerber
2f85d4858f Bug 1187247: [MSE] P1. Continue parsing MediaSegment if buffer starts with SimpleBlock/Block. r=kinetik
Apply to WebM streams.
2015-08-01 08:33:59 +10:00
Carsten "Tomcat" Book
7005e3bf85 Merge mozilla-central to mozilla-inbound on a CLOSED TREE 2015-07-31 13:50:49 +02:00
Carsten "Tomcat" Book
7b02077e1e merge mozilla-inbound to mozilla-central a=merge 2015-07-31 12:06:51 +02:00
Wes Kocher
fde3090001 Backed out changeset b9cc2c3f8bda (bug 1187247) because the patch this depends on was backed out a=backout 2015-07-30 15:23:55 -07:00
Carsten "Tomcat" Book
516119753f Backed out changeset 4624de03e2e5 (bug 1184867) 2015-07-30 15:47:58 +02:00
Carsten "Tomcat" Book
9e504b2779 Backed out changeset 8b17cd283110 (bug 1184867) 2015-07-30 15:47:55 +02:00
Jean-Yves Avenard
ceccac91fe Bug 1183196: [MSE] P3. Slightly increase debugging information. r=kentuckyfriedtakahe
Print the atom's offset, makes it easier to verify that byte ranges are properly calculated.
2015-07-30 20:42:45 +10:00
Jean-Yves Avenard
fa6675ed02 Bug 1189138: [MSE] P3. Properly shift our demuxing index when data is added. r=gerald
Should frames be added before our current demuxing position, we must shift the index ; otherwise the next retrieved frames will be the wrong one.
2015-07-30 20:42:44 +10:00