Commit Graph

1949 Commits

Author SHA1 Message Date
Pale Moon 607cf38dfb Align compositor with software vsync, disable HW vsync rendering. 2018-07-25 07:26:36 +08:00
trav90 b4b247d993 Use actual allocated size rather than logical size when calculating eviction rate
This makes eviction slightly more aggressive and ensures we are actually under the memory threshold.
2018-07-25 07:26:30 +08:00
trav90 fa1428dc8a Remove cycle between TrackBuffersManager and MediaSourceDemuxer. 2018-07-25 07:26:22 +08:00
trav90 7dbe54ecc3 Remove cycle between SourceBuffer and TrackBuffersManager
Instead we use a a ref-counted attribute holder to store those arguments.
2018-07-25 07:26:15 +08:00
trav90 b376f9386c Apply fuzz factor when adjusting buffered time ranges
Frames may have small discontinuities, which would lead to intervals being created that are less than a frame duration, which in turn could lead to a potential crash.
2018-07-25 07:26:08 +08:00
trav90 de989d0afe Fix build bustage 2018-07-25 07:26:01 +08:00
trav90 c3d1b6e9b7 Make SourceBufferResource destructor virtual 2018-07-25 07:25:54 +08:00
trav90 326e5cb64c Properly shutdown demuxers 2018-07-25 07:25:48 +08:00
trav90 acde0ef19f Properly delete MediaResource when released on non main thread
Fixes potential memory leak.
2018-07-25 07:25:41 +08:00
trav90 c768fa3bd3 Put some code behind "#if DEBUG"'s 2018-07-25 07:25:34 +08:00
trav90 5bc10d4ab8 Process an entire media segment at a time rather than frame by frame
This should provide a significant performance improvement.
This also assumes that frames within a media segment are continuous.
2018-07-25 07:25:27 +08:00
trav90 0309c7a865 Returns error for invalid web mimetype
Invalid error rather than not supported.
2018-07-25 07:25:19 +08:00
trav90 279799acdd Add TimeUnit operator/= (int) 2018-07-25 07:25:12 +08:00
trav90 72cd8717f1 Add IntervalSet operator-= 2018-07-25 07:25:06 +08:00
Pale Moon 8e8ce68c9f Add crash test file for #1066 2018-07-25 07:24:59 +08:00
Franklin DM 0c8ed87798 Remove traces of forward button hiding [linux] 2018-07-25 07:24:52 +08:00
Franklin DM 057271107d Remove traces of forward button hiding [osx] 2018-07-25 07:24:45 +08:00
Franklin DM 84b4f1ffc9 Remove traces of forward button hiding [win] 2018-07-25 07:24:38 +08:00
trav90 69ba046042 Correctly handle encryption with MSE multiple init segments 2018-07-25 07:24:31 +08:00
trav90 7a5e9066a8 Only remove coded frames if presentation time is later than previous frame 2018-07-25 07:24:24 +08:00
trav90 ce3a3c4c06 Crash fix: Don't add reference to SourceBuffer outside the main thread 2018-07-25 07:24:16 +08:00
Pale Moon 71721cb338 Crash fix in print preview on some sites.
This resolves #1106.
2018-07-25 07:24:09 +08:00
janekptacijarabaci 5794a27bda Canvas - CanvasRenderingContext2D.drawImage can throw 0x80040111 (NS_ERROR_NOT_AVAILABLE) 2018-07-25 07:24:03 +08:00
NTD 8af952381d Rename platform prefs 2018-07-25 07:23:55 +08:00
NTD 4fad88ff00 Clobber 2018-07-25 07:23:48 +08:00
Pale Moon a62ebe28da Add additional check for type of node before trying to use it.
This resolves #1020.
2018-07-25 07:23:42 +08:00
trav90 b0fde642a2 Return an error as per spec if eviction failed 2018-07-25 07:23:35 +08:00
trav90 31a25c3b47 Bump eviction threshold to 100MB 2018-07-25 07:23:28 +08:00
trav90 8d0d772977 Ensure MediaFormatReader is notified when new data is received 2018-07-25 07:23:20 +08:00
Pale Moon f3c9065a6b Follow-up for #452: rename pre-text string ID.
This allows language packs to remain fully backwards compatible.
2018-07-25 07:23:13 +08:00
Pale Moon 8d9a000034 Allow sites to provide custom dialog text to page-unload dialogs.
This is limited to 500 characters maximum.
Empty strings or strings considered too small (less than 8 characters) to be conveying a useful message will result in our default message being displayed, instead, like before.
This resolves #452.
2018-07-25 07:23:07 +08:00
trav90 e33dd9b953 Be slightly less aggressive when evicting data 2018-07-25 07:23:00 +08:00
trav90 de382e1c14 Remove appendMode test assertion
SourceBuffer segment mode is now supported.
2018-07-25 07:22:53 +08:00
trav90 ee4537a022 Only allow MP4 when new MSE code is active 2018-07-25 07:22:46 +08:00
trav90 269b5fa090 Reject non-supported content-format
Our new MSE architecture currently only supports MP4.
2018-07-25 07:22:39 +08:00
trav90 2251dd777a Properly add sample at end of array if previous sample was overlapping
Per spec slightly overlapping frames are to be kept, so we can't rely on the buffered range end time as it could be of the overlapped frame and ending later than the new frame.
2018-07-25 07:22:27 +08:00
trav90 02d6b9babe Reject append promise early
So the next call to appendBuffer following an abort() is guaranteed to succeed.
2018-07-25 07:21:59 +08:00
trav90 22d80fa55d Ensure our cached buffered range is setup
If the mediasource track demuxer was initialized after appendSegment was completed, our buffered ranges would be empty.
2018-07-25 07:21:27 +08:00
trav90 e08a1f8197 Ensure frames are returned in pts order
We move management of the data to the TrackBuffersManager as it contains
precise information on how the samples are being moved.
2018-07-25 07:20:55 +08:00
trav90 c57311759f Properly handle removal of data within the current coded frame group 2018-07-25 07:20:48 +08:00
trav90 c1c2a8ff75 Update insertion index on the fly
Prevent reparsing the entire stream in the next call to appendBuffer.
2018-07-25 07:20:40 +08:00
trav90 29500835ad Do not error in prepare append if we've reached our memory threshold
In the new MSE architecture, eviction is done asynchronously while also being very accurate, so eviction will always succeed.
Limit our eviction rate to be a minimum of 512kB.
2018-07-25 07:20:34 +08:00
trav90 f99fc572ed Fix frames removal 2018-07-25 07:20:27 +08:00
trav90 e83a2f3ddb Fix logging in TrackBuffersManager 2018-07-25 07:20:20 +08:00
trav90 81b8d8837f Fix frame insertion 2018-07-25 07:20:13 +08:00
trav90 09ddc38946 Add iterators to IntervalSet 2018-07-25 07:20:06 +08:00
Pale Moon b649e7fdbd Remove hotfix add-on provisions.
This resolves #844.
2018-07-25 07:19:54 +08:00
Pale Moon 935c15a7cd Add null-checks to avoid crashing during media playback if the audio device is removed.
This should fix #1098.
2018-07-25 07:19:46 +08:00
trav90 60381f9215 Add missing ; 2018-07-25 07:18:20 +08:00
trav90 794af349b7 Reject promise if decoder couldn't be created 2018-07-25 07:18:17 +08:00