Граф коммитов

270 Коммитов

Автор SHA1 Сообщение Дата
Chris Pearce 50bc88ccf9 Bug 1395021 - Fix up includes to account for StreamTracks.h not being indirectly included in so many places. r=jwwang
With MediaInfo.h no longer including StreamTracks.h, some things that include
MediaInfo.h now use things that are no longer included. This patch adds the
includes back in, so the build works again.

MozReview-Commit-ID: INpH3vnBAmk

--HG--
extra : rebase_source : 8b91a999c71242c1eb5030f86c2a1f1c85d5fb27
2017-08-30 15:38:56 +12:00
Alastor Wu ac5a951f4a Bug 1373888 - part6 : only release the wakelock when video is paused. r=cpearce
Wakelock would automatically handle the lock/unlock by listening "hidden/visible", we
don't need to handle it in HTMLVideoElement.

MozReview-Commit-ID: AcOwR2nqm6L

--HG--
extra : rebase_source : 8f96b8cd908332be33ed3289dd288990da56c1c9
2017-08-29 15:25:57 +08:00
Alastor Wu 5aaf1c6ce7 Bug 1373888 - part5 : only request audio wake lock when it's audible. r=cpearce
No need to prevent sleeping for non-audible audio.

MozReview-Commit-ID: 6p3azSUWTU2

--HG--
extra : rebase_source : 89ff9d1753ac4a23269ec100920e18020ab5aafb
2017-08-29 15:25:44 +08:00
Alastor Wu 71ad2fdb83 Bug 1373888 - part2 : remove the timer which was used for b2g. r=cpearce
The timer was added for the b2g issue, now we can remove it.

MozReview-Commit-ID: BNjIghImCzC

--HG--
extra : rebase_source : c5490d417b2d40619eb7092dfc21b19a99982a1c
2017-08-29 10:54:25 +08:00
Alastor Wu f570c3c5ec Bug 1373888 - part1 : remove useless function. r=cpearce,smaug
These functions didn't be used by anyone, remove them.

MozReview-Commit-ID: BLj8GsVp1gR

--HG--
extra : rebase_source : 1b7eee86c62314401c2374a2979ba2a42fda2490
2017-08-29 10:54:18 +08:00
JW Wang f8f989dd93 Bug 1394313 - replace use of nsAutoPtr with UniquePtr in MediaDecoderOwner.h. r=cpearce
MozReview-Commit-ID: 49lyvMzg7oY

--HG--
extra : rebase_source : b83cd03b0026c73d0293ef937a3c2544349f464d
2017-08-28 14:10:35 +08:00
JW Wang c62c2c21b4 Bug 1392919. P3 - remove unused code and fix naming. r=gerald
MozReview-Commit-ID: 36PqGtOpAbf

--HG--
extra : rebase_source : 9ff9234f1f5db9151808d9a2ee33ced6d9e089c6
2017-08-23 14:42:25 +08:00
Chris Pearce fcd4613526 Bug 1390748 - Pre-declare MediaDecoder in HTMLMediaElement. r=jwwang
I noticed that touching MediaDecoder rebuilds a lot of seemingly unrelated
code. This is because HTMLMediaElement includes MediaDecoder.h, and
HTMLMediaElement is included in a number of places. Having HTMLMediaElement.h
predeclare rather than include fixes it.

MozReview-Commit-ID: I0vrPgqvvge

--HG--
extra : rebase_source : 505f9dce979aad0529b07d2c046dca5028af6de6
2017-08-15 17:09:06 +12:00
Carsten "Tomcat" Book 2b8080e2fc Backed out changeset 4a31e4302e03 (bug 1390748)
--HG--
extra : rebase_source : 9571466ebc151a9788a380008c5d8941e3e24665
2017-08-17 08:35:30 +02:00
Chris Pearce 60751f0b79 Bug 1390748 - Pre-declare MediaDecoder in HTMLMediaElement. r=jwwang
I noticed that touching MediaDecoder rebuilds a lot of seemingly unrelated
code. This is because HTMLMediaElement includes MediaDecoder.h, and
HTMLMediaElement is included in a number of places. Having HTMLMediaElement.h
predeclare rather than include fixes it.

MozReview-Commit-ID: I0vrPgqvvge

