Commit Graph

11338 Commits

Author SHA1 Message Date
James Cheng
dce1114dea Bug 1373314 - Allow mp4a mimetype with leading 0 in aud-oti for compatibility. r=cpearce
MozReview-Commit-ID: 6SwbWuxzpEJ

--HG--
extra : rebase_source : 2e6ed6ffef3ce9da16a691e40f78fe42ef8c8800
2017-07-20 15:35:41 +08:00
Ryan VanderMeulen
0cfb1d8460 Merge inbound to m-c. a=merge
CLOSED TREE
2017-07-19 10:00:35 -04:00
Alastor Wu
8fa2796b1e Bug 1364340 - enable dom/media/test/test_resolution_change.html on Android. r=bechen
MozReview-Commit-ID: EvtkgkyFbIp

--HG--
extra : rebase_source : 184096007d748d3564f5ad1bcbc9e67da4118970
2017-07-19 10:57:23 +08:00
Ryan VanderMeulen
a064d6dbfc Merge m-c to inbound. a=merge 2017-07-18 13:00:03 -04:00
Paul Adenot
4029e408c3 Bug 1378067 - Label more runnables in dom/media (GraphDriver.cpp, CubebUtils.cpp, DOMMediaStream.cpp). r=jesup
MozReview-Commit-ID: EQzR1AfzvzE

--HG--
extra : rebase_source : 9950d07eb1e8e9b1d07f94c10d7c5cf0008a8141
2017-07-18 11:26:58 +02:00
Sebastian Hengst
cb2227a5c7 Backed out changeset 6dc016256eba (bug 1378067) for bustage at dom/media/webaudio/WebAudioUtils.cpp:107. r=backout on a CLOSED TREE 2017-07-18 11:51:22 +02:00
Paul Adenot
ac12821115 Bug 1378067 - Label more runnables in dom/media (GraphDriver.cpp, CubebUtils.cpp, DOMMediaStream.cpp). r=jesup
MozReview-Commit-ID: EQzR1AfzvzE
2017-07-18 11:26:58 +02:00
Wes Kocher
8117ff8bd3 Backed out 3 changesets (bug 1197045) for failures in browser_Troubleshoot.js a=backout CLOSED TREE
Backed out changeset 78b66a4c6b7c (bug 1197045)
Backed out changeset feea60a002a7 (bug 1197045)
Backed out changeset 57842092a282 (bug 1197045)

MozReview-Commit-ID: J0KZDSSw4XQ
2017-07-18 22:54:15 -07:00
Chun-Min Chang
8c2032ba1b Bug 1197045 - part2: Expose audio channels, layout, sample-rate, and native device information via DOMWindowUtils; r=padenot
MozReview-Commit-ID: 9Kh2w0MioUQ

--HG--
extra : rebase_source : cf0012bf9892dedb71933a48f595f97a8f648511
2017-07-18 16:09:10 +08:00
Chun-Min Chang
d6c1dd180f Bug 1197045 - part1: Create an AudioDeviceInfo to expose the native device information; r=kinetik
MozReview-Commit-ID: 2N2BkZUVOca

--HG--
extra : rebase_source : 499d069251f3231a2fd5ddbd55aaa5b5f4124723
2017-07-13 14:01:36 +08:00
Paul Adenot
b1551892bd Bug 1373213 - Repair cubeb logging when using env var. r=jesup
This does two things:
- Stop calling the callback when initializing cubeb prefs callback, see the
comment block for the rationale.
- Change the pref name so that the problem does not continue to be triggered
with users that have the old pref name in their profile.

MozReview-Commit-ID: 9Ty7Mt9WZpP

--HG--
extra : rebase_source : 1ed504be98c279f54a1a6c4168709b3ba78103e5
2017-06-23 14:35:45 -07:00
Jean-Yves Avenard
f50943d4cc Bug 1379190: P1. Remove AndroidMediaDecoder and relatives. r=cpearce
They are no longer supported and can't work with API >= 16

MozReview-Commit-ID: JkftKxW5OtY

--HG--
extra : rebase_source : 6ed4032141add293d21354640c96fc75adc565d9
2017-07-13 12:54:03 +02:00
JW Wang
cda80ee431 Bug 1381758 - Remove the debug code added in bug 1326294. r=gerald
Bug 1326294 is fixed and we don't need the debug code anymore.
This help reduce the coupling with HTMLMediaElement and make MediaDecoder
easier to be reused by Servo.

MozReview-Commit-ID: KCwAjoQFPkS

--HG--
extra : rebase_source : 0c98899f63edb5971ddecb812635c9a6f693d448
2017-07-18 16:36:01 +08:00
Alastor Wu
80f58a3d1e Bug 1381376 - only suspend decoding when the pref is on. r=jwwang
Only suspend decoding when the pref is on, but resuming could be done when the
pref is off.

MozReview-Commit-ID: JDh1pRXNhc8

--HG--
extra : rebase_source : 1a075c9eff5abe0eae7bd929d9c632d5b49a63be
2017-07-17 18:38:35 +08:00
Wes Kocher
b1c83de1b7 Backed out 2 changesets (bug 1381720) for linux build failures in content_decryption_module.h a=backout
Backed out changeset e4d9cb334352 (bug 1381720)
Backed out changeset 69f177823866 (bug 1381720)

MozReview-Commit-ID: DctOanJkHh7
2017-07-17 23:21:49 -07:00
Chris Pearce
97c974f065 Bug 1381720 - Add content_decryption_module_ext.h. r=gerald
Updates to Chromium revision 6e4c388c0117fe408b66fbede91081fb1018c5fe.

Adds Verified Media Pipeline function definitions.

MozReview-Commit-ID: 2H8mMNacQqR

--HG--
extra : rebase_source : dc91151c5ffe94f59346b9f4cbab587e6c0701a3
2017-05-29 17:14:52 +12:00
Chris Pearce
9901d75b55 Bug 1381720 - Update content_decryption_module.h. r=gerald
Update to chromium revision 6e4c388c0117fe408b66fbede91081fb1018c5fe.

Includes cdm::ContentDecryptionModule_9 and cdm::Host_9 definitions,
HDCP definitions, and 10 and 12 bit image format definitions.

MozReview-Commit-ID: bYH3OBSzuT

--HG--
extra : rebase_source : d062d233c9a2b59aa5ae5c6e0584ed13b7c83e6e
2017-05-29 17:14:26 +12:00
Wes Kocher
cd4ae862fd Merge inbound to central, a=merge
MozReview-Commit-ID: CugzaiO4IW1
2017-07-17 17:27:51 -07:00
Sebastian Hengst
d85c6458d8 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-07-17 14:08:27 +02:00
JW Wang
b9b872859b Bug 1380574 - remove the call to MediaDecoderOwner::DecodeWarning() from MediaFormatReader. r=gerald
Note we will move OnDecodeWarning() from MDR to MFR when removing MDR.

MozReview-Commit-ID: 92jpwy6ghH2

--HG--
extra : rebase_source : 72e84f364cdab589efe60e70a071816cb4404955
extra : intermediate-source : fc7ff704e2096935b949ed8b9f6e73945db56a79
extra : source : 6e65a382de5de478948d434fc238a6afe231d2ac
2017-07-13 15:02:06 +08:00
JW Wang
cf0ba2ea01 Bug 1380569. P3 - remove AbstractMediaDecoder::NotifyWaitingForKey() and its callers. r=gerald
MozReview-Commit-ID: 3fHDr0xw92P

--HG--
extra : rebase_source : 07ca1ae4e8d65e66beca2d1eb0de232ec6e291fb
extra : intermediate-source : d367e33cc9c132abb9e66aae652f4bbbf4f58be1
extra : source : 029ccea837ef1948bd33ce1d786626f362c41bdf
2017-07-13 14:52:05 +08:00
JW Wang
dfccb2f79b Bug 1380569. P2 - plumb the 'waitingForKey' event into the media element. r=gerald
Note we put OnWaitingForKey() in MediaDecoderReader for MediaDecoder references
MDR instead of MFR. The function will be moved into MFR when we remove MDR and
have MediaDecoder reference MFR instead.

MozReview-Commit-ID: LBGfGmc6yFm

--HG--
extra : rebase_source : 473c95cf6eb5e7e4065f9c1251af7dacb78538a5
extra : intermediate-source : 85981e2bafa1047f8321c02de6f0726c32506811
extra : source : 5203bf6895273701ef36a81d2e827e7a7c219fdb
2017-07-13 14:49:23 +08:00
JW Wang
5cf374a225 Bug 1380569. P1 - rename CannotDecryptWaitingForKey() to NotifyWaitingForKey() and add the function to MediaDecoderOwner. r=gerald
We will use MediaEventSource to plumb the event from MFR to the media element.

MozReview-Commit-ID: 4gaEx7vYybE

--HG--
extra : rebase_source : fd595399e2db4e76ad117636768e160c2f054775
extra : intermediate-source : 1fc86c40dc83e79306c721b1acb0f31803181509
extra : source : d24b62a6041966b2639e5543c9ecccc4f7656a0d
2017-07-13 14:41:09 +08:00
bechen
f039a8f5a1 Bug 1378285 - Modify the generateREF.html to resolve the output limit of console. r=alwu
MozReview-Commit-ID: Aneusk1hYK8

--HG--
extra : rebase_source : 30f47a11f2838eeaa9260695ae02b68c171902c5
2017-07-17 11:35:51 +08:00
bechen
994ca796b2 Bug 1378285 - Last frame reftest for bipbop.mp4 . r=alwu
MozReview-Commit-ID: 2mvJgIIyWIU

--HG--
extra : rebase_source : c6bf738f1c8e0d1718e85656a770f17a05e720df
2017-07-14 18:37:05 +08:00
bechen
893ccc3da4 Bug 1372854 - Enable test_seek_nosrc.html on Android. r=alwu
MozReview-Commit-ID: 7YmInfSB6K2

