Commit Graph

10870 Commits

Author SHA1 Message Date
Wes Kocher
1af6d5cf57 Merge inbound to central, a=merge
UPGRADE_NSS_RELEASE
MozReview-Commit-ID: CBIFPwA5aNp

--HG--
extra : amend_source : 035a5be59d0046a643d0f836a95195e8c4ade4a6
2017-06-13 18:27:10 -07:00
James Cheng
60874a3b96 Bug 1368907 - Part6 - Modify the corresponding native code callers. r=jolin
MozReview-Commit-ID: KUa1EjdwE4B

--HG--
extra : rebase_source : 8f8baee5af6f2e231a5b3e6b86722463a140615c
2017-06-12 16:54:19 +08:00
bechen
e915d55250 Bug 1368489 - Fixing TimeMarchesOn step 13, sort the tasks by "text track cue order". r=rillian.
1. Sort by TextTrack. 2. Sort by time. 3. Sort by the order of added to TextTrack.

MozReview-Commit-ID: 4nwx6U5dMpy

--HG--
extra : rebase_source : 2998c48982e40604b068ffca525691c5b69ae2cf
2017-06-13 09:52:27 +08:00
bechen
ab3d9098bd Bug 1368489 - Add testcase to testing the order for the events when cue1's endTime is equal to cue2's stratTime. r=rillian
MozReview-Commit-ID: 5Xyw4MsUR5K

--HG--
extra : rebase_source : c4ca3dee366d66fab101231a93a86056d16f6a68
2017-06-13 09:51:56 +08:00
Carsten "Tomcat" Book
0aaf610c0f Merge mozilla-central to autoland 2017-06-13 12:14:05 +02:00
Carsten "Tomcat" Book
d67ef71097 merge mozilla-inbound to mozilla-central a=merge 2017-06-13 12:09:48 +02:00
Bill McCloskey
bd66079b0c Bug 1371127 - Use GetCurrentVirtualThread() in MediaManager (r=jesup)
MozReview-Commit-ID: 2Wf9Ln8TMOx
2017-06-12 20:21:43 -07:00
Bill McCloskey
d6affd5261 Bug 1365098 - Convert NS_GetCurrentThread uses in dom/media (r=cpearce)
MozReview-Commit-ID: DUPt6xj49zz
2017-06-12 20:20:08 -07:00
Wes Kocher
8b6a6ce487 Backed out 5 changesets (bug 1370863) for marionette test failures a=backout CLOSED TREE
Backed out changeset e4605e515ffd (bug 1370863)
Backed out changeset 986d20fecd11 (bug 1370863)
Backed out changeset b0a081dfd577 (bug 1370863)
Backed out changeset bb80abe6a298 (bug 1370863)
Backed out changeset 90b14cb85f51 (bug 1370863)

MozReview-Commit-ID: chPvs0RWbK
2017-06-12 17:18:38 -07:00
Andreas Tolfsen
1ebaf83053 Bug 1370863 - Stop using Marionette.log API in external media tests; r=automatedtester,SingingTree
This removes the dependency on the Marionette server-side logging API
from the external media tests.  Instead, we rely on client-side logging
alternatives.

MozReview-Commit-ID: 8kMhMflYh4q

--HG--
extra : rebase_source : 0994bc9549309d7e603a5a9b550c31a7a3332b4a
2017-06-09 14:29:49 +01:00
Jan Henning
f5e7f0f635 Bug 1364866 - Part 2 - Set MAX_SKIPPED_BYTES dynamically depending on parsing state. r=esawin
As long as we're undecided whether the data we're being fed is actually a valid MPEG stream, we only search a limited amount of data for a valid frame header before giving up. Once we have found a valid frame header however, we change our behavior and search until EOS for the next frame in order to cope with possibly corrupted streams.

In practice it has turned out that the first MPEG frame we detect might in fact be a false positive. Therefore, we now turn any found frame into a candidate frame at first and only accept it as the real first frame if it is followed by at least two other matching frames in succession.

As currently implemented, our MAX_SKIPPED_BYTES logic however doesn't know about this and turns itself off as soon as we've found anything that *looks* like a valid MP3 frame header. This means that if that frame was in fact a false positive, we can now go off on a wild goose chase through what might potentially be the *whole* file while looking for putative followup frames.

To fix this, the parser now records not just whether it has found *any* frame, but also whether it has detected a *succession of valid frames* and then sets the amount of bytes to be searched for the next frame based on that state.