--HG--
extra : rebase_source : 505f9dce979aad0529b07d2c046dca5028af6de6
2017-08-15 17:09:06 +12:00
Phil Ringnalda 38ce1ea2a0 Backed out 10 changesets (bug 1390748) for build bustage
Backed out changeset 02b36ee5fb17 (bug 1390748)
Backed out changeset 84e8bf01c856 (bug 1390748)
Backed out changeset fc8989be30f3 (bug 1390748)
Backed out changeset 14d421ace6cc (bug 1390748)
Backed out changeset 7dadac869038 (bug 1390748)
Backed out changeset 0e77809e7bc2 (bug 1390748)
Backed out changeset bf78a8dce9c5 (bug 1390748)
Backed out changeset 5fa77990472e (bug 1390748)
Backed out changeset 5d3b637d2485 (bug 1390748)
Backed out changeset 634fe076d134 (bug 1390748)

MozReview-Commit-ID: Dxio8vXDCHg
2017-08-16 21:33:10 -07:00
Chris Pearce a0917579b4 Bug 1390748 - Pre-declare MediaDecoder in HTMLMediaElement. r=jwwang
I noticed that touching MediaDecoder rebuilds a lot of seemingly unrelated
code. This is because HTMLMediaElement includes MediaDecoder.h, and
HTMLMediaElement is included in a number of places. Having HTMLMediaElement.h
predeclare rather than include fixes it.

MozReview-Commit-ID: I0vrPgqvvge

--HG--
extra : rebase_source : 366d4e34e9c425b478b4c9058e27c9a32de36515
2017-08-15 17:09:06 +12:00
Matthew Gregan 3efbb6fca4 Bug 1388236 - Remove B2G-only AudioChannel code from HTMLMediaElement. r=jwwang 2017-08-10 13:00:08 +12:00
Matthew Gregan 2f8cc7804c Bug 1388236 - Remove B2G-only AudioChannel code from MSG. r=padenot 2017-08-10 13:00:08 +12:00
JW Wang 197591cec8 Bug 1384831. P2 - rewrite HTMLMediaElement::InitializeDecoderForChannel() and move HLSDecoder creation code to it. r=gerald
Since we will remove ChannelMediaDecoder from HLSDecoder's base class, we can't
create HLSDecoder in InstantiateDecoder which returns a ChannelMediaDecoder.

MozReview-Commit-ID: 9wcrIVIOZFp

--HG--
extra : rebase_source : cf0e55a6a0eafeb4e34ff1eed5bb7e1d97d73e80
extra : source : edefbf5d7179c5390bd2a25fbbcd025095d39555
2017-07-26 15:49:03 +08:00
Paul Adenot 757aef5fa0 Bug 1385305 - Change `CanBeCaptured` and friends so that they use explicit and self-explaining constants. r=jya
MozReview-Commit-ID: Hpuxlc8Ib5j

--HG--
extra : rebase_source : 3a15d350b8d296f3d6c3fb3419938cdcc01526c2
2017-07-28 17:53:12 +02:00
Gerald Squelart bc05f23ecc Bug 1383984 - Enable debugging HTMLMediaElement APIs with 'tabs' permission - r=jya,smaug
While "debugger" is not available yet, we can enable these debugging APIs for
extensions that have the "tabs" privilege, which includes the Media Panel
Devtools extension, so we/webdev will get better media-playback information.

MozReview-Commit-ID: I0MAZH9g0HU

--HG--
extra : rebase_source : 98c21147cb2da4f5f3f1c4dea9d3180b774f8c1a
2017-07-25 15:53:01 +12: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
JW Wang 51b253855d Bug 1376004. P1 - include http response code in the error.message field so the UI has more details to display a proper error message. r=cpearce
MozReview-Commit-ID: CHBXZZxfPc0

--HG--
extra : rebase_source : 004f5bb3552b8d2b8b3b911887037c78e7cb9e79
2017-07-14 15:17:32 +08:00
Bevis Tseng f051ae4a45 Bug 1341540 - Label runnables in dom/html/HTMLMediaElement.cpp. r=jwwang
MozReview-Commit-ID: 7i0MhGWoNPb

--HG--
extra : rebase_source : 577a231ac5ed3658311eacd19cd3fe912fdee0b0
2017-07-07 10:36:13 +08:00
Olli Pettay 21b0ca3bbf Bug 1378196, Make IsEventAttributeName non-virtual in common case, r=ehsan
--HG--
extra : rebase_source : 9daf46de13698348b7ab6b68f8da13ffb338c0a0
2017-07-04 23:54:30 +03:00
Paul Adenot d1a2003316 Bug 1371719 - Don't create a MediaStreamGraph without doing anything with it. r=jesup
The MediaStreamGraph relies on having at least one message sent to its message
queue on creation, or it will just sit there and do nothing, and block shutdown
because its not running its rendering loop, so it's not progressing in the
MediaStreamGraph life cycle state machine.

