Commit Graph

9490 Commits

Author SHA1 Message Date
Carsten "Tomcat" Book
3ad97e202a merge mozilla-inbound to mozilla-central a=merge 2017-01-12 10:14:43 +01:00
Phil Ringnalda
e3c15e2b7e Backed out changeset f69ae549623a (bug 1321198) for being a totally unacceptable thing to have landed on an integration branch
--HG--
extra : rebase_source : 010e42975a95d521188f61abff9227569d98995c
2017-01-11 21:41:57 -08:00
Ryan VanderMeulen
e8f15d975e Backed out changeset 94e48b834d82 (bug 1329386) for bustage on a CLOSED TREE. 2017-01-11 21:49:18 -05:00
Matt Woodrow
fd9309fe71 Bug 1329386 - Fallback to WMF decoding if the OOP decoder fails. r=jya 2017-01-12 15:35:10 +13:00
Matt Woodrow
4e6b9e51c7 Bug 1329305 - Don't wait on readback task if dispatching it failed. r=dvander 2017-01-12 15:33:25 +13:00
Jan Beich
3b398e68ed Bug 1330378 - Add missing header after bug 1329891. r=jwwang
MozReview-Commit-ID: AcOqT3fVuUA

--HG--
extra : rebase_source : 61dabdff9bfcc1fcda0b49e73532cd705dcc4437
2017-01-11 18:19:18 +00:00
Kilik Kuo
2873d75a62 Bug 1316573 - Reset the information in EncryptionInfo to make MediaElement reusable from encrypted content to plain content. r=jya
MozReview-Commit-ID: 4OU0sb2OSzi

--HG--
extra : rebase_source : c18f76229bc2cfde79dc114ff5bc892a973a1ae2
2017-01-12 11:33:55 +08:00
Carsten "Tomcat" Book
a712d69adb merge mozilla-inbound to mozilla-central a=merge 2017-01-11 16:23:39 +01:00
JW Wang
0342dec38e Bug 1329897. Part 4 - inline Ensure{Audio,Video}DecodeTaskQueued for DispatchDecodeTasksIfNeeded is the only caller. r=kaku
MozReview-Commit-ID: CrldEKxY9Qg

--HG--
extra : rebase_source : 03df3e0378213e8675b9c72dbe22fd544c4ac96e
extra : intermediate-source : c84e8a74f5907030b8d134d7f577925948a86cfc
extra : source : 9f2b276446af127328da3aaf7abbc7846ec8fbb6
2017-01-09 20:37:06 +08:00
JW Wang
e1c0f361aa Bug 1329897. Part 3 - call Request{Audio,Video}Data instead. r=kaku
For HandleAudioCanceled():
1. IsRequestingAudioData() is false because mAudioDataRequest is completed in MDSM::RequestAudioData().
2. IsWaitingAudioData() is false because data promsie and wait promise are mutually exclusive.
3. IsAudioDecoding() is true because we wouldn't have requested audio data otherwise.

Likewise, we can prove EnsureAudioDecodeTaskQueued() can be reduced to mMaster->RequestAudioData()
in HandleAudioWaited.

MozReview-Commit-ID: 1i63IMfZaUh

--HG--
extra : rebase_source : ac389a7ccc74d969ecfc5f5f622c1c90e2d9b118
extra : intermediate-source : 50bb6d229443be0c410daf7c9553e84cd21fd929
extra : source : f4c3f02f3741c49eed38c2aaab5c872d18fb74ff
2017-01-09 20:27:36 +08:00
JW Wang
59e78145eb Bug 1329897. Part 2 - we don't want to skip to next key frames when buffering. r=kaku
MozReview-Commit-ID: 6Ln73FOVovs

--HG--
extra : rebase_source : 2387c92ae79997cd52cd374185ee2a94707deddc
extra : intermediate-source : 252125fb5a79f2e4a91e5af8b3eb51afee7a2cbf
extra : source : cd86e5a1440aa31e6885727f076e4e1e014debe9
2017-01-09 20:14:01 +08:00
JW Wang
63a0e6a39f Bug 1329897. Part 1 - copy Ensure{Audio,Video}DecodeTaskQueued into BufferingState. r=kaku
Note we remove the checks for mState.

MozReview-Commit-ID: 7uzjzjKDCIj

--HG--
extra : rebase_source : a3c18a977a96edf64b44598cd2244ea20d5f9363
extra : intermediate-source : 294a139aa91dcaaa2d3c2654cbae0fce5317fcbd
extra : source : 1ac775ae3fbb65146c28024e6c19d33b2dd55f66
2017-01-09 20:12:00 +08:00
JW Wang
a7b9a8665e Bug 1329891. Part 6 - default HandleWaitingFor{Audio,Video} to crash. r=kikuo
States that expect this event should override the function.

MozReview-Commit-ID: AmqktrDyVH5

--HG--
extra : rebase_source : 610dec3def2944c6234fd18cf71d9ee02998ad4d
extra : intermediate-source : 28ed7fa9991588b4ba131856cab0ff239f0b24e5
extra : source : 6e5d3a1d32985b6eba449f76e99538b0589bd200
2017-01-09 19:43:55 +08:00
JW Wang
9357fc0732 Bug 1329891. Part 5 - default HandleEndOf{Audio,Video} to crash. r=kikuo
States that expect this event should override the function.

MozReview-Commit-ID: 5Zhcu1m2MMm