MozReview-Commit-ID: 3WQTfLg88kV

--HG--
extra : rebase_source : 2bd84568f1e138d1d9bafdab96ddae705dd0a286
2017-05-15 22:49:40 +02:00
Jan Henning
6651f2976e Bug 1364866 - Part 1 - Provide a function for directly retrieving the total size of an ID3 tag. r=esawin
MozReview-Commit-ID: B9GQ7vzoJ2l

--HG--
extra : rebase_source : 584f871b632057fdd490a47cc8772ddc97622fa5
2017-06-02 20:16:28 +02:00
Jan Henning
41506f615f Bug 1364866 - Part 0 - Cleanups. r=esawin
MozReview-Commit-ID: 7mLH5W9gBp2

--HG--
extra : rebase_source : 5dc02feb1779475042045b9744ee85126c29b477
2017-06-02 20:35:29 +02:00
James Cheng
0fd72ba177 Bug 1350246 - [Part8] Add the native code implementation into source tree. r=jya
MozReview-Commit-ID: 6xS4QCrsfJa

--HG--
extra : rebase_source : fab6273caf785fcc09d0073a3f18d3b8fbddb022
2017-05-18 14:56:50 +08:00
Munro Mengjue Chiang
ac029ed760 Bug 861716 - queue a gUM request if there has been a pending one. r=jib
MozReview-Commit-ID: 52KcsN27AR3

--HG--
extra : rebase_source : edd74624d32f964eee619e651be0c93dbaae0ac6
2017-05-12 11:32:14 +08:00
James Cheng
bdb07047b2 Bug 1350246 - [Part7] Create HLSResource if the mimetype is HLS. r=jya
MozReview-Commit-ID: HTUaA2zwYVH

--HG--
extra : rebase_source : e9f364f8897ef9fbf8aad423eef857dbd8b9c968
2017-05-05 16:03:39 +08:00
James Cheng
95c4d8f668 Bug 1350246 - [Part6] Use DecoderTraits::IsHttpLiveStreamingType to implement HLSDecoder::IsSupportedType and use HLSDecoder::IsSupportedType to implement the following APIs for mimetype of HLS. r=jya
(1) Check if we should instantiate HLSDecoder in DecoderTraits::InstantiateDecoder.
(2) Reply CANPLAY_MAYBE in CanHandleMediaType on Fennec.

MozReview-Commit-ID: 4Y6Ju5yk6ha

--HG--
extra : rebase_source : 0755d580ac3e415849afc9f7f5f6ffd2d0dfc870
2017-05-31 18:37:23 +08:00
James Cheng
d994078234 Bug 1350246 - [Part5] Move IsHttpLiveStreamingType from DecoderTraits.cpp to its .h. and modify the callers related to this change. r=jya
MozReview-Commit-ID: 8lT9rUDmLvD

--HG--
extra : rebase_source : af3138c9aff2419424c6288cfdc13e40121756a1
2017-05-18 14:47:55 +08:00
James Cheng
202943a892 Bug 1350246 - [Part4] Add a feature preference for HLS, default on for Fennec. r=jya
MozReview-Commit-ID: AlfMLzGmU5K

--HG--
extra : rebase_source : 95c37887fcf2a53a1c1fa85aa83ec7804d78e89b
2017-05-05 15:57:22 +08:00
James Cheng
7fd1bfe9c2 Bug 1350246 - [Part3] Implement a HLSDemuxer and its trackdemuxers for AV. r=jya
MozReview-Commit-ID: EndIUfiSEMu

--HG--
extra : rebase_source : cef03ec571a6031104f1333d89c54a244e470005
2017-05-05 16:44:52 +08:00
James Cheng
5133a6a0c7 Bug 1350246 - [Part2] Implement a HLSResource as a MediaResource. r=jya
MozReview-Commit-ID: BOH0AvScYfK

--HG--
extra : rebase_source : 879bd4f13ee40785ec7efd4c7ca8198cecf5c0ea
2017-05-05 16:42:34 +08:00
James Cheng
ab6d9e88cc Bug 1350246 - [Part1] Implement a HLSDecoder as a MediaDecoder. r=jya
MozReview-Commit-ID: AROu6wdm9RZ

--HG--
extra : rebase_source : 28332444ed7dd82b9001abf959aaacd11cab5f07
2017-05-05 16:40:29 +08:00
James Cheng
19be56a7d1 Bug 1350246 - [Part0] Add a Util header for PR logging and define MOZ_ANDROID_HLS_SUPPORT macro. r=jya
MozReview-Commit-ID: J3koxu4F3kC