This patch makes sure the `captureStream` will succeed before creating an MSG.

MozReview-Commit-ID: CN1arWydmxC

--HG--
extra : rebase_source : b59a8ec4de17aa90d274819ea0c7d687673c8075
2017-06-28 15:19:39 -07:00
JW Wang 42e66521f5 Bug 1376227. P4 - remove the unused parameter from FinishDecoderSetup(). r=gerald
MozReview-Commit-ID: 7Ux811oMq9y

--HG--
extra : rebase_source : 82f058ad862daf93bc3c5bbb2dbc6a1b57757811
2017-06-23 15:25:40 +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
Mats Palmgren c3f48d9dd2 Bug 1374875 - Use simpler mutation observer than nsRange for media elements. r=cpearce
MozReview-Commit-ID: FVPdHC6tBXg
2017-06-23 02:03:08 +02: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
Kirk Steuber 99a80af5db Bug 1365092 - Move side effects of SetAttr, UnsetAttr, and ParseAttribute functions to BeforeSetAttr and AfterSetAttr r=bz
This is necessary to facilitate the transition to cloning attributes instead of reparsing them.

MozReview-Commit-ID: Gyd1tD6ldly

--HG--
extra : rebase_source : 777cfed750c95c448f953a6ec98026481997e227
2017-06-07 10:28:20 -07:00
Kirk Steuber e74f1cd513 Bug 1363481 - Add the old attribute value as a parameter to Element::AfterSetAttr r=bz
In order to facilitate the movement of code with side-effects called by Element::SetAttr to Element::BeforeSetAttr and Element::AfterSetAttr, Element::AfterSetAttr should have access to the old value of the attribute. This includes information about whether there was previously a value set or not.

Accomplishing this involved passing an additional argument through functions that find and change the old attribute value in order to ensure that we can differentiate between an empty old value and an absent old value (attribute was not set).

Note that while I tried to ensure that accurate values (and their absence) are reported to Element::AfterSetAttr, I largely ignored SVG. While the old value reported for SVG values should be however accurate the value already being reported to SetAttrAndNotify was, SVG elements do not currently report unset values properly because they will never pass a null pointer to SetAttrAndNotify.

MozReview-Commit-ID: K1mha8CNFZP

--HG--
extra : rebase_source : 42776eb01451d371e4aebcc17fe3dd112c8d268b
2017-05-18 14:09:01 -07:00
Chris Pearce 8be5473cac Bug 1362212 - Implement HTMLMediaElement.reportCanPlayTelemetry. r=gerald
Defer determining whether we have usable decoders to an off-main thread in
order to avoid janking the main thread.

MozReview-Commit-ID: Ape5zEBBMrz

--HG--
extra : rebase_source : 1b77046ebb7bb2d4ff1ba53afce904d3de45c335
2017-05-10 11:31:16 +12:00
Kirk Steuber 7fdb378650 Bug 1359556 - Optimize cloneNode by preinitializing attribute and child arrays r=bz
Currently, attribute and child arrays (implemented in dom/base/nsAttrAndChildArray.h) start out empty. When cloning, the array ends up being resized multiple times in order to add the attributes and children that are being cloned from the original node. This would be quicker if the array was initialized to the correct size in the first place so that resizes are not necessary.

However, preallocating space for children is only necessary when performing a deep clone. Therefore, an additional parameter is being added to the Clone, CopyInnerTo, and CloneDocHelper methods to indicate whether preallocation of children should happen. Attributes are copied either way, so that part of the array is preallocated in both cases.

MozReview-Commit-ID: 3iVezeAKXnI

--HG--
extra : rebase_source : 9c3deec6d7aafd6411044d623d4863637b45fd58
2017-04-20 12:57:48 -07:00
Kaku Kuo dab014bd99 Bug 1360123 P2 - move ConstructMediaTracks/RemoveMediaTracks to HTMLMediaElemnt; r=jwwang
MozReview-Commit-ID: 3S63JeXAX2w

--HG--
extra : rebase_source : ef807247a5042fa23ba6b6f5c907035bd8d64199
2017-04-18 15:43:55 +08:00
Alastor Wu c03792963c Bug 1358061 - remove moz-audiochannel codes for media element and web audio. r=baku
MozReview-Commit-ID: KPuhxCVezOZ

--HG--
extra : rebase_source : 74a9c9a9746d0add26f279c6dd5ddc30681be901
2017-04-26 12:02:32 +08:00
Phil Ringnalda 6b3d58414b Backed out changeset 6e7efb9115fd (bug 1358061) for build bustage
CLOSED TREE