--HG--
extra : rebase_source : 4462e34f5c063fdfc201f0f27e2caa8ba8d2fdc2
extra : intermediate-source : a91db7dd4a3d832f8c7b32ac87f8a8d5e518bec3
extra : source : 4499e663ce6821b98057454c8d6f06fe2cb762e0
2017-01-09 19:38:10 +08:00
JW Wang
fedda3a0b4 Bug 1329891. Part 4 - remove StateObject::HandleNotWaited(). r=kikuo
If the wait promise is rejected, we probably won't be able to finish
decoding after seeking. So we should just raise an error immediately.

MozReview-Commit-ID: GKXo9ZooBfV

--HG--
extra : rebase_source : 257a2724d1d2f3266e17b2de3f7d80fa385a2782
extra : intermediate-source : 150ce8e05dc887b7ed2b71cdc5ab77fb117775d2
extra : source : 6ff0dea0afabd57ea53ea3571020cdea3d4b0eca
2017-01-09 19:34:12 +08:00
JW Wang
c5599e5087 Bug 1329891. Part 3 - default Handle{Audio,Video}Waited to crash. r=kikuo
States that expect this event should override the function.

MozReview-Commit-ID: IjmR7F1UOiU

--HG--
extra : rebase_source : a83f4a96838e7358df8d0579163002ade53b5cc7
extra : intermediate-source : 2db95ef2473440ad2ec9130cf24f959291b18bef
extra : source : 78ae9269f4f09986a14e498843a7638f81dbc440
2017-01-09 15:53:12 +08:00
JW Wang
703766cdd0 Bug 1329891. Part 2 - default Handle{Audio,Video}Decoded to crash. r=kikuo
States expect this event should override this function.

MozReview-Commit-ID: 8Y4ngn4X7MS

--HG--
extra : rebase_source : 705affda97d3ee919f560a76c3858fa3564bfbe4
extra : intermediate-source : 9139df5e241af72bc75544ae3d1df27a7cc514aa
extra : source : b7c803ea73a1b1af0ee40a64d7710c52186c3c25
2017-01-09 15:48:00 +08:00
JW Wang
982fb8390e Bug 1329891. Part 1 - default Handle{Audio,Video}Canceled() to crash. r=kikuo
1. States (DecodeMetadataState and WaitForCDMState) happen before
DecodingFirstFrameState should never receive this event because they don't
decode at all.
2. DormantState and ShutdownState shouldn't receive this event because
they call ResetDecode() in the entry action.
3. CompletedState should never receive this event because it happens after
HandleEndOf{Audio,Video} which happens before Handle{Audio,Video}Canceled.

MozReview-Commit-ID: LdwpWlFHtRp

--HG--
extra : rebase_source : d48b8c7b2347fa745de006fcd1aff640cb474aa1
extra : intermediate-source : 981305f87ff796060666227cf89a23b51e607b54
extra : source : ee5e78f761568bea438c51b9e70eef9b83e14626
2017-01-09 15:44:18 +08:00
Nicholas Nethercote
949658eb73 Bug 1329857 - Remove NS_METHOD and NS_CALLBACK. r=froydnj.
Bug 1295053 removed most uses of NS_METHOD and NS_CALLBACK, but one use was
unintentionally left behind (in the XPIDL parser) and another has since crept
in (in MediaDrmCDMProxy.h).

So this patch removes NS_METHOD and NS_CALLBACK. NS_METHOD_(nsresult) and
NS_CALLBACK_(nsresult, T) can still be used for the same purpose, but those
alternatives are less likely to be used unintentionally.

--HG--
extra : rebase_source : a50fc7b2a64a36d1ca9beda81bc0edb8f2ec1934
2017-01-10 14:08:43 +11:00
Wes Kocher
0b29e777da Merge m-c to inbound, a=merge
MozReview-Commit-ID: 6eBJRasdMck
2017-01-10 18:36:19 -08:00
Andrea Marchesini
2abf88ce1f Bug 1329744 - AudioBuffer ctor updated, r=padenot 2017-01-10 21:30:28 +00:00
Carsten "Tomcat" Book
89882dc5f4 merge mozilla-inbound to mozilla-central a=merge 2017-01-10 12:11:31 +01:00
Wes Kocher
105aea2522 Merge m-c to inbound a=merge
MozReview-Commit-ID: G24aq5fbYNd
2017-01-09 16:44:58 -08:00
Geoff Brown
4499383617 Bug 1326005 - Skip test_peerConnection_renderAfterRenegotiation on android emulator, for frequent timeouts; r=me 2017-01-09 16:15:11 -07:00
Gerald Squelart
1cc4e2c254 Bug 1329319 - Allow NewRunnableMethod to method of a non-refcounted base class - r=froydnj
This is done by storing the object pointer based on the exact pointee type,
instead of as hinted by the method-pointer, which could be a non-refcounted
base class.

The stored pointer type is statically-checked to be derived from (or the same
as) the class type from the method-pointer, to prevent misuses.

One change had to be done in TrackBuffersManager, as it was passing another
type and relying on implicit pointer conversions. A simple `.get()` to pass
the raw pointer type (to be stored in a RefPtr) fixed that one issue.

MozReview-Commit-ID: 4kH0XdjB5Rk

--HG--
extra : rebase_source : 40ad68820cfce469ecda272f430062f05dfcd09f
2017-01-10 10:49:08 +11:00
Carsten "Tomcat" Book
47628ca590 Merge mozilla-central to autoland 2017-01-10 12:24:10 +01:00
Alastor Wu
3bfd999bfd Bug 1323703 - implement a method to create DXVA2 decoder. r=mattwoodrow
When we want to decode with DXVA2 aPI directly instead of using it by MFT, we need to take responsibility for
creating a decoder and handle the related decoding operations by ourself. So implement a method to create and
hold a ref to DXVA2 decoder for DXVA2Manager.