--HG--
extra : rebase_source : d2ee043e9109d6ff3985ec8dbf49ca07d38249c9
2017-07-12 15:44:56 +08:00
Paul Adenot
67c95cdcdf Bug 1312623 - Don't attempt to shutdown a thread in the dtor of a GraphDriver, since it might be called during stable state. r=smaug
MozReview-Commit-ID: HA67HQQrfow

--HG--
extra : rebase_source : d9301c6f5687eb1e1c3a7c4049e48ceaf74fa529
2017-07-04 09:21:23 +02:00
Kaku Kuo
5547aba3cd Bug 1378691 P4 - skip to next key frame if the playback position is very close to it; r=jwwang
MozReview-Commit-ID: Gm0iZAHVLpS

--HG--
extra : rebase_source : e1bc9da5b809cba474983b804085dca21473b3ac
2017-07-12 17:03:45 +08:00
Kaku Kuo
4175fed6b6 Bug 1378691 P3 - return next key frame time back to MDSM; r=jwwang
MozReview-Commit-ID: LVhJ0DpM24c

--HG--
extra : rebase_source : 4aefd89a2cc2243538c248977bfff79731fc2946
2017-07-11 10:15:33 +08:00
Kaku Kuo
04ba592fac Bug 1378691 P2 - trigger skip-to-next-key-frame if the video decoding is too slow; r=jwwang
MozReview-Commit-ID: B0stJG3eOKU

--HG--
extra : rebase_source : 16cecd28bd6a5422135aa7700f3664bb9b5fd1c6
2017-07-11 09:59:13 +08:00
Kaku Kuo
a1b039d4a5 Bug 1378691 P1 - drop video until catch up playbak position for video-only seek; r=jwwang
MozReview-Commit-ID: 86BhQDbM7xV

--HG--
extra : rebase_source : 105ad54c3ab5c659ebcbda539beb480a93a66aa5
2017-07-11 09:56:09 +08:00
Wes Kocher
e9fa5c772a Merge inbound to central, a=merge
MozReview-Commit-ID: 8nlqm5dHCUQ
2017-07-14 17:14:43 -07:00
Bas Schouten
be92d4e45b Bug 1375461: Ensure mSyncObject isn't null before attempting to sync with it. r=mattwoodrow
MozReview-Commit-ID: HuflJDLhlRl

--HG--
extra : rebase_source : 8da9af58bcda88f63162b094cc1d789038848f1a
2017-07-10 07:49:34 +00:00
James Cheng
950fc2b63c Bug 1379866 - Implement MediaResource Suspend and Resume in HLSResource. r=jolin
1. Pause the Exoplayer when navigating to another page and resume playback when navigating back.

2. Fix the OOM issue.

MozReview-Commit-ID: 5UGmBzpObsb

--HG--
extra : rebase_source : f8f268612687669e1b31881465600b02b3531c55
2017-07-14 01:29:00 +08:00
Ryan VanderMeulen
112cadfae3 Merge m-c to autoland. a=merge 2017-07-14 09:52:56 -04:00
Ryan VanderMeulen
019bd042fc Merge autoland to m-c. a=merge 2017-07-14 09:16:03 -04:00
Andrea Marchesini
50f9ea47a3 Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
JW Wang
9b07417b6b Bug 1380545 - remove DispatchKeyNeededEvent from MediaFormatReader.cpp. r=gerald
We will use MediaEventSource to dispatch the 'encrypted' events.

MozReview-Commit-ID: KY3nS9OrysI

--HG--
extra : rebase_source : 4e1fa125b099567426f5a6ea2c825b77d407b2c4
extra : source : 8413b0625159d85a5814cb3bd748121653735e96
2017-07-13 11:18:07 +08:00
JW Wang
ebbb3689a4 Bug 1380532. P2 - remove AbstractMediaDecoder::GetCrashHelper(). r=gerald
MozReview-Commit-ID: IDPifgdxwTd

--HG--
extra : rebase_source : 3ec3c6f7a9ab5144fbf060b40393b306dc9eef0c
extra : source : 1de26c9ff96d7fb9710a8a16d9e7ec8abd8113cb
2017-07-13 10:21:34 +08:00
JW Wang
789cd1ebe8 Bug 1380532. P1 - pass GMPCrashHelper through MediaDecoderReaderInit to MFR. r=gerald
So we can reduce dependency on AbstractMediaDecoder.
See bug 1378295 comment 1 for the detail.

Note it is not ideal to repeat |init.mCrashHelper = ...| several times in
this patch. We will re-visit it to reduce code duplication after bug 1378295
is done.

MozReview-Commit-ID: AEC56ukqtYr

--HG--
extra : rebase_source : 07554566af74b65f391811e55847e58365ac81fe
extra : source : 7f613117f815369f65256408b221131683c0dd82
2017-07-13 10:19:36 +08:00
Alex Chronopoulos
48c9b10048 Bug 1380233 - New signature for cubeb_get_min_latency. r=kinetik
MozReview-Commit-ID: 4vh6atnnRpS

--HG--
extra : rebase_source : bee0a7d0a10b0eaf9cedb6286a1b1aa492457a94
2017-07-13 13:06:02 +03:00
bechen
d972107cee Bug 1374189 - Call NotifyPresentedFrame when resolve the mEndPromiseHolder promise. r=jwwang
MozReview-Commit-ID: Le4VER7kK2Y

--HG--
extra : rebase_source : 3b46eb752a59e4eaa2dc99b09287938c008668c8
2017-07-14 10:04:22 +08:00
bechen
c2d16d5cab Bug 1374189 - new testcase to count the total frame when "skip-to-next-key-frame.enabled" is false. r=jwwang,kaku
MozReview-Commit-ID: 4zjOoSAYild

--HG--
extra : rebase_source : c283f7e8430dc5d41b2f43635b592c01fbb096f8
2017-07-13 18:18:04 +08:00
JW Wang
ac2b0f2173 Bug 1380234. P3 - remove AbstractMediaDecoder::CompositorUpdatedEvent() and its users. r=jya
MozReview-Commit-ID: JioS7MC5qFh

--HG--
extra : rebase_source : 9df457507bfcbcd1baa2e66af61781cc2a2ec06f
extra : source : af4993bcca5097628b12b4861074d8eed9163d9b
2017-07-12 16:49:59 +08:00
JW Wang
803c5fa941 Bug 1380234. P2 - send compositor updates to the reader directly without using MediaEventSource. r=jya
MozReview-Commit-ID: EJO2PK525gS

--HG--
extra : rebase_source : 11a033d2e6a94b307ca8095b2ffd7348edb2b6d4
extra : source : 44c52998638933e8b709fa5196ef442314145d2f
2017-07-12 16:28:19 +08:00
JW Wang
4ca981216d Bug 1380234. P1 - pass KnowsCompositor to MFR through MediaDecoderReaderInit. r=jya
MozReview-Commit-ID: 3krK3meG5jV

--HG--
extra : rebase_source : f0a628ab28a527fa7f79ec61672e988cf1def8e7
extra : source : c8c2a6f2506338a8208f3bcf56160c47e6a29000
2017-07-12 15:37:02 +08:00
James Cheng
2bbf8b0437 Bug 1380237 - Tweak HLSDemuxer to handle audio format change. r=jya
1. Moving UpdateA/VInfo to HLSTrackDemuxer and related changes.
2. Handle audio format change by changing the stream id.
MozReview-Commit-ID: IJmSvygZLVf

--HG--
extra : rebase_source : fb90c1454f20ff930626b6febf74b7cb0c4d20b9
2017-07-12 15:12:06 +08:00
Kaku Kuo
1226fb4d2c Bug 1380244 - trigger skip-to-next-key-frame quicker; r=jya
This patch is going to loose the criteria of skip-to-next-key-frame.

The original rules are here:
http://searchfox.org/mozilla-central/rev/31311070d9860b24fe4a7a36976c14b328c16208/dom/media/MediaFormatReader.cpp#1559

Skip-to-next-key-frame is triggered if the playback position is LARGER than the next key frame time.
But, from the video-track point of view, when the skip-to-next-key-frame is triggered, it skips to the next-next key frame.

Here is an example, say, we are playing a media file with its playback position at time _a_,
and its video decoding is falling behind at time _v_.
The next key frame is at time _k1_ and next-next key frame is at time _k2_.

              a
----|---------|---------|-------------|----------------> time
    v                   k1            k2

When the playback position _a_ passes _k1_ (_a_ > _k1_), the skip-to-next-key-frame is triggered,
and the demuxer jumps to _k2_ directly.



The idea here is to give a chance when (_a_ == _k1_), let demuxer jump to _k1_ and see if the video decoding could catch up.

MozReview-Commit-ID: 6aRSYDOI1ds

--HG--
extra : rebase_source : c448df7af9f83b9127bad9bae28f353b40669b7f
2017-07-12 16:16:49 +08:00
Nils Ohlmeier [:drno]
0130c59aaf Bug 1264479: added implementation for [current|pending][Local|Remote]Description. r=bwc
MozReview-Commit-ID: AAnuN3YRhFH

--HG--
extra : rebase_source : 8b68125b5073783720fd5007973e4fad638698a9
2017-06-30 01:19:19 -07:00
Mark Banner
35f3666937 Bug 1380009 - Enable the ESLint no-return-await call to avoid unnecessary intermediate promise creation. r=mossop
MozReview-Commit-ID: EnhSBHMjurr

--HG--
extra : rebase_source : 74ba4c10e369067629af95bf705a9acd0df1089b
2017-07-11 22:49:55 +01:00
Carsten "Tomcat" Book
0edfa97e38 merge mozilla-inbound to mozilla-central a=merge 2017-07-12 11:07:09 +02:00
Bryce Van Dyk
1b35f7626e Bug 1378826 - Remove direct track listeners for video tracks if MediaRecorder is notified of their removal. r=jesup
--HG--
extra : rebase_source : cdd2f7070fab1ad1491d272819e0be524d9583fd
2017-07-11 09:14:28 +12:00
JW Wang
1e7126b1fc Bug 1378631. P2 - remove AbstractMediaDecoder::CanonicalDurationOrNull(). r=jya
MozReview-Commit-ID: 9zWPcYZndsQ