MozReview-Commit-ID: F9FSciVgynw
2017-04-25 20:55:30 -07:00
Alastor Wu 222377e8ac Bug 1358061 - remove moz-audiochannel codes for media element and web audio. r=baku
MozReview-Commit-ID: BwZ6vHUPnSB

--HG--
extra : rebase_source : c92556cf92ff96b8014281396b28e1e232aa8576
2017-04-25 12:19:28 +08:00
JW Wang 433b4bb763 Bug 1348053 - add the UrgentStart flag to the channel when the loading is initiated by a user interaction for quicker network response. r=cpearce
MozReview-Commit-ID: 1tk9k8u1zTu

--HG--
extra : rebase_source : 349a518dd071f4c4b10a3853f7d42fe9a43f0804
extra : intermediate-source : 379f010a50f6a72d5429c530b1a24bfd1c9ed803
extra : source : cd10c3301c6da15e9bc87b956d8cc2c956acefaf
2017-04-10 15:23:11 +08:00
Kaku Kuo b06e8a5370 Bug 1344357 P1 - move the MediaDecoder::mSeekDOMPromise to HTMLMediaElement; r=jwwang
There was a cycle amoung a window object -> a HTMLMediaElement -> a MediaDecoder -> a Promise (-> back to the window object).
And we have no way to break the cycle since the MediaDecoder does not participate into the collection.

By moving the Promise form MediaDecoder to HTMLMediaElement, we will be able to break the cycle since the HTMLMediaElement is in the collection.

We'll implement the cycle collection in the next patch.

MozReview-Commit-ID: CyVXBl6IMI3

--HG--
extra : rebase_source : 195a322ce3e6fe933e72be4aec5d2ebfa1f54865
2017-04-17 18:25:26 +08:00
Kaku Kuo c4629a637d Bug 1349456 part 2 - mark elemet as tainted while captured via MozCaptureStream(); r=jwwang
MozReview-Commit-ID: 1V776bLuH43

--HG--
extra : rebase_source : 546587dc77dba4931788359a0a80507892594a7d
2017-03-22 14:46:09 +08:00
Kaku Kuo a2b8741937 Bug 1348432 - move the mMediaTracksConstructed flag back to MediaDecoder; r=jwwang
This mMediaTracksConstructed flag should belong to a MediaDecoder,
every time a HTMLMediaElement switches its MediaDecoder, the flag should be reset to false again.

So, we move the mMediaTracksConstructed flag back to MediaDecoder, by this way,
HTMLMediaElement provides only the mechanism to construct and remove media tracks,
and MediaDecoder uses the flag, mMediaTracksConstructed, to provide policy.

MozReview-Commit-ID: L7mMAmLjQCy

--HG--
extra : rebase_source : 1625d604afb34bffe79eda06a46c9feb780a14d9
2017-03-18 22:34:01 +08:00
Kaku Kuo 0d5f3a200f Bug 1347402 part 5 - create MediaElementGMPCrashHelper in HTMLMediaElement.cpp; r=cpearce,jwwang
Move the creation of MediaElementGMPCrashHelper out from MediaDecoder.cpp
which reduces the dependency of MediaDecoder to HTMLMediaElement.

MozReview-Commit-ID: E60aMfcFr7V

--HG--
extra : rebase_source : f50a8ee6f2fbec0bdf117eb1217066bc9c701745
extra : source : dd4e52da6d0d6205fe61d0caba44bbff008fd21a
2017-03-16 11:16:15 +08:00
Kaku Kuo b7fee84e84 Bug 1347402 part 4 - move ConstructMediaTracks/RemoveMediaTracks to HTMLMediaElemnt; r=jwwang
ConstructMediaTracks and RemoveMediaTracks are actually HTMLMediaElement's responsibilities.

MozReview-Commit-ID: 8lOdzD4pN7N

--HG--
extra : rebase_source : 7159d2c62b77429e5b2305b9e3eb7a0020a3b52c
extra : source : 0467c059be3cd8f066da5fc912b7738a5b9c4dd9
2017-03-15 17:33:21 +08:00
Kaku Kuo a71c156f34 Bug 1347402 part 2 - open a GetOwnerDoc() interface at the MediaDecoderOwner; r=jwwang
Open a GetOwnerDoc() method to the MediaDecoderOwner interface and then we can get the
owner document via a pointer to MediaDecoderOwner in MediaDecoder.

MozReview-Commit-ID: JCzQDLx1MsU