MozReview-Commit-ID: 4EyrsjzEyYK

--HG--
extra : rebase_source : 6719bfe15243395711984d66919baca2bb74699e
2016-12-15 18:26:17 +08:00
JW Wang
063d3eaeb0 Bug 1329110. Part 7 - remove StateObject::HandleEndOfStream(). r=kaku
The same reason as P6. We would like to avoid virtual functions calls
inside a virtual function.

MozReview-Commit-ID: EYCk6tKPYSs

--HG--
extra : rebase_source : 8482799473e4cf856238b9fa7897e432b4e3a674
extra : source : 17769cff12ccc2157adc91c4fce7e4030f303b00
2017-01-09 13:18:37 +08:00
JW Wang
ce97bad770 Bug 1329110. Part 6 - remove StateObject::HandleWaitingForData(). r=kaku
Since DecodingState is the only one that overrides the function, we will let it
just override HandleWaitingFor{Audio,Video}. We also reduce the code complexity
because it is hard to trace the code when one virtual function calls another
virtual function.

MozReview-Commit-ID: AdLXpDgvOyx

--HG--
extra : rebase_source : a8c2aef15537044d904f576976e08264524c26e4
extra : source : 60c230cff746f91653922223dc1f56e48c0d6120
2017-01-09 13:06:55 +08:00
JW Wang
b338772d2a Bug 1329110. Part 5 - split Split StateObject::HandleVideoNotDecoded into small functions. r=kaku
MozReview-Commit-ID: Bfyekr4I6OX

--HG--
extra : rebase_source : 43579faa96eba1e2fae2db98a7336aa928006661
extra : source : ea122d8b79c7cb87ec3671cc849d1358cf97976d
2017-01-09 12:59:32 +08:00
JW Wang
c981850d84 Bug 1329110. Part 4 - remove StateObject::HandleAudioNotDecoded(). r=kaku
MozReview-Commit-ID: 53iQ46klPMr

--HG--
extra : rebase_source : 279e78eacfb63a94b729c19b9f4473a6999c1e11
extra : source : adac40b710796c1ec9b9af420cade911bff3cc48
2017-01-09 12:45:43 +08:00
JW Wang
5bcdb2f65e Bug 1329110. Part 3 - add HandleEndOfAudio(). r=kaku
MozReview-Commit-ID: KGiWU8t79pv

--HG--
extra : rebase_source : 3809783134481a31135776a0bf0d5218afff6ba8
extra : intermediate-source : 4396f620afc3752a06005f79ed4721fa8ab2b584
extra : source : e12ce512f9153bf263150eeab3717671a2a01543
2017-01-06 17:54:59 +08:00
JW Wang
49a2f5c842 Bug 1329110. Part 2 - add HandleAudioCanceled(). r=kaku
MozReview-Commit-ID: IlzcucZOHpo

--HG--
extra : rebase_source : 7ee390235f6813117c7400bcbec13b376e7ef72a
extra : intermediate-source : 4ac81f01d3804c3e41b18ce3dcb5f19ab9cda69d
extra : source : 48a4f61f58bca7e48ac970494f0749417d8d5c4e
2017-01-06 17:49:11 +08:00
JW Wang
849a835855 Bug 1329110. Part 1 - add HandleWaitingForAudio(). r=kaku
MozReview-Commit-ID: B2ElMMYKt7m

--HG--
extra : rebase_source : da07871951b787e8c101a490ea78107e11ad80e8
extra : intermediate-source : da16ca5f7b522b191b183a4923722b3e4141117f
extra : source : 558d053ca2f80d9ed52bb72d2f822ec2ae36dfb6
2017-01-06 17:43:05 +08:00
JW Wang
ffe2db6667 Bug 1321198 - this is a debugging patch which crashes when test_seek* time out to get the stack trace about what's stuck. r=jya
MozReview-Commit-ID: L7Q3Fyapkzf

--HG--
extra : rebase_source : 7738d13e5ab6e72b89f18423ae056dcccb485f6c
2017-01-11 11:15:24 +08:00
JW Wang
bc485dd0e2 Bug 1330238 - remove the calls to requestLongerTimeout() and expectAssertions(). r=jya
1. requestLongerTimeout() is not needed because we don't have slow machines as B2G anymore.
2. Bug 634747 and 846769 are already fixed.

MozReview-Commit-ID: JbKtxHLdr8I

--HG--
extra : rebase_source : 7603c61637b8b142c8013bb8f431a49a93fac0c1
2017-01-11 11:01:28 +08:00
Ralph Giles
d5608e0a47 Bug 1277037 - Make AudioCallbackDriver::StartStream fallible. r=jesup
Avoid crashing in the case that cubeb stream start fails and report
an error instead.

MozReview-Commit-ID: 75M392POyHo

--HG--
extra : rebase_source : 2c083cf129f12ad1e18d9065152cfee13987b071
2017-01-11 11:51:23 -08:00
Nico Grunbaum
526e90ef9f Bug 1329762 - stronger deprecation warnings on old PeerConnection.getStats usage. r=jib
MozReview-Commit-ID: 4M8AejNGWex