--HG--
extra : rebase_source : 3c1c03528c21e08fea05b4de6fbfe73cd7d603d5
extra : intermediate-source : 9e5ab9f0ec1bd4536fe157dd530b374a791c600b
extra : source : 4e39231fbed1ea6ea6110b528308b73223878192
2017-07-06 11:38:27 +08:00
JW Wang
031b3932fc Bug 1378631. P1 - move the duration mirror from MediaDecoderReader to MediaDecoderReaderWrapper. r=jya
So we can remove AbstractMediaDecoder::CanonicalDurationOrNull() later.

MozReview-Commit-ID: 6zJCFDsCZPC

--HG--
extra : rebase_source : 66af1674651667a2ab9e82b85e5c730f8eb5c227
extra : intermediate-source : 6c5eccd5fc68bf663e1ffa9d5b57c5a2a2721b14
extra : source : 4b30670e2d75260b21fa953f9c7219e3e485c396
2017-07-06 11:45:02 +08:00
Wes Kocher
1ef5d8834c Merge m-c to autoland, a=merge 2017-07-10 18:51:05 -07:00
Boris Zbarsky
5c76874a46 Bug 1371259 part 3. Change UnwrapObject<> and the UNWRAP_OBJECT macro to allow passing in mutable object or value handles for the thing being unwrapped, and do so at various callsites. r=peterv
I did audit all UNWRAP_OBJECT callers to make sure that the lifetimes of all the
temporary Rooted or the RefPtrs they unwrap into are long enough.
2017-07-10 16:05:24 -04:00
Gerald Squelart
794729a973 Bug 1379091 - Don't prevent MemoryBlockCache overuse - r=cpearce
MozReview-Commit-ID: GvjeSFcnUui

--HG--
extra : rebase_source : 5763040e0e3367ec94fb69d8e0772b3f10ea627b
2017-07-10 10:35:25 +12:00
Gerald Squelart
fd79ed9c4e Bug 1379091 - Let block cache tell MediaCache its block use limit - r=cpearce
MozReview-Commit-ID: 5ZCD3NoeYEP

--HG--
extra : rebase_source : 0fe76cfa6b15053dc5cf2b392c5d649e6888e6c6
2017-07-10 10:23:02 +12:00
Yoshi Huang
c9afcc965e Bug 1377480 - fix mda mochitest failure. r=smaug 2017-07-10 11:45:51 +08:00
JW Wang
aeaad5857f Bug 1378689 - add a structure to pack the data sent to the MediaDecoderReader constructor. r=jya
It would be handy we want to pass more data to the constructor.

MozReview-Commit-ID: 3AUUsTbv534

--HG--
extra : rebase_source : 8d230c85addf1ba296e6a0512f0d18ebd41c0d17
extra : source : e6568e9fa24f52c59baecaa16aa044b492f407fb
2017-07-06 16:59:22 +08:00
Gerald Squelart
eebc1367f0 Bug 1378518 - Use offset-to-block utilities to check MediaCache offset ranges - r=jwwang
MozReview-Commit-ID: 8IsctoABVrb

--HG--
extra : rebase_source : 85d6b405c78207bee730f9482b784e22a063f473
2017-07-06 15:42:56 +12:00
Gerald Squelart
dc59f14eff Bug 1378518 - Better MediaCache GetMaxBlocks() computation - r=jwwang
Retrieve pref from MediaPrefs, which is more efficient than
Preferences::GetInt().

Also refactored computations to avoid unnecessary type conversions.

MozReview-Commit-ID: Ii27lthRRNI

--HG--
extra : rebase_source : d1ea46060cd2c35b7fd07a191184c0318187c080
2017-07-06 16:12:58 +12:00
Jean-Yves Avenard
9634c80d63 Bug 1378507: Add extra check to ensure data is valid. r=gerald
MP4TrackDemuxer::GetNextSamples set mExtraData and it should be valid. This sample will later be rejected by the H264Converter.
The case would also fail if the video codec was VP9.

MozReview-Commit-ID: 5nXoRFJ6ntx

--HG--
extra : rebase_source : 76bfac15373fdccb3f2286bd3cd0999236509e1e
2017-07-06 09:28:48 +02:00
JW Wang
7c0fa4a961 Bug 1378316. P3 - remove AbstractMediaDecoder::DataArrivedEvent() and related code. r=gerald
MozReview-Commit-ID: 5V3RANftFe5

--HG--
extra : rebase_source : f5ed6366fd5b75625b015bc50b561f2d8259711d
extra : source : f75e723935f5bc45f8ffd9a88b842168a138da33
2017-07-05 17:37:46 +08:00
JW Wang
d669b012bc Bug 1378316. P2 - dispatch MediaDecoderReader::NotifyDataArrived explicitly instead of using MediaEventSource. r=gerald
MozReview-Commit-ID: AM3CjQ8LoTv

--HG--
extra : rebase_source : d6c4fa7b8dbe9984468f44b9cdbdf4cbdfe7d001
extra : source : a95db93514cb2a4e5b8031661d367f167d8fc21b
2017-07-05 17:29:05 +08:00
JW Wang
15da20ff70 Bug 1378316. P1 - store MediaDecoderReader in MediaDecoder. r=gerald
So we are able to dispatch NotifyDataArrived() to MediaDecoderReader in P2.

MozReview-Commit-ID: 3RM66uTvYSc

--HG--
extra : rebase_source : 40311cf27fefbd2046016fb246a3a4ccfce845a8
extra : source : 515d9b3b3cd4b0b30d2fd8196b48c55e14466263
2017-07-05 17:21:17 +08:00
Sylvestre Ledru
4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Nico Grunbaum
91a00d57b9 Bug 1374465 - add framesDecoded to vid inbound stream stats;r=jib,smaug
MozReview-Commit-ID: GqbcQxOb69r

--HG--
extra : rebase_source : 9e25ffed93b6685c9c1848bc0d2642a4b8cda579
2017-07-03 14:17:40 -07:00
James Cheng
759a5057e8 Bug 1377193 - Add the m3u8 and media contents into gecko and add one general test case run only on Fennec for testing HLS. r=jwwang
MozReview-Commit-ID: 8cwQlcah2H8

--HG--
extra : rebase_source : 29398ab3557ad6f2ed6c4aafc7be6dbd8eca8cc8
2017-07-01 04:41:57 +08:00
Carsten "Tomcat" Book
2178a22de4 Merge mozilla-central to autoland 2017-07-06 11:24:24 +02:00
Carsten "Tomcat" Book
7857fa0a5e merge mozilla-inbound to mozilla-central a=merge 2017-07-06 11:18:05 +02:00
Chun-Min Chang
c5c6d606ca Bug 1378299 - Fix the missing headers; r=cpearce
MozReview-Commit-ID: 1IN2HKWLLM7

--HG--
extra : rebase_source : 4e60644bb283e931f6fcb1f9c89ba6efe202575d
2017-07-05 15:59:03 +08:00
Kaku Kuo
e7f547e34c Bug 1378084 P1 - resume to somewhere forward; r=jwwang
MozReview-Commit-ID: 6PgkNVTljlU

--HG--
extra : rebase_source : 4a898c2127fe3d1be6ce70c8a975b3b0353439d7
extra : intermediate-source : bf7f887361bf7d3f931c0d19f35c551d570d81ad
extra : source : fa7a3fd17f9374f0c66d54921b9024062ddc1bdd
2017-07-03 15:14:53 +08:00
JW Wang
31837937da Bug 1378304. P4 - remove AbstractMediaDecoder::GetResource(). r=jya
MozReview-Commit-ID: KjHJyfxYwA6

--HG--
extra : rebase_source : aeca63220bff8d4f293a60304855d6fb1245a2d3
extra : source : 31882e43072808d6523fe093cbcbff6f907452fe
2017-07-05 14:36:11 +08:00
JW Wang
f913f097ee Bug 1378304. P3 - store MediaResource in MediaDecoderReader and replace the use of GetResource() with mResource. r=jya
Note MediaDecoderReader::GetBuffered() accesses mResource which is null
when it is actually a MediaFormatReader. However, it is OK for MediaFormatReader
will override UpdateBuffered() and will never call GetBuffered().

MozReview-Commit-ID: 5qcH4PHDzin

--HG--
extra : rebase_source : acb3ef2d981509a397045110cbb7cbecba8d5bee
extra : source : 5f66ecf33bfaecceaab8d9020175e26c5ca5cd1b
2017-07-05 14:53:31 +08:00
JW Wang
ab6f636e4a Bug 1378304. P2 - replace GetResource() with mResource in MediaDecoder sub-classes. r=jya
MozReview-Commit-ID: GRIBp3y0Cb7

--HG--
extra : rebase_source : c80386b223d90e8a9a7fb285a09edc526227bde8
extra : source : b74c63131f6ed873726519eed1a308aaaf35a6a9
2017-07-05 14:52:42 +08:00
JW Wang
d0a1126090 Bug 1378304. P1 - pass a MediaResource* to DecoderTraits::CreateReader() to reduce the use of AbstractMediaDecoder::GetResource(). r=jya
MozReview-Commit-ID: CKFiqaBznVe

--HG--
extra : rebase_source : 2c78850a82ee610e794488bc90e895b8986737da
extra : source : a0a827722cc16c7a5070e37497cba6e4d414aba2
2017-07-05 14:07:54 +08:00
Kaku Kuo
ac1c695e0d Bug 1378085 P8 - always dispatch VideoOnlySeekCompleted at VideoOnlySeekingState::Exit(); r=jwwang
MozReview-Commit-ID: A8PzfUpJjao

--HG--
extra : rebase_source : 69a81449c3d345ebb022924ef1a5741b2f41889c
extra : intermediate-source : cd7ee0a15b0077c1b2e5665f21537716c5baec2b
extra : source : f9e00a020cafe96579bf8d9d3d1bd73fd75c91bc
2017-07-04 17:49:43 +08:00
Kaku Kuo
af0fec1b1b Bug 1378085 p7 - override DoSeek(); r=jwwang
MozReview-Commit-ID: 3qSR1wXwVo1