--HG--
extra : rebase_source : aef0220cbec051c4d26bca0076589195c80f6cd8
2017-05-05 16:43:48 +08:00
Chris Pearce
abac85f1d9 Bug 1372080 - Reorder frames decoded by Widevine CDM. r=jya
The next version of the Widevine CDM (970) has a new H.264 decoder and it does
not appear to be outputing frames it decodes in presentation order, so we need
to reorder the frames output by the CDM.


MozReview-Commit-ID: HMsQVN3NCIU

--HG--
extra : rebase_source : 68ef406556087434fa12b72ae5ed5c2e1bce2b64
2017-06-12 17:47:05 +12:00
JW Wang
cdf019e08b Bug 1371202. P2 - don't release decoders if we are looping since we will need them soon. r=jya
MozReview-Commit-ID: L1hOBytfENK

--HG--
extra : rebase_source : dc2d399ed0af1d98cb6945641aace7e76ff290b7
extra : intermediate-source : bea92e7fd9ed383d1df040b6757b8e3e1ca915a1
extra : source : 48738321b534a29d7747fa9ad0bec71b29067a52
2017-06-08 11:42:43 +08:00
JW Wang
75e01f7b0a Bug 1371202. P1 - plumb the 'loop' attribute into MDSM. r=jya
MozReview-Commit-ID: DtsaXmtQw76

--HG--
extra : rebase_source : 34686d455670975a824dc803a16b8acff97c86ab
extra : intermediate-source : 0de95b1644a365dda9beff4b75d56251da2258c7
extra : source : ba5b2599c949766395bf5b0381023a752bc6e04d
2017-06-08 12:03:10 +08:00
JW Wang
549f9bcf13 Bug 1371515. P5 - remove mIsShutdown which is not read at all. r=kaku
MozReview-Commit-ID: H8MZSoG9wCV

--HG--
extra : rebase_source : e02b3814993cd325520b89866f1e275b62c94fd6
2017-06-09 11:47:53 +08:00
JW Wang
b394689f0b Bug 1371515. P4 - remove CanonicalIsShutdown() which has no callers at all. r=kaku
MozReview-Commit-ID: AVWtCVFflho

--HG--
extra : rebase_source : a8a8ac68b03ab45ee086607b5b0ba416ff9bbecf
2017-06-09 11:45:20 +08:00
JW Wang
f367b1a0e9 Bug 1371515. P3 - remove IsShutdown() which now has no callers. r=kaku
MozReview-Commit-ID: Te3F7WJ8iF

--HG--
extra : rebase_source : 5ed1fa5537f32d3e340ba61c2e1538ed23c007d7
2017-06-09 11:43:51 +08:00
JW Wang
0ddb970029 Bug 1371515. P2 - remove the check from DecodeError(). r=kaku
The same reason as P1. ShutdownState::Enter() disconnects callbacks to prevent
DecodeError() from being called during shutdown.

MozReview-Commit-ID: EFZiE2zkcUZ

--HG--
extra : rebase_source : 279d5fcdc79f2d4d7861cea627c4314b26aa5da5
2017-06-09 11:42:59 +08:00
JW Wang
5ecf1f125f Bug 1371515. P1 - remove the |IsShutdown()| check from Seek() which is already handled by ShutdownState. r=kaku
MozReview-Commit-ID: 5V7xCGCsh5j

--HG--
extra : rebase_source : 0f23c9390893e421ecc976bb0d0eeed534351de2
2017-06-09 11:41:20 +08:00
JW Wang
a61afab096 Bug 1371514. P2 - remove MediaDecoder::mStateMachineIsShutdown. r=gerald
MozReview-Commit-ID: Dv2pdHW2tgI

--HG--
extra : rebase_source : aea740ced32fe31185127617102f026b1ad0349e
2017-06-09 11:27:42 +08:00
JW Wang
ba75abc972 Bug 1371514. P1 - remove AbstractMediaDecoder::IsOggDecoderShutdown() and its friends. r=gerald
MozReview-Commit-ID: 5HOqH6YtB8b

--HG--
extra : rebase_source : 49cc525c32d827584c856e815a1ff3e2df968cea
2017-06-09 11:24:45 +08:00
JW Wang
e4b22b962a Bug 1371200. P5 - devirtualize some functions that don't have overrides. r=cpearce
MozReview-Commit-ID: CtWPXF6MYIi