--HG--
extra : rebase_source : abca62e857e11f640108dbf254baf7b21df7d207
2017-01-09 12:44:22 -08:00
Carsten "Tomcat" Book
c9889851e8 Merge mozilla-central to autoland 2017-01-09 10:45:10 +01:00
Randell Jesup
3fa45d2f9b Bug 1326311: Avoid races in destroying MediaRecorder sessions - destroy on MainThread r=jib
MozReview-Commit-ID: 3DA4HxUuzje
2017-01-08 22:08:09 -05:00
pierre.brochard.1982@m4x.org
f3a18dbce1 Bug 1326311: Fix thread and Track listener leaks starting and stopping MediaRecorder r=jesup
MozReview-Commit-ID: 3q6RgA4Ehtc
2017-01-08 22:06:28 -05:00
JW Wang
61f01c2630 Bug 1329098. Part 5 - remove unnecessary checks and temps. r=kaku
For mSentFirstFrameLoadedEvent is true in DecodingState.

MozReview-Commit-ID: 8zpsMAME8p6

--HG--
extra : rebase_source : fea2a795481628b5bd7eaf841fcf6a8bc377fbbc
extra : source : d54b4f06b497408a0225d708bc749101d778ca4f
2017-01-06 15:49:02 +08:00
JW Wang
5c3ba7d181 Bug 1329098. Part 4 - move DispatchDecodeTasksIfNeeded into DecodingState. r=kaku
MozReview-Commit-ID: LT9xNdTAtOW

--HG--
extra : rebase_source : faf2d7dac84374d47a6d2e210881d0355cbd86f5
extra : source : f681710dc58aac1053d06adaeb1865fceeabde23
2017-01-06 15:43:31 +08:00
JW Wang
75547a6b1d Bug 1329098. Part 3 - remove some temp vairables. r=kaku
MozReview-Commit-ID: 3gz79Tzidtf

--HG--
extra : rebase_source : 76ebb3752e71883cbdc7df916453792bff6a0bb0
extra : source : a63557c857d9ca8cfd1280c986a5d2f99f4e7668
2017-01-06 15:36:38 +08:00
JW Wang
d683161210 Bug 1329098. Part 2 - remove unnecessary checks. r=kaku
1. mSentFirstFrameLoadedEvent is true in BufferingState.
2. mMinimizePreroll is false in BufferingState for buffering happens after playback starts and we reset mMinimizePreroll once playback starts.

MozReview-Commit-ID: ABE7TvNEetD

--HG--
extra : rebase_source : 53c507ff9cd8ea028c5ff7f8b5b8c049cb8a7ebf
extra : source : e87a70953f6eb8d4a9e31ab06ac73afcc90da923
2017-01-06 15:22:52 +08:00
JW Wang
664dfb82d2 Bug 1329098. Part 1 - copy DispatchDecodeTasksIfNeeded() into BufferingState. r=kaku
MozReview-Commit-ID: 2q8FhTFTJ6g

--HG--
extra : rebase_source : 989fb40a86b0358c8843082abc9ef2dea20e3a2d
extra : source : 13d0e5e6e1ddf5fff6a0b8a0da7a85e5694c5be7
2017-01-06 15:00:36 +08:00
JW Wang
1f9deb245d Bug 1329554. Part 2 - remove |mMaster->mMinimizePreroll| checks from BufferingState::Step(). r=kikuo
mMinimizePreroll is false in BufferingState because we enter buffering only
after playback starts.

MozReview-Commit-ID: 9vRuogzvV7x

--HG--
extra : rebase_source : f43eb5af15d6ae969a6269c7adf68780d9b3b659
extra : intermediate-source : 0dd36842a3ae6ad9b5421bbd277e9ee05ec2e110
extra : source : eae56fe516563a2675f0492c56c6a01b6f38149f
2017-01-05 18:13:54 +08:00
JW Wang
84f38029d4 Bug 1329554. Part 1 - let DecodingState decide whether to dispatch decoding tasks when mMinimizePreroll changes. r=kikuo
MozReview-Commit-ID: 6QnH2vOHid1

--HG--
extra : rebase_source : 2b5485539a22a8157fc826761199092ab099d0b8
extra : intermediate-source : 329b13f1aa7025f35450417c658bcacd2b42996a
extra : source : 160616eaabf48efac98868c767f704b98415d3b9
2017-01-05 18:12:06 +08:00
JW Wang
f4605f76d9 Bug 1328836 - Remove MDSM::DispatchMinimizePrerollUntilPlaybackStarts. r=kaku
MozReview-Commit-ID: 1EGHVhZqUTA

--HG--
extra : rebase_source : c90c245683c50364d869566540f47927e0f64d04
extra : intermediate-source : ceb0660e9f35a0dbbd361a4dc4eb6bcef8add385
extra : source : e1dfbdac70feedc99a950c00aeda683e38919247
2017-01-05 17:59:19 +08:00
Gerald Squelart
b3e89a3af9 Bug 1322964 - MozPromise.Then() taking only one resolve+reject function - r=jwwang
Then and ThenPromise can now be given only one function object, which takes a
`const MozPromise::ResolveOrRejectValue&`.

MozReview-Commit-ID: BEtc3spK9Yh

--HG--
extra : rebase_source : 1b16ad15ebfcdfb653d8d98073adee0f8b27b46e
2017-01-03 16:15:14 +11:00
JW Wang
a2f0f971ab Bug 1328782. part 3 - remove the |VideoQueue().GetSize() > 0| check. r=kikuo
Since |GetAmpleVideoFrames() * mPlaybackRate + 1| is positive,
|VideoQueue().GetSize() >= GetAmpleVideoFrames() * mPlaybackRate + 1| must imply
|VideoQueue().GetSize() > 0|

MozReview-Commit-ID: 6cZ2XfUrmj