--HG--
extra : rebase_source : 87398b8516a76e4f8edbe1f6f43609c38115cd10
2017-07-06 11:51:09 +08:00
Kaku Kuo
dfa24e7c1a Bug 1378085 p6 - override HandleAudioWaited(); r=jwwang
MozReview-Commit-ID: GKXQVAYm0lz

--HG--
extra : rebase_source : 33691eea1d491c595259f021011b5dc590fd9a40
2017-07-06 11:48:42 +08:00
Kaku Kuo
68e0ba647b Bug 1378085 p5 - override HandleWaitingForAudio(), HandleAudioCanceled(), and HandleEndOfAudio(); r=jwwang
MozReview-Commit-ID: Jyw3yyutGjn

--HG--
extra : rebase_source : cb1d6b7dae6c913de906574c15f5387a42cea9c5
2017-07-06 11:47:21 +08:00
Kaku Kuo
d3cf895857 Bug 1378085 p4 - override HandleAudioDecoded(); r=jwwang
MozReview-Commit-ID: BmxePYCesTF

--HG--
extra : rebase_source : c0be25b11a415e5b463841b72594bbd2de0be59b
2017-07-06 11:45:07 +08:00
Kaku Kuo
7d4b77078a Bug 1378085 P3 - override Exit(); r=jwwang
MozReview-Commit-ID: 2NW9d4hu3bT

--HG--
extra : rebase_source : 572c63e07281819de2324173595b7241528ef15b
2017-07-06 11:42:27 +08:00
Kaku Kuo
937ed7bf29 Bug 1378085 P2 - override Enter(); r=jwwang
MozReview-Commit-ID: AuwpbiaQzML

--HG--
extra : rebase_source : 903e3a525dca31748296a16bd8c7f885c8d47310
2017-07-06 11:37:51 +08:00
Kaku Kuo
abb1987ff8 Bug 1378085 P1 - create VideoOnlySeekingState; r=jwwang
MozReview-Commit-ID: 2O6CsqSDKnG

--HG--
extra : rebase_source : 3a29b6266e6254de742fcd53d9e1b554130b1b5c
extra : intermediate-source : 76b95ff0005bdf95e541c8e77081d449fc129a22
extra : source : 64b0f522e8994dd03c58b14d7d27cc5f3155b571
2017-07-03 15:32:39 +08:00
Kaku Kuo
d7d5147c64 Bug 1378085 P0 - update playback position only if event visibility is observable; r=jwwang
MozReview-Commit-ID: 4G436mptS1w

--HG--
extra : rebase_source : 681c8764e582fa37fe573c26eb3cf90b239e15cb
2017-07-06 10:59:16 +08:00
Kartikaya Gupta
cad9534e69 Bug 1377090 - Turn gfxMatrix into a typedef for MatrixDouble. r=jrmuizel
Most of this patch is updating a few places that use gfxMatrix to use
the equivalent-but-differently-named functions on MatrixDouble:
- Translate/Rotate/Scale get turned into PreTranslate/PreRotate/PreScale
- Transform(Point) gets turned into TransformPoint(Point)
- gfxMatrix::TransformBounds(gfxRect) gets turned into
  gfxRect::TransformBoundsBy(gfxMatrix).
- gfxMatrix::Transform(gfxRect) gets turned into
  gfxRect::TransformBy(gfxMatrix).
The last two functions are added in this patch as convenience wrappers
to gfxRect instead of Matrix.h because we don't want Matrix.h to "know"
about gfxRect (to avoid adding gecko dependencies on Moz2D). Once we
turn gfxRect into a typedef for RectDouble these will be eliminated
anyway.

MozReview-Commit-ID: BnOjHzmOSKn

--HG--
extra : rebase_source : cf1692d1f0d44a4b05d684a66678739181a426d5
2017-07-05 11:18:49 -04:00
Carsten "Tomcat" Book
b72c4833d5 merge mozilla-inbound to mozilla-central a=merge 2017-07-05 13:01:22 +02:00
Mats Palmgren
977a9e5f89 Bug 1376498 part 4 - Make all nsClassHashtable::RemoveAndForget() consumers use Remove() instead. r=froydnj
MozReview-Commit-ID: G64YQLlgm6r
2017-07-05 02:01:45 +02:00
Michael Layzell
2eb92d98f1 Backout Bug 1365309 for test failures on a CLOSED TREE
MozReview-Commit-ID: 143ac9l7Goq
2017-07-04 17:31:13 -04:00
Michael Layzell
a318e760bd Bug 1365309 - Part 4: Disable the BackgroundHangMonitor in GMP processes, r=froydnj
This involved a change to BackgroundHangMonitor, as it initialized sDisabled
incorrectly to false, instead of true, We need sDisabled initialized to true, as
we cannot assume that it is enabled until BackgroundHangMonitor::Startup() is
called.

MozReview-Commit-ID: 94slLTkNk3C
2017-07-04 13:19:26 -04:00
Carsten "Tomcat" Book
8e3fa527c9 merge mozilla-inbound to mozilla-central a=merge 2017-07-04 10:48:33 +02:00
Chris Pearce
7705e10c17 Bug 1373618 - Prevent ChannelMediaResource from making a "Range: bytes=$length-" request at end of stream. r=jwwang
Not all web servers consistently handle an HTTP 1.1 Byte Range Request for
"Range: bytes=$length-". Apache responds with 416, but others do not. So to
make us impervious to servers that respond with something other than 416, just
have us not make such a request when we know that the server thinks our
requested range is unsatisfiable.

We make such a request when we reach end of stream for a stream that has been
suspended/resumed. We are now more likely to suspend and resume streams with the
recent changes to our throttling logic.



MozReview-Commit-ID: 6URqzjLglOM

--HG--
extra : rebase_source : bcac7fde91b625e214d7d041c135a211833a1e85
extra : source : 75a37fe77f397576b5bb60d38293f215c815e61a
2017-07-04 12:05:23 +12:00
Gerald Squelart
1c7ccdf867 Bug 1377575 - MEDIACACHE_MEMORY_WATERMARK records the MemoryBlockCache memory use watermark - r=cpearce,francois
MozReview-Commit-ID: 1KLofciLxo1

--HG--
extra : rebase_source : 90bba01741635f6c1bb900ac01c0eca339de1a07
2017-06-30 15:09:38 -07:00
Gerald Squelart
be79b8f64f Bug 1377575 - Rename MemoryBlockCache's mCombinedSizes to gCombinedSizes - r=cpearce
As it is a static (hence Global) member.

MozReview-Commit-ID: 8NUQRoixr4N

--HG--
extra : rebase_source : 4373db35d448e483f6c1b169f6db68ef456b52b8
2017-06-30 10:43:41 -07:00
Gerald Squelart
878dd6dcf9 Bug 1377575 - No need to explicitly print 'this' from MemoryBlockCache logging - r=cpearce
Because it is already printed by LOG() itself.

MozReview-Commit-ID: 6dBESWQtNkQ

--HG--
extra : rebase_source : 37d1b5360825543a9e28443167219a50adfdebef
2017-06-30 15:17:39 -07:00
Bill McCloskey
224d56eb18 Bug 1377222 - Eliminate nsITimer::InitWithFuncCallback in favor of InitWithNamedFuncCallback (r=froydnj)
MozReview-Commit-ID: 9zN9aAd7daA
2017-07-03 16:19:56 -07:00
Carsten "Tomcat" Book
4529b3adc4 merge mozilla-inbound to mozilla-central a=merge 2017-07-03 10:14:42 +02:00
Nicholas Nethercote
3e439bb4f8 Bug 1376638 - Minimize uses of prmem.h. r=glandium.
It's silly to use prmem.h within Firefox code given that in our configuration
its functions are just wrappers for malloc() et al. (Indeed, in some places we
mix PR_Malloc() with free(), or malloc() with PR_Free().)

This patch removes all uses, except for the places where we need to use
PR_Free() to free something allocated by another NSPR function; in those cases
I've added a comment explaining which function did the allocation.

--HG--
extra : rebase_source : 0f781bca68b5bf3c4c191e09e277dfc8becffa09
2017-06-30 19:05:41 -07:00
JW Wang
c1d11b49ba Bug 1377370. P3 - remove HLS related code from MediaResource.cpp. r=kikuo
MozReview-Commit-ID: FnZEMNDjjmE

--HG--
extra : rebase_source : 5035a91206da73ab2d8c76d99789ec6ca89ce679
extra : source : c4be1a0fd151c5da20a959da05bdf2246c46a487
2017-06-30 10:22:36 +08:00
JW Wang
b02249e698 Bug 1377370. P2 - simplify HLSDecoder::Clone() for HLSResource doesn't support clone at all. r=kikuo
MozReview-Commit-ID: FxebHdK4EmM

--HG--
extra : rebase_source : d1074b8e5edf646244922a734839c19f8a4fb1b4
extra : source : 418066ce151ef0e5dc4b817f8663c281fc5fcc0d
2017-06-30 10:20:32 +08:00
JW Wang
7d2785b4a8 Bug 1377370. P1 - let HLSDecoder override Load() so it can create an HLSResource directly without going through MediaResource::Create(). r=kikuo
MozReview-Commit-ID: BL8bt2JtKfa

--HG--
extra : rebase_source : 70231ab332fee2316e86aa73e834f108183b23d8
extra : source : e97125ebc28890e0d538c4ef4d8abc9232e69bac
2017-06-30 10:11:42 +08:00
JW Wang
147505b83d Bug 1375922 - don't send frames to the compositor if the 1st one is a future frame. r=cpearce
A/V sync will be broken for the compositor will render the 1st frame
immediately without considering its timestamp.

MozReview-Commit-ID: 6j7GLccrFcX