--HG--
extra : rebase_source : c0d147cb878ddf2147355c02419fd7d7b2044a40
extra : source : 6467bf865cdcefd5b41049045ac9d34b101d5673
2017-06-07 14:41:37 +08:00
JW Wang
7b50a4d6b2 Bug 1371200. P4 - constify some members. r=cpearce
MozReview-Commit-ID: B7rrXrTn7RD

--HG--
extra : rebase_source : cdca8a7a313d0c066aac58083e4b63e1be83603d
extra : source : 4d818f16afa3763b2515bdb9834880f11aa13989
2017-06-07 14:26:36 +08:00
JW Wang
eb1841ec23 Bug 1371200. P3 - remove unused code. r=cpearce
MozReview-Commit-ID: JVmmKSAQl3q

--HG--
extra : rebase_source : b4a727b9c631fc85d12abb84d2b91b31923093eb
extra : source : 79cbb22b4a53945dcff3046b27dac617c8dac51a
2017-06-07 14:21:47 +08:00
JW Wang
e8a94c0927 Bug 1371200. P2 - add more fields to MediaDecoderInit. r=cpearce
Now we can init some members in the constructor and remove the setters
that are called only once.

MozReview-Commit-ID: 2hkrIA6pFlh

--HG--
extra : rebase_source : 33c008ef1508597e64ef7f92b028867dbd4ffba6
extra : source : fa213ee733ea881f4f76dac06c9b4709aeba4b91
2017-06-07 14:10:26 +08:00
JW Wang
4031d18757 Bug 1371200. P1 - add MediaDecoderInit and fix MediaDecoder constructor and its friends. r=cpearce
We will add more fields to MediaDecoderInit and be able to remove some setters.

MozReview-Commit-ID: BVx935IHQHf

--HG--
extra : rebase_source : 6d167265e478ce39881ceada1303e9ca18189bbf
extra : source : 0c26f909568f673591ad6720458dfc912c01daad
2017-06-07 12:14:11 +08:00
Gerald Squelart
0fa477a0cd Bug 1371205 - MEDIACACHESTREAM_NOTIFIED_LENGTH captures the HTTP header length given to MediaCacheStream - r=cpearce,francois
MozReview-Commit-ID: 9muZcpfD2vG

--HG--
extra : rebase_source : 11de88ac8f0788c3e04ef206bcdacc4ef112a139
2017-06-08 20:26:24 +12:00
Chris Pearce
f6c7ea61dd Bug 1346620 - Resolve symlinks and junction points in path to GMP dir when loading GMP process. r=bobowen
The sandbox blocks loading of GMPs when the GMP resides in a directory stored
in a path which contains a symlink or junction point. So resolve GMP paths
fully before instantiating the GMP process.

MozReview-Commit-ID: EvPCpNIDNwg

--HG--
extra : rebase_source : 7df8236c9988a674ae128faf63b949fd711ab4e0
2017-06-09 15:29:46 +12:00
Jonathan Hao
dca1a28633 Bug 1217238 - Reduce time precision when privacy.resistFingerprinting is on. r=mystor
This patch is adapted from Tor bug 1517.

To offer some protection against timing attacks by JS content pages, in this
patch we round the various time-exposing APIs (such as Date and
Event.timeStamps) to the nearest 100 ms when the pref "privacy.resistFingerprinting" is on.

MozReview-Commit-ID: eGucM9nGTn

--HG--
extra : rebase_source : 3ee600b07943f3954e9a2a9561391f2f7821bb86
2017-06-06 11:45:14 +08:00
Jean-Yves Avenard
f8c58713e0 Bug 1371290: P2. Override sample duration if unknown. r=mattwoodrow
The VP9 decoder doesn't properly set the sample duration, leading to all samples being marked as having a zero duration.

The compositor drops those frames incorrectly. This issue will be addressed in bug 1222874.

MozReview-Commit-ID: JQdtTL4nAN

--HG--
extra : rebase_source : 7c69cd3522c4b2231a07ab3f3c1d012843ac2f69
2017-06-08 13:48:39 +02:00
Jean-Yves Avenard
3351746b41 Bug 1371290: P1. Use TimeUnit in WMF decoder. r=mattwoodrow
Using a float to store the last duration was unwise (as it has only a 24 bits mantissa), luckily it wasn't used except very particular circumstances.