--HG--
extra : rebase_source : fc77e2cdebc4621fa68f94c6c3db81d4d921b851
2017-01-05 12:09:55 +08:00
JW Wang
e6bb1d40a3 Bug 1328782. part 2 - some more tweaks to the expression. r=kikuo
MozReview-Commit-ID: I1IcV88amob

--HG--
extra : rebase_source : a1be8f5496582c2117b3e30cd8010b769d970db7
2017-01-05 12:07:15 +08:00
JW Wang
dbaf1d1389 Bug 1328782. part 1 - some tweaks to the expression. r=kikuo
MozReview-Commit-ID: 3Mt1c7TrSYy

--HG--
extra : rebase_source : 75cc57e6b0fec9698e874846ad1670f31124685f
2017-01-04 17:37:34 +08:00
Markus Stange
4bdc4ca0fb Bug 1323100 - Register most of the remaining threadfunc threads with the profiler. r=froydnj
As far as I can tell, this covers all the remaining threads which we start
using PR_CreateThread, except the ones that are created inside NSPR or NSS,
and except for the Shutdown Watchdog thread in nsTerminator.cpp and the
CacheIO thread. The Shutdown Watchdog thread stays alive past leak detection
during shutdown (by design), so we'd report leaks if we profiled it. The
CacheIO thread seems to stay alive past shutdown leak detection sometimes as
well.

This adds a AutoProfilerRegister stack class for easy registering and
unregistering. There are a few places where we still call
profiler_register_thread() and profiler_unregister_thread() manually, either
because registration happens conditionally, or because there is a variable that
gets put on the stack before the AutoProfilerRegister (e.g. a dynamically
generated thread name). AutoProfilerRegister needs to be the first object on
the stack because it uses its own `this` pointer as the stack top address.

MozReview-Commit-ID: 3vwhS55Yzt

--HG--
extra : rebase_source : 56dd27282e7bd09a7e7dc7ca09ccfe3a0198e7af
2017-01-05 16:34:26 +01:00
Markus Stange
927eee33e9 Bug 1323100 - Stop double-registering the Media_Encoder thread with the profiler. r=froydnj
MozReview-Commit-ID: 8TQMVhbw13s

--HG--
extra : rebase_source : b2a55afe65d9a68d1d20d08806cb016ce040d044
2016-12-21 23:06:56 +01:00
Markus Stange
942cdc08a8 Bug 1323100 - Stop double-registering the MediaStreamGraph thread with the profiler. r=froydnj
MozReview-Commit-ID: 7WxNLZpBWL4

--HG--
extra : rebase_source : 6dee759440f94e63a82c43ec295b9a6e9c020d21
2016-12-21 23:06:45 +01:00
Markus Stange
692210bd80 Bug 1323100 - Assign names to all remaining threads that are created through NS_NewThread and create them using NS_NewNamedThread instead. r=froydnj
MozReview-Commit-ID: 7W1dt2BBKJZ

--HG--
extra : rebase_source : c7e335dac2e0f02782f0eb229a7181c8d01317a2
2016-12-21 11:43:50 +01:00
JW Wang
a9218bbb8e Bug 1328811. Part 4 - remove the |mState != DECODER_STATE_SEEKING| check. r=kaku
When mState is SEEKING, DispatchDecodeTasksIfNeeded() is a no-op.

MozReview-Commit-ID: 3sV6RdUwFBV

--HG--
extra : rebase_source : 12f01ab491b5f4326b08b44dd0789139db174d99
extra : source : 89cccddea7603912e264405040071ba0a98bf8de
2017-01-05 14:48:42 +08:00
JW Wang
0a36f808bc Bug 1328811. Part 3 - inline NeedToDecode{Audio,Video} for DispatchDecodeTasksIfNeeded is the only caller. r=kaku
MozReview-Commit-ID: H1K6LJCjk4B

--HG--
extra : rebase_source : 382293f2aa91a134b895458866cc590798d36edd
extra : source : c0971794c58515b498d93caeccf8d8932f48614f
2017-01-05 14:44:45 +08:00
JW Wang
38ceee4499 Bug 1328811. Part 2 - remove the comment that is not valid anymore. r=kaku
MozReview-Commit-ID: JxrBRtKPAau

--HG--
extra : rebase_source : d62438f5546a67bac9004c9dea74580e23b4dd62
extra : source : d0e189f19de690e1244ab22b922ff0b70fd55e60
2017-01-05 14:39:35 +08:00
JW Wang
ba927c6dfe Bug 1328811. Part 1 - remove the assertion. r=kaku
http://searchfox.org/mozilla-central/rev/82ebc0c5ea45477ef4a4bfb3bbff35069bd18cee/dom/media/MediaDecoderStateMachine.cpp#2980
The if statement ensures |mState != DECODER_STATE_COMPLETED|.

MozReview-Commit-ID: CyvfXj94E8s

--HG--
extra : rebase_source : 10007fda9e4c09647a7142b77415c332a69001b3
extra : source : 5936c72d33e155a2a942602b610e6d6407f9bef6
2017-01-05 14:38:52 +08:00
JW Wang
da1657f4f3 Bug 1328810 - Remove the call to DispatchDecodeTasksIfNeeded() from MDSM::StopPlayback(). r=kaku
MozReview-Commit-ID: mZL1FJmea3