--HG--
extra : rebase_source : 924a2404d8d944262d1f8744794a072c051ac556
extra : source : 1e254ff8491084b66dfebbb2e1be03790c95ed11
2017-07-03 11:51:39 +08:00
Chris Pearce
2aa281e7d2 Bug 1370177 - Treat compressed HTTP channels as having infinite length and as unseekable in media code. r=jwwang.
The problem here is that the server is setting the Content-Length to the size
of the gzipped file, which is confusing our media code as that's not the length
of the decompressed stream. Necko's decompressor is streaming, so we can't know
the length of the stream in advance unless we wait for the entire file to
download first. We also can't seek in compressed HTTP resources anyway.

So just have our code assume that compressed HTTP channels are of infinite
length and have un unseekable transport. Then we can seek in the buffered
regions at least.

MozReview-Commit-ID: 9SiLuMZGSeJ

--HG--
extra : rebase_source : ca561776a684a4a0a39a830ecda499732666daaa
2017-07-04 15:31:48 +12:00
Chris Pearce
5c3bbc5b04 Bug 1370177 - Add test case for gzipped MP4 with Content-Length set to compressed file length. r=jwwang.
Adds a testcase corresponding to what's happening here; we have a gzipped
file with a Content-Length which is the length of the compressed stream.

MozReview-Commit-ID: 8SDayegP11W

--HG--
extra : rebase_source : 1ae21d0f202e24f6e0236d3f2d2363ab930b0c2e
2017-07-04 23:37:14 +12:00
Alastor Wu
bea16a4f12 Bug 1373177 - part3 : enable test. r=jolin
MozReview-Commit-ID: 5jbD0hkyLDf

--HG--
extra : rebase_source : 6dbcb4a84f0b7eb79dfd50a85798dc965cf59362
2017-06-30 11:12:54 -07:00
Michael Froman
aceffe65df Bug 1373858 - make sure all fields are checked in the cancelled pairs. r=drno
MozReview-Commit-ID: 5F3hmCQBIUg

--HG--
extra : rebase_source : 1ed3c2f47ed05438d9ca1768de567c03a07d5ef4
2017-06-29 13:27:41 -05:00
Nicholas Nethercote
c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Chris Pearce
2d16a23835 Bug 1351124 - Detect MP4 PSSH boxes in MOOF boxes and dispatch those in 'encrypted' events to content. r=jya
We detect when a PSSH is contained in a MOOF and stash them in the
mp4_demmuxer::Moof object.  When the mp4_demuxer::SampleIterator returns a
sample, we check whether it's the first sample from its MOOF, and if so, we
attach any PSSH boxes from that MOOF to the sample.  The TrackBuffersManager
checks samples upon demux, to see whether they have any EME init data attached,
and if so dispatches thoses to the HTMLMediaElement in 'encrypted' events.


MozReview-Commit-ID: F8GobKOr96F

--HG--
extra : rebase_source : 5366f1008979605aa8fc80216cd1d9cc2eefd346
2017-07-12 22:07:15 +12:00
Chris Pearce
965450cd7c Bug 1351124 - Test for PSSH boxes in MOOF boxes. r=jya
Includes "bear" samples from the Chromium project which include several
runs of PSSH boxes in their MOOF boxes.


MozReview-Commit-ID: 4KIJ2FCOyWT

--HG--
rename : dom/media/test/short-cenc.mp4 => dom/media/test/short-cenc-pssh-in-moof.mp4
extra : rebase_source : 29cd7ea0e3b76935d76e376ee0f88f4c93aca85d
2017-07-13 20:04:13 +12:00
Chris Pearce
87ce56017f Bug 1351124 - Factor out ClearKey license generation in EME mochitests. r=jya
Makes it easier to re-use in the test in the next patch.

MozReview-Commit-ID: 56Gbe8KFSgX

--HG--
extra : rebase_source : 3e2aa140dbf4faad015c1c760fc5b18de396d848
2017-07-07 10:49:42 +12:00
Michael Froman
9e656ee0bd Bug 1379400 - remove upper limit on "sane" value for bytes received or sent. r=drno
We're not really gaining much information by checking for an upper limit on
the bytesReceived or bytesSent stat here.  This should help with
intermittent failures.

MozReview-Commit-ID: 5tPRKlaOYX6

--HG--
extra : rebase_source : fd6c570a5c0ca403e554ade533314bb85dcffa4e
2017-07-10 10:08:37 -05:00
Jean-Yves Avenard
afd44b0d23 Bug 1381908 - Remove left over files from bug 1379190. r=dmajor
Left of following an incomplete rebase.

MozReview-Commit-ID: 1p71CoYfPUl

--HG--
extra : rebase_source : b8f464d501b8c2d8f0b6a62aeb1cb096ef708c74
2017-07-18 19:37:51 +02:00
Wes Kocher
bfc45b98b9 Merge m-c to inbound, a=merge
MozReview-Commit-ID: 9XdoB5MuVz6
2017-07-05 17:17:41 -07:00
Nathan Froyd
6c8193aed4 Bug 1377962 - add more override declarations for Android-only methods; r=snorp
Trying to get the build running with clang again revealed a few more
missing override declarations.
2017-07-05 16:56:28 -04:00
Jean-Yves Avenard
ede50177a8 Bug 1355048: P1. Have WebrtcMediaDataDecoder placeholder. r=jesup
The code currently does nothing.

MozReview-Commit-ID: 6C0sLKIoJEV

--HG--
extra : rebase_source : d297494cdb3589e45bcf28b3ee9d5fac9601b200
2017-04-10 20:40:31 +02:00
Ryan VanderMeulen
dec7bdc30e Merge m-c to inbound. a=merge 2017-07-14 09:52:26 -04:00
Dan Minor
a99713bbf7 Bug 1373727 - Annotate Web Audio pointer to RefPtr use; r=karlt
MozReview-Commit-ID: FZwvw1YW1EM

--HG--
extra : rebase_source : d6ca04fa96f65981ca5294cda498a1f35d2798e9
2017-06-15 11:51:28 -04:00
Alastor Wu
fbe625863b Bug 1367983 - revert the change of bug1367980. r=jwwang
In bug1371202, it has already implemented what I want to do, so remove the
change in bug1367980.

MozReview-Commit-ID: LoH51bBDTqr

--HG--
extra : rebase_source : 9fd77acae81f94e45f0f840775c81509e85c4ad0
2017-07-24 10:07:30 +08:00
JW Wang
30093548fb Bug 1378295. P6 - remove AbstractMediaDecoder and fix includes. r=jya
MozReview-Commit-ID: xN1Ywo9VDY

--HG--
extra : rebase_source : 9aee1697b5299e43eb35450a20015c08a11bdea6
extra : intermediate-source : 3095884f04356d0d2c3c34843098a0a8b23211b8
extra : source : ef0f7e5300060b7888b961596a32a8fbf483ebd2
2017-07-13 17:39:42 +08:00
JW Wang
46e04d4ca0 Bug 1378295. P5 - remove AbstractMediaDecoder from MediaDecoder's base class. r=jya
MozReview-Commit-ID: lIAT21YMRR

--HG--
extra : rebase_source : 72fe91b3c17e448a8b8b748bc1a44f760ff48274
extra : intermediate-source : b1246c769384a69f23d4d88a63ccef636b79f6e1
extra : source : 9f4592b9d821ea775cea39e780c4dd4197aae8ad
2017-07-13 17:38:06 +08:00
JW Wang
0abee9d910 Bug 1378295. P4 - remove reference to AbstractMediaDecoder from TrackBuffersManager.cpp. r=jya
MozReview-Commit-ID: 6TXVu72w7Ht

--HG--
extra : rebase_source : 7cc57a09949500f30ac6b57890578ce203ba6a59
extra : intermediate-source : 839251dd062bad76ea5aad49848183da5522d046
extra : source : d17fae18b49c46b40c0c06c2e26bef90cf0e5d13
2017-07-13 16:50:40 +08:00
JW Wang
dacbe216d5 Bug 1378295. P3 - remove BufferDecoder. r=jya
Since now MFR doesn't need an AbstractMediaDecoder at all, we can
now remove BufferDecoder which exists as an empty shell to implement AbstractMediaDecoder.

MozReview-Commit-ID: HpEcK0mfpeh

--HG--
extra : rebase_source : e4d58d3b706aaf6ee005b9f82a668dd38efc2200
extra : intermediate-source : caa1e64b1a0216773d31854341075858a8dc2d0f
extra : source : c644912a8eeed0a18d61e11a3bcc92a39a6de483
2017-07-13 15:33:02 +08:00
JW Wang
709010e3e9 Bug 1378295. P2 - move AutoNotifyDecoded from AbstractMediaDecoder to FrameStatistics. r=jya
MozReview-Commit-ID: EdS2U2sfPdk

--HG--
extra : rebase_source : 786439f7fc7b9ed0904faf383a8e1ff0ccf35311
extra : intermediate-source : 3587a73488e07e13ccd0bc540cd814b5ee3210d9
extra : source : dcd94df0c7577e8c28d913d7061384650955d69f
2017-07-13 15:17:25 +08:00
JW Wang
35f6829a03 Bug 1378295. P1 - remove unused MFR::mDecoder. r=jya
MozReview-Commit-ID: BuvxlYs0LqD

--HG--
extra : rebase_source : 8595e8c5e08e9cd6575b3e3bf37e59e25c79045c
extra : intermediate-source : 589082a3f0571cea45e6942a1e6b82adda7efdcb
extra : source : 47cdc0a2b7acec44d102b165e1867b4f689e488c
2017-07-13 15:13:12 +08:00
JW Wang
e8dccab6e2 Bug 1380568. P2 - remove AbstractMediaDecoder::NotifyDecodedFrames(). r=jya
MozReview-Commit-ID: AZyPseUiZLl

--HG--
extra : rebase_source : d95e84525ebde5311361daa588abe83ab7342882
extra : intermediate-source : 35bf63aab05dedec7248de5ff97572b078c430db
extra : source : 8e00ba5990178daefa228a011ad3eed629dcbcd6
2017-07-13 14:12:25 +08:00
JW Wang
0ad4cd546b Bug 1380568. P1 - store FrameStatistics in MFR. r=jya
So we can remove the use of AbstractMediaDecoder::NotifyDecodedFrames().