--HG--
extra : rebase_source : e194c95cb1513046ec7aa19d6c6e9f8231971a2d
extra : source : 1b9c45911a036e3677b6636cda84a636681d71de
2017-03-15 11:40:37 +08:00
Kaku Kuo 7f7c37e4b3 Bug 1347836 part 2 - make HTMLMediaElement::GetCurrentImage() return an already_AddRefed<layers::Image>; r=jwwang
MozReview-Commit-ID: FZ4JRdbPUry

--HG--
extra : rebase_source : 9d532e4bb55be8b9d83d120ee62a7b2f5e521efc
2017-03-16 17:07:04 +08:00
Kaku Kuo fbcb4f2d6f Bug 1346498 part 8 - extract the HTMLMediaElement::NotifyDecoderActivityChanges() method; r=jwwang
Move all the policy rules into this method now, will then move the policies into MediaDecoder at next patch.

MozReview-Commit-ID: ILAYLrTwCJy

--HG--
extra : rebase_source : 8ae3adcbbd8f2fd61f0da0de437f41f78d945c89
extra : source : feb8ad754e86b43e15bf2eeb3a2ba2dc24a00599
2017-03-11 18:25:41 +08:00
Kaku Kuo 2f5609af1a Bug 1345403 part 3 - Test element becomes tainted by DrawImage; r=jwwang,smaug
MozReview-Commit-ID: 9Txz4FbFtPe

--HG--
extra : rebase_source : eab599fdcbafa2fef60cc9951863727d8cc9c265
extra : intermediate-source : edc821a13b41fdfdae851e5fe2a8784795f248d9
extra : source : f540afdef527d1beb10a29c235f2e3b5637fc814
2017-03-08 20:22:05 +08:00
Kaku Kuo 93f2cee949 Bug 1345403 part 2 - Mark element tainted when DrawImage is used; r=jwwang,mattwoodrow
Mark video element as tainted (stored on the decoder owned by video element) when the video is used as source to drawImage() on canvas.

MozReview-Commit-ID: HdciVwhqPu3

--HG--
extra : rebase_source : 79e1bbdc671abb8555d68f7fb6106929c45fd528
extra : intermediate-source : 47fbcedbed69a5434b1cb25b8f72f862e9cefeac
extra : source : 149234329b62015dfd2e954030c23bf9c6b1d55e
2017-03-08 19:41:08 +08:00
Iris Hsiao bdff9504ef Backed out 5 changesets (bug 1345403) for permanent failure in autophone Mdm tests
Backed out changeset f6415ae0ba89 (bug 1345403)
Backed out changeset ac12e246a808 (bug 1345403)
Backed out changeset a3e4ce12194f (bug 1345403)
Backed out changeset ba072186c917 (bug 1345403)
Backed out changeset 7a7d6e9b8329 (bug 1345403)
2017-03-13 15:28:14 +08:00
Kaku Kuo 0759051af2 Bug 1345403 part 3 - Test element becomes tainted by DrawImage; r=jwwang,smaug
MozReview-Commit-ID: 9Txz4FbFtPe

--HG--
extra : rebase_source : 904462698bdcdd89dad05ab1631910ea3b9bf5d2
extra : source : f540afdef527d1beb10a29c235f2e3b5637fc814
2017-03-08 20:22:05 +08:00
Kaku Kuo fe566c1222 Bug 1345403 part 2 - Mark element tainted when DrawImage is used; r=jwwang,mattwoodrow
Mark video element as tainted (stored on the decoder owned by video element) when the video is used as source to drawImage() on canvas.

MozReview-Commit-ID: HdciVwhqPu3

--HG--
extra : rebase_source : b26c257afaaabdd6346a5421988d95e82281d7ef
extra : source : 149234329b62015dfd2e954030c23bf9c6b1d55e
2017-03-08 19:41:08 +08:00
JW Wang 3c60a97e1f Bug 1343458 - Label runnables in dom/media/VideoFrameContainer.cpp. r=cpearce
MozReview-Commit-ID: D0QTbA4UwAZ

--HG--
extra : rebase_source : fa35324fc7e37b54f05f1ddb864a19c51a6cbec9
extra : intermediate-source : e48b7e6127698005749086d8ee9d94ec4fb39ae6
extra : source : 6b8a2a5d9984828d60b2777b2fa5f305340e3219
2017-03-01 14:49:37 +08:00
karo 3c2b014e09 Bug 1343409 - HTMLMediaElement::MozRequestDebugInfo returns EMEInfo. r=cpearce
MozReview-Commit-ID: 1iQP3OJmwdP

--HG--
extra : rebase_source : 171155ab5e58cac8cc9db9109a5c2fc88b1930d3
2017-03-01 12:56:29 +13:00