--HG--
extra : rebase_source : f1c22d86d60c4078e8c9bef389d0c6f3247154f0
extra : source : ab2eb5c6f2ba7de8be8e21b1a09a2c43efeffc62
2017-01-05 14:32:53 +08:00
Wes Kocher
0f254a30d6 Merge inbound to central, a=merge
MozReview-Commit-ID: 1ij6nLf8f8s
2017-01-05 17:30:35 -08:00
JW Wang
f6c88fe5f9 Bug 1328831 - Remove MDSM::DispatchAudioOffloading. r=jolin
MozReview-Commit-ID: JVJOpmUHNp6

--HG--
extra : rebase_source : 7bcca5c52938b9e429c1e1833500bd85b64dc229
2017-01-05 17:38:17 +08:00
JW Wang
12437440a3 Bug 1328547. part 3 - inline NeedToDecode{Audio,Video} and remove some checks. r=kaku
1. |mState != DECODER_STATE_SEEKING| is true in DecodingState.
2. mSentFirstFrameLoadedEvent is true in DecodingState.
3. mMinimizePreroll is false because pop events fire only after MDSM starts playing.

MozReview-Commit-ID: FTkXmtEnzY5

--HG--
extra : rebase_source : 30392be881ebdb96469189a584a57b89d60cc2b4
2017-01-04 17:23:28 +08:00
JW Wang
55f78f10f6 Bug 1328547. part 2 - remove checks for IsShutdown() which is false in DecodingState. r=kaku
MozReview-Commit-ID: CmU79bt4XoR

--HG--
extra : rebase_source : 4580449f41a23924d887ff4f1d28cecf0ed77ee9
2017-01-04 17:13:49 +08:00
JW Wang
7bbc498596 Bug 1328547. part 1 - Move MDSM::Dispatch{Audio,Video}DecodeTaskIfNeeded into DecodingState. r=kaku
MozReview-Commit-ID: I2gT77VHutm

--HG--
extra : rebase_source : 39daa2eb03b780cd44e8e461d90ea38c5f163394
2017-01-04 17:10:37 +08:00
JW Wang
7e82a51137 Bug 1328781. part 2 - don't convert a double to an int64_t to avoid rounding errors. r=kikuo
MozReview-Commit-ID: 83Zxqr4aiMa

--HG--
extra : rebase_source : baadaff80de366e2ed6a88b2a8bbfaaf54b66c9d
2017-01-05 11:50:20 +08:00
JW Wang
0077fc4f6c Bug 1328781. part 1 - somewhat rewrite the expression. r=kikuo
MozReview-Commit-ID: 5959ZdWKI4k

--HG--
extra : rebase_source : 927c0edda7ff9870c555830e3f022d26e588e258
2017-01-04 17:35:04 +08:00
JW Wang
1bc32335e9 Bug 1328541 - Remove the call to DispatchDecodeTasksIfNeeded() from MDSM::MaybeStartPlayback(). r=kikuo
MozReview-Commit-ID: 9Qj01MSw4Ia

--HG--
extra : rebase_source : 5751a3f681f17656cca1bb28700a3a15ca96c6a6
2017-01-04 16:38:01 +08:00
JW Wang
8c79a1d34c Bug 1326294 - this is a debugging patch which checks if mOwner points to a valid media element object. r=gerald
MozReview-Commit-ID: HRUigVOLdx

--HG--
extra : rebase_source : d44b4315a34b60c1d1a6ba98730a938ed375a937
2017-01-04 16:18:37 +08:00
Carsten "Tomcat" Book
b4e6d275b7 merge mozilla-inbound to mozilla-central a=merge 2017-01-04 16:09:56 +01:00
JW Wang
b550988fa4 Bug 1326335 - Ensure MDSM only decodes metadata once. r=kaku
MozReview-Commit-ID: AqKbR6OuQ40

--HG--
extra : rebase_source : b8da9e4a47ae79b01ed6fc878f4232244c555aef
extra : intermediate-source : 3ce2a998b1abc4acac397b653c721f96d84452b1
extra : source : 94103894f26463ac8ab4a8a59957ccf4f79ebecf
2016-12-23 19:23:58 +08:00
Edgar Chen
68253477ee Bug 1328206 - Do not use binding_detail things in AudioContext, use Sequence instead; r=dminor 2017-01-03 11:54:37 +08:00
Olli Pettay
0364dbc792 Bug 1326507, remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS, r=mccr8
--HG--
extra : rebase_source : 3ae1207308de120b7299b13ecaa95dd1612b3459
2017-01-03 21:47:55 +02:00
Andreas Pehrson
4e5007c1c2 Bug 1314886 - Call mozCaptureStream() after "loadedmetadata" in test_streams_element_capture_reset. r=jwwang
MozReview-Commit-ID: 1i5VIfCWWRy

--HG--
extra : rebase_source : 00e78dc0214557bd53b773e918a56de8a56e9682
2016-12-30 10:56:49 +01:00
JW Wang
dae2fad218 Bug 1325317. Part 2 - rename the function and fix comments. r=kikuo
MozReview-Commit-ID: 3GUkH5OpSmJ

--HG--
extra : rebase_source : 421c16cf75bde625b158571439fb9b4d29e8046f
extra : intermediate-source : 22b22702bafca7da4f12e3abdb08cabcf9eff20c
extra : source : e7b0f09a40bf5f148496470bb019c11dc5431856
2016-12-22 16:56:59 +08:00
JW Wang
7b71dd0944 Bug 1325317. Part 1 - move StopMediaSink() out of MediaDecoderStateMachine::Reset(). r=kikuo
MozReview-Commit-ID: 6Bso8uxM7Ee