MozReview-Commit-ID: Ch7Saha6zdi

--HG--
extra : rebase_source : 8562faa56d1f31797643ed0f7ae550765d8c86d7
extra : intermediate-source : 05b50517cc40f2adf06facfccea628488dd319da
extra : source : d5af89f5a09e03c8fbb0d6111f88e3221f3a1d57
2017-07-07 11:05:03 +08:00
Bryce Van Dyk
707c1f194e Bug 1371166 - Drive by update to update var -> let in test. r=jib
MozReview-Commit-ID: TAP46fR2HP

--HG--
extra : rebase_source : 246f4470db492d56260135e5872e4ee165bdbd08
2017-07-21 16:00:23 +12:00
Bryce Van Dyk
f1dcd007cd Bug 1371166 - Update media recorder principal test to behave more like MediaElement principal test. r=jib
Update the MediaRecorder principal test to behave more like
test_mixed_principals.html. This involves preloading metadata and using a
longer video to test with. This particular combination currently results in
multiple requests being made for the resource, however this is not a robust
solution in that the behaviour of the MediaCache and associated objects may
change and break this. This fixes the issue for now as best I can tell, but
a follow up gtest or may be a more sensible long term solution.

MozReview-Commit-ID: F9gnnzGt3Cu

--HG--
extra : rebase_source : 73f56e256c21f5a775e0fa2a32606d7f7553bd4e
2017-07-21 15:59:27 +12:00
Chris Pearce
0f1f90f2c1 Bug 1383580 - Pad estimated CDM frame sizes. r=gerald
The new video decoder in CDM version 1.4.8.970 seems to calculate its frame size
as about 1.5X of the optimal size. So increase our estimate of CDM video frame
buffer sizes by more than that so that our pre-allocated buffers should be big
enough to accomodate the allocations that the CDM requests.

This means we should be more likely to avoid the slow fallback path where we
have to transfer frames from the CDM to the content process using the non-shmem
path.

MozReview-Commit-ID: 6PT8XVCAL3E

--HG--
extra : rebase_source : a27793b033c4f50f6e15d874558dc50e1410c8be
2017-07-24 16:56:24 +12:00
Chris Pearce
ab9e4db6d1 Bug 1383580 - Add an explicit message to increase CDM-Firefox shmem pool. r=gerald
The strategy we were using to expand the pool of shmems we use to shuffle video
frames between the CDM and content processses is to increase the size of the
pool if the content process receives a video frame in a non-shmem. However the
CDM process will send a frame in a non-shmem if none of the shmems in the pool
are big enough to fit the frame the CDM produces. This happens if we
underestimate the size required for video frames. This causes the
ChromiumCDMParent to increase the number of shmems in the pool every time we
rate switch, until we eventually hit the limit of 50, whereupon playback fails.

So we need to disambiguate between these two cases; the first being we have a
pool of shmems, but they're the wrong size, the second being our shmems are the
right size, but we've run out and we need to expand the shmem pool. The only
place where we know this is in the CDM process. So this commit adds a new
message to PChromiumCDM through which the ChromiumCDMChild can report to the
parent that it needs more shmems in the pool.

The new Widevine CDM has a new video decoder which allocates video frames less
optimally than the previous, which causes us to hit this more often in Nightly.
Our telemetry also indicates we hit this rarely in Beta with the old CDM.

MozReview-Commit-ID: LoSvVhxHQxn

--HG--
extra : rebase_source : 6c7201a74dbf202d0ef8c2269292a80a7ad95dff
extra : source : 57cf5455fd14ef0b68b61f914146ff942b5ca4a0
2017-07-24 12:57:40 +12:00
Carsten "Tomcat" Book
daa67cc9e3 merge mozilla-inbound to mozilla-central a=merge 2017-06-30 12:59:45 +02:00
Paul Adenot
eb97e8d9df Bug 1341555 - Make static analysis happier.
MozReview-Commit-ID: 18kvK2pMDd4

--HG--
extra : rebase_source : 357118b4e139e2242501930fe21033d0a7454812
2017-06-29 13:11:23 -07:00
Paul Adenot
404c800005 Bug 1341555 - Consolidate use of the MSG's AbstractMainThread, and stop having AbstractMainThread on MediaStreams. r=pehrsons
MozReview-Commit-ID: 5hGDQcfpH6a

--HG--
extra : rebase_source : 41bb678f37cfcdbc9912a25f45a5ca488084aabe
2017-06-29 11:30:57 -07:00
Paul Adenot
91cc425f9a Bug 1341555 - Label MSG runnables. r=pehrsons
MozReview-Commit-ID: 4sfRH3FxtBT

--HG--
extra : rebase_source : 1c473d1f6c7f79462c39126dc7bb9116948cca54
2017-06-29 11:31:17 -07:00
Paul Adenot
6e485889b8 Bug 1330360 - Create new MSGs for each nsPIDOMWindow. r=jesup
MozReview-Commit-ID: 5m1MGcLmT7J

--HG--
extra : rebase_source : b9c05464bb545c047b7718a048eb7e5de3fe275d
2017-06-23 16:18:34 -07:00
Paul Adenot
e55c008768 Bug 1372247 - Make the AudioOutputObserver a member of the MediaEngineWebRTCMicrophoneSource so it's not a global singleton anymore. r=jesup
MozReview-Commit-ID: 3yC1PvG3sW7

--HG--
extra : rebase_source : 950c1633d127ee0b6670b112bb31637a8851a583
2017-06-12 17:14:26 +02:00
Carsten "Tomcat" Book
5f00ae3a8b merge mozilla-inbound to mozilla-central a=merge 2017-06-29 15:47:04 +02:00
JW Wang
c6e43291cb Bug 1376363. P3 - remove MediaResource::GetContentType() and its friends. r=gerald
Note we remove the call to mChannel->SetContentType() from RecreateChannel().

The hint never works as expected for [1] is the only caller to
nsIChannel::GetContentType() and MediaResource::Create() always happens
before any reads from the resource.

[1] http://searchfox.org/mozilla-central/rev/b425854d9bbd49d5caf9baef3686e49ec91c17ec/dom/media/MediaResource.cpp#1500

MozReview-Commit-ID: 1n4yHEouCjC

--HG--
extra : rebase_source : 9a7345c29b985ddee7a90a94191e9d526e2a0a67
extra : source : 054d9ffaf21eb937a6349df76228269ad2d7dc2c
2017-06-26 21:39:16 +08:00
JW Wang
69f64ebb45 Bug 1376363. P2 - call ContainerType() in EnsureTelemetryReported(). r=gerald
MozReview-Commit-ID: 515Q6nXZ7WU

--HG--
extra : rebase_source : a13964ca23cd561db8f95ad2ffbeac5ff2411238
extra : source : 59e7c3d78a9df5b2827cb14a211d59113968f432
2017-06-26 17:11:48 +08:00
JW Wang
1e2be3e873 Bug 1376363. P1 - store container type in MediaDecoder. r=gerald
So we can remove MediaResource::GetContentType() in the future.

MozReview-Commit-ID: zWUNF2uGpf

--HG--
extra : rebase_source : 04f50c4db9dac8503f878a8a1986e627f9a074a3
extra : source : 10737393beaabed640aa3ff67fac2a07567400b4
2017-06-26 17:10:47 +08:00
Ralph Giles
efcb8bc380 Bug 1376636 - Exempt AV1 decoding from the vp9 benchmark. r=gerald
Accept av1 video in the webm decoder even when we've determined
the machine is too slow for software vp9 decoding. While we're
at an experimental stage with this codec, poor performance is
preferable to not being able to see a demo at all.

MozReview-Commit-ID: 6DJHCPfXHlA

--HG--
extra : rebase_source : 8fb5c0dac6483abf4775e3546dadd5aaa45947ac
2017-06-27 17:20:00 -07:00
Kilik Kuo
200981e17f Bug 1368904 - Handle unexpected error callback from GeckoHlsPlayer. r=JamesCheng
MozReview-Commit-ID: CQDjFXiFDrQ

--HG--
extra : rebase_source : 48624955e10c3df3b860bcf77ada11da43f9d068
2017-06-28 15:09:00 -07:00
Sebastian Hengst
9a1a3b8ebd Backed out changeset 0e4bdf5c1628 (bug 1376636) for Android bustage. r=backout 2017-06-29 03:28:18 +02:00
Ralph Giles
892c70acff Bug 1376636 - Exempt AV1 decoding from the vp9 benchmark. r=gerald
Accept av1 video in the webm decoder even when we've determined
the machine is too slow for software vp9 decoding. While we're
at an experimental stage with this codec, poor performance is
preferable to not being able to see a demo at all.

MozReview-Commit-ID: 6DJHCPfXHlA

--HG--
extra : rebase_source : 0819c3ddd437e9e56b18ba1fc6c56d4bdaebfa77
2017-06-27 17:20:00 -07:00
Jan Keromnes
5257fdad8c Bug 1372977 - Use nullptr in /media and /dom/media (clang-tidy: modernize-use-nullptr). r=bwc 2017-06-28 15:38:00 -04:00
Chris Pearce
d4a2f03ae3 Bug 1376957 - Call rand_s() before starting GMP sandbox on Windows. r=bobowen
The loading of Widevine CDM 970 is being blocked on Windows 7 by our sandbox
when the CDM calls RtlGenRandom(). Chrome is calling s_rand() before enabling
the sandbox [1] in order to load the appropriate DLLs so that the call
succeeds, so we should do the same.

[1] https://cs.chromium.org/chromium/src/content/ppapi_plugin/ppapi_thread.cc?l=424&rcl=d0d190c09619cb359296999438551b66f0e1cdb1

MozReview-Commit-ID: IvmlQY0ohHc