MozReview-Commit-ID: BpL8ufQFNeR

--HG--
extra : rebase_source : b4a5a1301be4a0a81d1907b6296cbb4b6c4877d9
2017-06-08 13:44:46 +02:00
Jean-Yves Avenard
9f0eebe46e Bug 1370079: P1. Don't check for DXVA support when checking for VP9 support. r=mattwoodrow
SupportsMimeType is called in the content process, for which, following bug  1338011, dxva is marked as disabled.

CanCreateWMFDecoder already performs the check of allowing VP9 only if it's hardware accelerated, so we don't need to test if dxva is enabled prior.

MozReview-Commit-ID: 7Jvaop6ZznU

--HG--
extra : rebase_source : 854e7b09718863e710843d11c9327de47abf1076
2017-06-08 13:54:00 +02:00
Ralph Giles
79deabf94b Bug 1370976 - Add webm MediaMIMEType gtest. r=gerald
Make sure we test the other major container we
need to parse correctly.

MozReview-Commit-ID: AnrGADFXPkw

--HG--
extra : rebase_source : 5e20580d0900a62f923b96089410845c187ac2a7
2017-05-31 13:35:15 -07:00
Jean-Yves Avenard
45d7f2628e Bug 1370805: P3. Use whichever extradata is available when constructing the decoder. r=jwwang
Prior bug 1313398, the only time we would call H264Converter::CreateDecoderAndInit was if we encountered AVC3 content where the H264 extradata didn't exist in the metadata.
AVC3 was the only situation where mDecoder would be null after construction.

However, now, it is possible for the construction of the decoder to be interrupted, which would leave mDecoder null. For AVC1 content, if this happened, we wouldn't have in-band SPS/PPS necessary for CreateDecoderAndInit to complete.
So we use whichever extradata is available.

MozReview-Commit-ID: 702xj045LAv

--HG--
extra : rebase_source : e85077cedfece066398e36d8a4dd16f4bd406db6
2017-06-07 15:14:57 +02:00
Jean-Yves Avenard
a81b74c44a Bug 1370805: P2. Let current operation completes before continuing. r=jwwang
This is a simpler approach required as both InitPromise and FlushPromise are exclusives.

It's in practice simpler too.

MozReview-Commit-ID: ItaAhC0Bk8T

--HG--
extra : rebase_source : 2c68b8843cfccd784bfcf1ae4fd08407ee891349
2017-06-07 15:10:04 +02:00
Jean-Yves Avenard
09f24e7c7d Bug 1370805: P1. Revert "Bug 1370164: Properly handle flushing during ongoing operations. r=jwwang"
--HG--
extra : rebase_source : d2ed98092313a357912443238d7c48e060c462f7
2017-06-07 13:32:09 +02:00
Kaku Kuo
2afe1fbdbd Bug 1349253 - modify the assertion; r=jwwang
While MDSM calls MFR::Seek(), MFR tries to do video seek first and then the audio seek.

Video-seek and audio-seek are applied sequentially, and if something wrong in video-seek,
MFR discards the whole seek operation without applying audio-seek.

video    | audio     |
waiting  | waiting   | What MDSM receives
-----------------------------------------------------------------------------
   X     |    X      | resove mSeekRequest
-----------------------------------------------------------------------------
   O     |    X      | reject mSeekRequest with type=VIDEO, error=WAITING
-----------------------------------------------------------------------------
   X     |    O      | reject mSeekRequest with type=AUDIO, error=WAITING
-----------------------------------------------------------------------------
   O     |    O      | reject mSeekRequest with type=VIDEO, error=WAITING
-----------------------------------------------------------------------------

So, here, AccurateSeekingState::OnSeekRejected() has a unified code to handle
WAITING_FOR_DATA error for both video and audio type, and it uses the
aReject.mType variable to distinguish different types.

But, it mixes the assertions. We should also apply assertions according to the
type that is in concern.



MozReview-Commit-ID: F7RpnFghcKk

--HG--
extra : rebase_source : d18c3197ec2a08f2f184150e0c4a08da200a34b0
2017-06-07 18:52:36 +08:00
Ryan VanderMeulen
9b7a73b65a Merge m-c to autoland. a=merge
UPGRADE_NSPR_RELEASE UPGRADE_NSS_RELEASE

--HG--
extra : amend_source : a59e53ba2f8db608f613f21ad6da2b5be8814aa4
2017-06-07 22:55:56 -04:00