--HG--
extra : rebase_source : e255128028e33b2aad3566f5a3a3a09a07ac2d68
extra : intermediate-source : a3be598566377928746b5e37800d788cdcab6942
extra : source : f46b24e31cbb07243ca74206bd2e05e99b070286
2016-12-22 16:48:54 +08:00
Jan-Ivar Bruaroey
0fb5c6dc68 Bug 1329193: Use es6 classes in PeerConnection.js. r=mt
MozReview-Commit-ID: FtVZXPA9ckJ

--HG--
extra : rebase_source : 0c5d1ba14a83b553cc9cb4473035811173f9c9c8
2017-01-05 22:47:25 -05:00
Gerald Squelart
e0f7233057 Bug 1329568 - gtest for MediaMIMEType and family - r=jya
MozReview-Commit-ID: BhQR490Tn7U

--HG--
extra : rebase_source : 21313dfd4d86ae0e4c7d5de4f4f59cc96f79fec6
2016-12-30 17:41:17 +11:00
Gerald Squelart
afc4e55065 Bug 1329568 - Store original media-content string - r=jya
Some code (mostly logging) needs to know the original full MIME string, which
we would normally not need to keep in MediaExtendedMIMEType.

MozReview-Commit-ID: Jcd290ScHAb

--HG--
extra : rebase_source : 1165bc3425ed34a93564335a10ea3c6257da6f19
2016-12-28 18:56:22 +11:00
Gerald Squelart
dd8e7f0b39 Bug 1329568 - Media...Type::SizeOf... methods - r=jya,njn
When replacing strings with MediaContentType objects, some classes will want to
know about their size.

MozReview-Commit-ID: LNdaaUdJac3

--HG--
extra : rebase_source : 70bfbfa55bc6f2c7a8aa026797103cd77615df08
2016-12-22 11:54:56 +11:00
Gerald Squelart
5587e692df Bug 1329568 - Remove MediaContentType crutches - r=jya
Now that we have move all data-handling functions to MediaMIMEType and friends,
we can remove direct accesses to data from MediaContentType, to better separate
the context that MediaContentType represents, from the data it includes.

Dependent code needs to be mechanically updated to now use the proper APIs.

Note that in most places, we just extract MIME strings. Further work will take
place in later bugs, to completely replace these strings with MediaContentType
or more appropriate types...

MozReview-Commit-ID: LoX8dhX7OlB

--HG--
extra : rebase_source : cf221ac3c104f99b36cfa055afcf67d3bca26d0e
2017-01-01 09:24:24 +11:00
Gerald Squelart
062283957f Bug 1329568 - MediaCodecs - r=jya
MediaCodecs factors out the codecs string from MediaExtendedMIMEType.

It also provides utility methods to go through a list of codecs, and test the
presence of specific codecs.

Note that there is no real way (yet?) to validate the given codecs strings, we
just assume that it's a comma-separated list of codecs. Further work can be
done later on if useful.

MozReview-Commit-ID: 5n2nWmaNT2O

--HG--
extra : rebase_source : 44ca49aa3d2a795171ebff75c91bb228196bc429
2016-12-28 10:48:27 +11:00
Gerald Squelart
29896bdd35 Bug 1329568 - MediaMIMEType 'audio/' and 'video/' checks - r=jya
A lot of code wants to check if the type starts with 'audio/' or 'video/',
MediaMIMEType::IsAudio() and IsVideo() will help with that -- and could later
be optimized if needed.

Note that types starting with 'application/' will still need manual testing,
but they are rare anyway.

MozReview-Commit-ID: UBcxS69Hcb