--HG--
extra : rebase_source : d84780fda8181d2afaf4526ea37526522e90431c
2017-06-28 15:19:30 -07:00
Chris Pearce
c1a1beca7f Bug 1376509 - Bump supported playack rates to [1/16,16]. r=padenot
Chrome supports playback rates in the ranges of [1/16,16], so we may as well
support the same.

MozReview-Commit-ID: 7mMXQfPiv9d

--HG--
extra : rebase_source : 5dd0b717ad711f49ff3df5156cc07d48c8a694b7
2017-06-28 10:00:58 -07:00
Jean-Yves Avenard
d61a420f11 Bug 1376838: Revert "Bug 1360006: Whitelist VP9 decoder to intel GPU only." r=cpearce
This reverts commit 77f2dd5563d2c3e9ad7ada388036f1846c1e2107

MozReview-Commit-ID: 71Hr05Z6hA4

--HG--
extra : rebase_source : 3efa2e95d2a560b43443a07fc1948cf146d054f0
2017-06-28 19:45:24 +02:00
JW Wang
02c08823c6 Bug 1376360. P3 - remove the call path for null aStreamListener in FileMediaResource::Open(). r=gerald
Null aStreamListener is passed only when cloning.
Since we remove cloning in P2, we can now remove the call path.

MozReview-Commit-ID: B0vKVy5jsqo

--HG--
extra : rebase_source : a93fad61325d29faa2d45e7c1d3762616ab72cff
2017-06-23 16:35:09 +08:00
JW Wang
286ed749b6 Bug 1376360. P2 - make FileMediaResource non-cloneable. r=gerald
It doesn't make much sense to clone a FileMediaResource for they have no data to share.

MozReview-Commit-ID: IoR87DAUCFa

--HG--
extra : rebase_source : eab6c0f013be9e3b1877d29f16c1701f27460578
2017-06-23 16:28:36 +08:00
JW Wang
a05b9a90ee Bug 1376360. P1 - give CloneData() a default implementation for most resource types don't support clone. r=gerald
Also remove CanClone() overrides that are identical to that of the base class.

MozReview-Commit-ID: A0Q5ychQtso

--HG--
extra : rebase_source : 3369558a8e6bc9f86ab6dcdc39fe40f686041001
2017-06-23 16:26:30 +08:00
Alex Chronopoulos
41737dc1af Bug 1213414 - Implement channelCount audio constraint. r=jib,padenot
MozReview-Commit-ID: K95iBYOE1nR

--HG--
extra : rebase_source : 5c73eea4902933faec75e37d90e42a2f38c51b81
2017-06-29 21:01:17 -07:00
JW Wang
21dc253e76 Bug 1377025. P2 - dispatch intrinsic size changes to the main thread. r=cpearce
So we can remove the use of mMutex from InvalidateWithFlags().

MozReview-Commit-ID: 75pHDM5xYYb

--HG--
extra : rebase_source : e39e1a3e4c796b8163b0c9b1bfeec048e6fb06f0
2017-06-29 10:27:38 +08:00
JW Wang
2545c614c0 Bug 1377025. P1 - dispatch image size changes to the main thread so mImageSizeChanged is for main thread only. r=cpearce
MozReview-Commit-ID: 6rpxjSVAY2h

--HG--
extra : rebase_source : e441d96e6e18c7891a6236d7909357248dad3bd6
2017-06-28 23:04:49 +08:00
Gerald Squelart
7866e6fdb6 Bug 1377015 - MediaCodecs::ContainsPrefix implementation and tests - r=rillian
Many video codecs use a suffix to specify level, profile and optional features,
like "avc1.42E001" or "vp09.00.41.08".
MediaCodecs::ContainsPrefix() can be used to facilitate codec identification
from their prefix alone, e.g.: "avc1" or "vp09".

MozReview-Commit-ID: D6kcjggXptS

--HG--
extra : rebase_source : 3a60c01da1d91adf29f51ce3c32f8df60282c90a
2017-06-29 11:17:56 -07:00
Andreas Pehrson
0a679e33cf Bug 1376885 - Add prefs for automatically denying camera/microphone gUM prompts. r=jib
MozReview-Commit-ID: ISWek1BcLss