--HG--
extra : rebase_source : 24bd67f6ec18a2a6c7d33b065ac1036aa51de2ae
2016-12-17 17:43:02 +11:00
Gerald Squelart
8a97444e89 Bug 1329568 - MediaMIMEType comparisons against others - r=jya
`==` and `!=` against other MediaMIMEType objects, and against MEDIAMIMETYPE
checked literals.
This will allow simple (and compile-time-checked!) tests like:
  if (contentType.Type() == MEDIAMIMETYPE("audio/mp4")) { ...

MozReview-Commit-ID: 5yMua5krOKD

--HG--
extra : rebase_source : 778adc5fd45624d60529c259aeb1c41d4f66eb2f
2017-01-01 10:06:26 +11:00
Gerald Squelart
7c523a416e Bug 1329568 - MediaMIMEType construction from literal string - r=jya
MediaMIMEType object can now be constructed from string literals by using e.g.:
MEDIAMIMETYPE("audio/mp4") -- Note that it's an all-caps macro.
The string will be checked for validity at compile time.

To help with this, a new class DependentMediaMIMEType can point inside another
string (usually a string literal), but can only be constructed for valid
strings -- It will fail to compile when using MEDIAMIMETYPE, or it would
assert at runtime if directly built.

MozReview-Commit-ID: 5T3AKfpGbO4

--HG--
extra : rebase_source : 4bf9da294406c9dd6bfd69d560bae4bea44cadf3
2017-01-01 09:52:06 +11:00
Gerald Squelart
633052bba8 Bug 1329568 - Restrict MediaMIMEType to IsMediaMIMEType-checked strings - r=jya
Use IsMediaMIMEType to refuse MIME types that cannot possibly be media-related.

MozReview-Commit-ID: JXhf1biL4L0

--HG--
extra : rebase_source : a33e7be7bcc16685205f767d671a7812ee843364
2017-01-03 22:07:11 +11:00
Gerald Squelart
9dcc40aa5f Bug 1329568 - Simple IsMediaMIMEType checker for strings - r=jya
Inside dom/media, we really only deal with audio and video MIME types.
IsMediaMIMEType will help check for that.

Note that 'application' is an acceptable MIME major type, as some A/V contents
do use it! E.g.: "application/ogg".

IsMediaMIMEType is constexpr to allow its use in static_assert's, so we will be
able to verify string literals at compile time.

MozReview-Commit-ID: InBicRRUeiP

--HG--
extra : rebase_source : 53796c130846763e979cea2757121fadc0e7b88d
2017-01-01 08:46:34 +11:00
Gerald Squelart
d206c54fef Bug 1329568 - MediaSource::IsTypeSupported should report a NotSupportedError if type is not supported - r=jya
Bug 1176218 made IsTypeSupported return a DOMTypeError if the type cannot be
parsed, but this was incorrect.
This was not important until now, because the basic parser accepted invalid
MIME types and therefore would never report an error there.
But the next couple of patches will introduce a stronger check that will
refuse types other that "application/...", "audio/...", and "video/...", and
would now trip the web-platform tests.

MozReview-Commit-ID: EeyFnyurEZK

--HG--
extra : rebase_source : 76f831ddc3c19e0d820454f6f949d44e15d6773c
2017-01-13 14:58:23 +11:00
Gerald Squelart
ab3c0bec0e Bug 1329568 - MediaMIMEType - r=jya
MediaMIMEType factors out the main MIME "type/subtype" string from
MediaExtendedMIMEType, as it is often useful to deal with just that part.
Like MediaContentType and MediaExtendedMIMEType, MediaMIMEType is always valid
once constructed.

MozReview-Commit-ID: 5Urlk6OLo5q

--HG--
extra : rebase_source : aef60fde09b13befa1311c6cd712eac19c438021
2016-12-01 16:57:31 +11:00
Gerald Squelart
14cc7d114d Bug 1329568 - MediaExtendedMIMEType - r=jya
This patch factors out all data handling of MIME strings from MediaContentType
to MediaExtendedMIMEType.

MediaExtendedMIMEType is pretty much a copy of the old MediaContentType, as the
functionality was fine (but will be modified in upcoming patches).
MediaContentType then just delegates the work to its embedded
MediaExtendedMIMEType field.
The main difference is that the default constructor and Populate() method have
been replaced with a single constructor that takes all the arguments at once.

MozReview-Commit-ID: GBAgPDT2DUW

--HG--
rename : dom/media/MediaContentType.cpp => dom/media/MediaMIMETypes.cpp
rename : dom/media/MediaContentType.h => dom/media/MediaMIMETypes.h
extra : rebase_source : 1c925d8e049d9d349ec4c3dd1a079f570b809970
2016-12-01 13:05:45 +11:00
Gerald Squelart
3a45982b06 Bug 1329568 - Add missing #include in MediaStreamListener.h - r=jya
This is required because the next patch adds new files, which changes the
unified-build order and exposes error due to this missing #include.

MozReview-Commit-ID: 3pmqNK1B2bR

--HG--
extra : rebase_source : 6e3dc2d4200aa4740b8f216ba1d1a131b94c26cb
2016-11-28 09:47:46 +11:00
Nils Ohlmeier [:drno]
2ca25c39f6 Bug 1318180: turn network offline events into ice disconnected event. r=bwc,jib
MozReview-Commit-ID: Kqbicl2goL2

--HG--
extra : rebase_source : 4ed7d1364af8bd1575e2ced1bd8512405e0dd669
2016-11-17 23:16:33 -08:00
Wes Kocher
6e269458be Merge inbound to central, a=merge
MozReview-Commit-ID: KIm8XUkfyZW
2016-12-30 16:56:03 -08:00
Andreas Pehrson
df4d42fabb Bug 1326386 - Restore test_gUM_active_autoplay.html. r=jesup
MozReview-Commit-ID: HKNgBRENrcY

--HG--
extra : rebase_source : ea1803f832b586e0bf10e3a9fbec96a0f0410bf2
2016-12-29 19:05:39 +01:00
Ryan VanderMeulen
9f48ae4f9f Merge inbound to m-c. a=merge 2016-12-30 10:04:47 -05:00
JW Wang
4eb1252534 Bug 1326330. Part 2 - add assertions and checks. r=JamesCheng
1. ensure the 'finish' event is notified only once.
2. assert pushing items to a finished queue.

MozReview-Commit-ID: 9lYWPANVz0m

--HG--
extra : rebase_source : c05b0c77fdee324798579e0e2ebec6ce6303cbf6
extra : intermediate-source : 80be35003c76fc9cc74f206576394b46317b7880
extra : source : 14f5d5c064fddbbcf5728fb4d19e9c0a4e45fac7
2016-12-23 19:19:04 +08:00
JW Wang
3985fd7208 Bug 1326330. Part 1 - remove unused functions. r=JamesCheng
MozReview-Commit-ID: 66XDaghbKUy

--HG--
extra : rebase_source : a25d3413d6f076366373b92fd51ff850bb1dd79e
extra : intermediate-source : a9f7a68b4bff23ec0a059f5cc2a7fca92c1501bd
extra : source : d2dbc97390bc85fba1bd0a53d780f6122cc96ac7
2016-12-23 19:17:11 +08:00
JW Wang
7be77921c0 Bug 1325321 - let DecodingState handle audio/video pop events. r=kaku
MozReview-Commit-ID: 9EjeOfn1vBU

--HG--
extra : rebase_source : 52efab5c60df935de35fb049926c639aa053e389
extra : intermediate-source : d760746364b9585128a74bf284246418eb024280
extra : source : 0537651366abb8524a3436f0208d28b3248a1c52
2016-12-22 17:28:14 +08:00