--HG--
extra : rebase_source : cc55cdce0e90ab56de05a165b7e1438830006f30
2017-06-28 12:09:14 -07:00
Mark Banner
9125ef0441 Bug 1376357 - Fix remaining ESLint issues in dom/media/*.js*. r=bwc
MozReview-Commit-ID: 7kjmQt1Ik6e

--HG--
extra : rebase_source : 44df30a423c897c3f4ef52cebffa59961a65ff25
2017-06-26 17:25:22 -07:00
Mark Banner
ed3e830fe1 Bug 1376357 - Automatically fix ESLint issues in dom/media/*.js*. r=bwc
MozReview-Commit-ID: 6JXIHvJoZqS

--HG--
extra : rebase_source : 601c811e8cf623bf5a29c2bdbcdd2f1413a6eaca
2017-06-28 12:41:50 -07:00
Mark Banner
fcf4f2c48b Bug 1376357 - Drop use of non-standard catch-if in dom/media/*.js. r=bwc
MozReview-Commit-ID: 1LkJGQz1y1w

--HG--
extra : rebase_source : 09f16297633c9d1b9841454ac1750bceeb7ca572
2017-06-26 16:55:26 -07:00
Bill McCloskey
f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Dan Minor
052a7764f8 Bug 1319489 - Allow DOMMediaStream constructor to accept a nullptr for aWindow; r=jesup
For testing purposes, it is useful to pass a null aWindow to the DOMMediaStream
constructor. This limits the amount of code that needs to be mocked to create
a mock media stream.

MozReview-Commit-ID: Jgm1m7N0FU4

--HG--
extra : rebase_source : 90ab0157bd0d75cb53190bf4a5d388971a6fdd1b
2017-06-21 12:51:33 -04:00
Carsten "Tomcat" Book
259377b6ab merge mozilla-inbound to mozilla-central a=merge 2017-06-26 13:25:51 +02:00
JW Wang
43c85c2307 Bug 1376227. P5 - merge CreateResource() and Load() for they are highly coupled. r=gerald
MozReview-Commit-ID: EH9NROdQfmd

--HG--
extra : rebase_source : 63c2ba04de1a25fb05db15977d8a19638e31b272
2017-06-23 15:39:57 +08:00
JW Wang
350f03bde7 Bug 1376227. P3 - move Load() down the class hierarchy. r=gerald
So we won't pass an unused |nsIStreamListener**| to MediaSourceDecoder::Load().

MozReview-Commit-ID: 2TCby8m8K5H

--HG--
extra : rebase_source : 349179aa4303c0abd8b86a695789770e158e5c28
extra : intermediate-source : d6f550bd6709a0ee7db6033286af42565a20cdb1
extra : source : ed524d855a1a78665c499152a9360ba961655641
2017-06-23 14:12:41 +08:00
JW Wang
1dbf0f77fa Bug 1376227. P2 - remove unused code following P1. r=gerald
MozReview-Commit-ID: JbwY1Owtk7H

--HG--
extra : rebase_source : 0f82ac16f56ce6ba27944b093b49c8ff6479e66c
extra : intermediate-source : 38c1c8a70fb0209f8c6a3ca596664db9af089763
extra : source : 7cfe394c4790ca7687db9004c96380f088c2bb59
2017-06-21 17:34:22 +08:00
JW Wang
884c26d368 Bug 1376227. P1 - let MediaDecoder sub-classes have the knowledge how to create a MediaResource. r=gerald
MozReview-Commit-ID: 2fHEkU46MUr

--HG--
extra : rebase_source : 18f5b01a065d6acbdc88ce808f8bd1e8e462e8d7
extra : intermediate-source : e003e070535d95f7e6334f4a92d6d763d436023c
extra : source : 450d506c6bb85f53b44fed296a32845bcd777905
2017-06-21 17:30:56 +08:00
Jean-Yves Avenard
f71786c57f Bug 1374774: P4. Correct H264 telemetry reporting. r=gerald
The code couldn't have worked, mNeedSPSForTelemetry can only be set if we didn't get an H264 extradata in the MP4 metadata.
So any calls to HasSPS(sample->mExtraData) would have always returned false.

MozReview-Commit-ID: 3PcRXJHBJyC

--HG--
extra : rebase_source : 5b70a1e40b38b61982264784c489f11ddf9d4682
2017-06-22 14:52:07 +02:00
Jean-Yves Avenard
234164b774 Bug 1374774: P3. Remove HasSPS method. r=gerald
It was only used in one spot, and incorrectly at that.

MozReview-Commit-ID: EWkkrAlYT7W

--HG--
extra : rebase_source : a19afe8f49e1e0fd430ddbff81978eb3511c5fb5
2017-06-22 14:44:21 +02:00
Jean-Yves Avenard
0ac3f1c5b4 Bug 1374774: P1. Move H264 methods into H264 code. r=gerald
HasSPS, ExtractExtraData and CompareExtraData have nothing to do with the handling of annex B format. They are raw H264 related methods.

It will also prevent in the following change to have cycling references between two headers.

MozReview-Commit-ID: FCs5aU4GcTU

--HG--
extra : rebase_source : a96fe0c70416d38690b0c2f1dee567b0b025e947
2017-06-22 14:36:11 +02:00
Sebastian Hengst
261b25bf86 Backed out changeset 0d953ca28add (bug 1374774) for bustage at media/libstagefright/binding/H264.cpp(205). 'ptr' not declared. r=backout on a CLOSED TREE 2017-06-24 00:49:18 +02:00
Sebastian Hengst
ca778305be Backed out changeset 361c9c559b7e (bug 1374774) 2017-06-24 00:48:18 +02:00
Sebastian Hengst
1f514e90aa Backed out changeset e7e570157874 (bug 1374774) 2017-06-24 00:48:14 +02:00
Jean-Yves Avenard
bfeee68f7d Bug 1374774: P4. Correct H264 telemetry reporting. r=gerald
The code couldn't have worked, mNeedSPSForTelemetry can only be set if we didn't get an H264 extradata in the MP4 metadata.
So any calls to HasSPS(sample->mExtraData) would have always returned false.

MozReview-Commit-ID: 3PcRXJHBJyC

--HG--
extra : rebase_source : 4137b9c985ffe7ee3958fad509149bf911229eed
2017-06-22 14:52:07 +02:00
Jean-Yves Avenard
bcd57adc64 Bug 1374774: P3. Remove HasSPS method. r=gerald
It was only used in one spot, and incorrectly at that.

MozReview-Commit-ID: EWkkrAlYT7W

--HG--
extra : rebase_source : 9c719bbf668eafaac0415580ffdfa0cea0942673
2017-06-22 14:44:21 +02:00
Jean-Yves Avenard
abaade7f70 Bug 1374774: P1. Move H264 methods into H264 code. r=gerald
HasSPS, ExtractExtraData and CompareExtraData have nothing to do with the handling of annex B format. They are raw H264 related methods.

It will also prevent in the following change to have cycling references between two headers.

MozReview-Commit-ID: FCs5aU4GcTU

--HG--
extra : rebase_source : b204723cdbb599d4f0a227871ed28f5da39e9cff
2017-06-22 14:36:11 +02:00
Carsten "Tomcat" Book
7af37a52bd Merge mozilla-central to mozilla-inbound 2017-06-23 11:44:21 +02:00
Carsten "Tomcat" Book
5f51e5596e merge mozilla-inbound to mozilla-central a=merge 2017-06-23 11:28:19 +02:00
Nicholas Nethercote
58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Gerald Squelart
3faa7098b0 Bug 1374441 - Backed out bug 1374173 (MediaCacheStream Seek&Read refactoring) - r=jwwang
Bug 1374173 seems to be the cause of all MediaCache intermittent assertion
failures. It's not an important bug, so let's back-out and verify that
intermittents disappear.

MozReview-Commit-ID: 2X8iW1hWu99

--HG--
extra : rebase_source : e22443a5b9d5ba9a6ce4b126953a880e8e469cd2
2017-06-23 13:18:07 +12:00
Chris Pearce
5734680cc7 Bug 1375708 - Use base::Time() instead of time(0) in WidevineDecryptor::GetCurrentWallTime(). r=gerald
On Linux some implementations of time(0) appear to be suffering from integer
overflow and giving us the wrong dates. This causes the time we expose to the
CDM to be wrong, and so licenses passed to the CDM are failing to authenticate,
and Netflix is thus broken on some Linux systems.

This is only happening in Firefox 54 and earlier, as in those versions we use
the WidevineDecryptor to talk to the CDM. In 55 (in beta) and later we use the
PChromiumCDM protocol to talk to the CDM. This doesn't use time(0) to get a
time for the CDM, so it's immune to the problem here.

So this patch makes the GetCurrentWallTime() implementation in
WidevineDecryptor match the code currently being used on Nightly and Beta in
the ChromiumCDMChild::GetCurrentWallTime() function.

Since we use the PChromiumCDM protocol to talk to the CDM on Nightly and Beta
by default, the WidevineDecryptor isn't actually being used on Nightly and
Beta. So this patch will only cause a behaviour change in Release, which still
uses the old backend. However it will make Release run the same code that we're
running in Nightly and Beta, so it should be safe to uplift to Release.

MozReview-Commit-ID: J58iDyinyQG

--HG--
extra : rebase_source : dcdf4a846f7b007526aa626db24598942f13f01d
2017-06-23 16:02:14 +12:00
bechen
64a0e9a63e Bug 1373975 - Modify the testcase to meet spec. if a cue.endTime is equal to playbacktime, the cue is not an activeCue. r=rillian
MozReview-Commit-ID: 24sXOtW3n54

--HG--
extra : rebase_source : e9ea01def3c9bdf4485530a1c8616b001e6f2dee
2017-06-23 09:36:20 +08:00
Nicholas Nethercote
f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Nicholas Nethercote
033f83145c Bug 1375387 - Reorder and section-ify GeckoProfiler.h. r=mstange.
This patch gives some structure and order to the profiler's API.

It also renames AutoProfilerRegister as AutoProfilerRegisterThread, to match
profiler_register_thread().
2017-06-22 14:28:47 +10:00
Jan Beich
2ade215022 Bug 1375398 - Unbreak build without Gecko Profiler after bug 1374389. r=jya
MozReview-Commit-ID: 7DZESkA9G28

--HG--
extra : rebase_source : 89fd05d4e68f7096a46d95dfbb7c3f857ca390d2
2017-06-22 07:50:52 +00:00
Nico Grunbaum
f24257104b Bug 1343515 - fixing video recv side jitter timebase;r=drno
MozReview-Commit-ID: Kax8OTcSnSL

--HG--
extra : rebase_source : 197786598a62e7657219f0cca11b6742c441b62d
2017-06-07 12:33:22 -07:00
JW Wang
6cd0d57b3c Bug 1374930. P4 - move ResourceCallback to ChannelMediaDecoder. r=cpearce
We also move some methods to protected so they are callable from ChannelMediaDecoder.

MozReview-Commit-ID: 6s9LKNkbJhX

--HG--
extra : rebase_source : 172ea88bc01552a90f5ef51db2b5af0ac5551c3b
extra : intermediate-source : a724333159c6b408e2fa68dba2d0a467f3c55940
extra : source : 03760e05ea8044b3404d29bb62205a2f62892d4b
2017-06-20 18:10:56 +08:00
JW Wang
61f7ca2479 Bug 1374930. P3 - move Clone() down to ChannelMediaDecoder for clone is possible only for those use channel-based resource. r=cpearce
MozReview-Commit-ID: Ci2kbts2pkQ

--HG--
extra : rebase_source : 3a2e70ca4bf56e1c73b7faff8e183211787a96bf
extra : source : 682cb949adae4683ae1cbbfbb4c457b83cb1fddc
2017-06-20 18:10:27 +08:00
JW Wang
5c00111ef1 Bug 1374930. P1 - add ChannelMediaDecoder to be the base class which uses channel-based MediaResource. r=cpearce
MozReview-Commit-ID: 6L4me2BQkgi

--HG--
extra : rebase_source : d78de302d0551b9754569885d79ed3aba6571f61
extra : intermediate-source : d32948c3c5110b663d4ac61a1f483c8f8db00707
extra : source : cfd7941b933671dcb83c1131463b39f58fec627d
2017-06-19 15:50:09 +08:00
Wes Kocher
d0eddcaa44 Merge m-c to autoland a=merge
MozReview-Commit-ID: 5D2HzsGopzc
2017-06-21 18:13:41 -07:00
Wes Kocher
ac0fd2038c Merge inbound to m-c a=merge
MozReview-Commit-ID: 3LXFVwSoMvs
2017-06-21 17:58:17 -07:00
Carsten "Tomcat" Book
7177a36cde Merge mozilla-central to mozilla-inbound 2017-06-21 14:55:27 +02:00
Carsten "Tomcat" Book
8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bob Clary
47c47f43f9 Bug 1373858 - Disable dom/media/tests/mochitest/test_peerConnection_stats.html for Android failures, r=jmaher. 2017-06-21 04:57:01 -07:00
JW Wang
4bc2a74510 Bug 1374566 - remove methods that have no callers. r=gerald
MozReview-Commit-ID: 7Ze0q32VS0h

--HG--
extra : rebase_source : 470fdf5d480b9115039faeb519756e05787011af
extra : source : be2cd2df4469cec5ded0f9d07977f8f09ba60cb6
2017-06-20 16:47:03 +08:00
Wes Kocher
c0e1236f1a Merge autoland to m-c a=merge
MozReview-Commit-ID: LFtpTAueYrF
2017-06-20 18:24:29 -07:00
Gerald Squelart
c486410640 Bug 1374180 - MediaResourceIndex won't use ReadFromCache, to keep MediaCache more consistent - r=cpearce
Bug 1368837 (Add lockless cache to MediaResourceIndex) used
MediaResource::ReadFromCache when trying to fill its local cache. But this
meant that these reads would not count as "real reads" for the MediaCache,
which could lead to unexpected states, e.g. "Played block after the current
stream position?"

To solve this, this patch reverts to using normal ReadAt() calls, which let
the MediaCache update itself properly.

While still trying to read more than what is requested (to hopefully fulfill
future reads from the local cache), we don't want to be reading so much that
we block waiting for data past the caller-expected point.
To do this, MediaResourceIndex::UncachedRangedReadAt() is called to try and
read as much as could fill the local cache, but if a single
MediaResource::ReadAt() ends before we can fill the local cache, but *after*
the minimum caller-requested size, we stop trying to read, as such extra read
is at risk of blocking (assuming that the caller knows not to read too far.)

MozReview-Commit-ID: 6fGvJpmkuLz

--HG--
extra : rebase_source : bf8e9f20599a05c8f3f221b55d678f0b5da447a9
2017-06-21 11:35:00 +12:00
Bryce Van Dyk
73ab403d2f Bug 1372051 - Remove external media test source. r=maja_zf
MozReview-Commit-ID: 1cGOuAusmUx

--HG--
extra : rebase_source : 0aa62bec8d2aca2ea55c26d6cc0efc4ceec5a761
2017-06-12 10:32:15 +12:00
Sylvestre Ledru
0c1d62e1ab Bug 1375386 - Fix a -Wunused-lambda-capture warning r=jesup
MozReview-Commit-ID: DEjcPY7ihWc

--HG--
extra : rebase_source : 466a38f529ec5e1a9848a3a0f5dac7ac72e69726
2017-06-22 08:43:14 +02:00
Munro Mengjue Chiang
fd9cdef5ad Bug 1374204 - verify webrtc peerconnection tests with android hardware encoder and legacy encoder. r=jib
MozReview-Commit-ID: 8M86Qqx7GZa

--HG--
extra : rebase_source : e6b92b637f5dd63fb325796e2f2043688562246b
2017-06-19 18:22:15 +08:00