Commit Graph
541 Commits
Author SHA1 Message Date
Jean-Yves Avenard 3065d54dcf Bug 1396629 - P5. Show container type in debug info. r=cpearce
MozReview-Commit-ID: 3olXuGeqqoS
2017-09-04 22:47:36 +02:00
Jean-Yves Avenard 278692ecb6 Bug 1396515: Fix incorrect && and || operator placements. r=sylvestre
Includes some side 80 columns fix.

MozReview-Commit-ID: IXRoQfM0Hjc
2017-09-04 11:27:43 +02:00
Kilik Kuo 0721258413 Bug 1393336 - Remove WaitForCDM state from MDSM. r=jwwang,jya
MozReview-Commit-ID: 7XofvBZTerH
2017-08-25 17:11:14 +08:00
JW Wang f9eb250d3c Bug 1393386. P1 - make PinForSeek/UnpinForSeek pure virtual. r=gerald
Sub-classes should know how to pin/unpin the resource.

MozReview-Commit-ID: 50S8oSD5oEU
2017-08-24 18:08:37 +08:00
JW Wang 276f246c61 Bug 1394313 - replace use of nsAutoPtr with UniquePtr in MediaDecoderOwner.h. r=cpearce
MozReview-Commit-ID: 49lyvMzg7oY
2017-08-28 14:10:35 +08:00
JW Wang 6ab5ab1239 Bug 1393379. P1 - make MediaDecoder::AddSizeOfResources pure virtual. r=gerald
We will move the implementation to sub-classes which have more details
about how to calculate the resource size.

MozReview-Commit-ID: 7lfiz5GNtPE
2017-08-24 17:35:24 +08:00
JW Wang d0a6e1b38f Bug 1393369. P1 - virtualize MediaDecoder::GetCurrentPrincipal() so the sub-classes know how to calculate the current principal. r=gerald
MozReview-Commit-ID: EOUtPE4hfgO
2017-08-24 16:58:06 +08:00
JW Wang 594c13c05c Bug 1393346. P2 - move IsTransportSeekable() from MediaResource to BaseMediaResource. r=gerald
MozReview-Commit-ID: KqpzIRH31gz
2017-08-24 00:08:41 +08:00
JW Wang a62e08b443 Bug 1393346. P1 - virtualize IsTransportSeekable(). r=gerald
MozReview-Commit-ID: LIwEEbH3tBT
2017-08-24 00:06:23 +08:00
JW Wang 7f2e81ee65 Bug 1392919. P3 - remove unused code and fix naming. r=gerald
MozReview-Commit-ID: 36PqGtOpAbf
2017-08-23 14:42:25 +08:00
JW Wang b46d455646 Bug 1391142. P3 - remove IsLiveStream() from MediaResource. r=gerald
MozReview-Commit-ID: DBFrYfj2lGB
2017-08-17 15:20:40 +08:00
JW Wang 28ca47cd53 Bug 1391142. P2 - remove MDSM::mResource and related functions. r=gerald
MozReview-Commit-ID: 4od7b8YNrMh
2017-08-17 11:52:29 +08:00
JW Wang 5f8a9ac4d1 Bug 1391142. P1 - dispatch IsLiveStream changes from MediaDecoder to MDSM. r=gerald
This allows us to remove the dependency on MediaResource from MDSM in P2.

MozReview-Commit-ID: I46fWXfnGQK
2017-08-17 11:48:08 +08:00
Chris Pearce e6cdee1de3 Bug 1390748 - Create default MediaDecoder::GetMozDebugReaderData() implementation. r=jwwang
We have three implementations, in the MP4, WebM and MediaSource decoders.  The
WebM and MP4 are the same. Ogg and other decoders don't have an implementation,
but if we create a default implementation in MediaDecoder, they'll get it for
free. MediaSourceDecoder needs a custom override still.

MozReview-Commit-ID: AXxn2Xhn0Jn
2017-08-15 17:07:13 +12:00
Carsten "Tomcat" Book a2adbb8be1 Backed out changeset 2964dba33ef8 (bug 1390748) 2017-08-17 08:35:33 +02:00
Chris Pearce 2e1d7486d9 Bug 1390748 - Create default MediaDecoder::GetMozDebugReaderData() implementation. r=jwwang
We have three implementations, in the MP4, WebM and MediaSource decoders.  The
WebM and MP4 are the same. Ogg and other decoders don't have an implementation,
but if we create a default implementation in MediaDecoder, they'll get it for
free. MediaSourceDecoder needs a custom override still.

MozReview-Commit-ID: AXxn2Xhn0Jn
2017-08-15 17:07:13 +12:00
Phil Ringnalda 34d25d405e 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 bb221a96ba Bug 1390748 - Create default MediaDecoder::GetMozDebugReaderData() implementation. r=jwwang
We have three implementations, in the MP4, WebM and MediaSource decoders.  The
WebM and MP4 are the same. Ogg and other decoders don't have an implementation,
but if we create a default implementation in MediaDecoder, they'll get it for
free. MediaSourceDecoder needs a custom override still.

MozReview-Commit-ID: AXxn2Xhn0Jn
2017-08-15 17:07:13 +12:00
Sebastian Hengst c7240206e3 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-08-10 17:41:11 +02:00
JW Wang 0e1d6f3f47 Bug 1388612. P2 - remove the call to NotifySuspendedStatusChanged() in MediaDecoder::FirstFrameLoaded(). r=gerald
Following P1, cache suspend status changes will be notified when necessary.
If not, it would be a bug that should be fixed. We shouldn't wallpaper the
issue by calling NotifySuspendedStatusChanged() manually.

MozReview-Commit-ID: 9EbybTiOOIO
2017-08-09 16:13:51 +08:00
JW Wang 133ce481a6 Bug 1388612. P1 - remove MediaResource::EnsureCacheUpToDate(). r=gerald
This is a workaround to fix bug 687972. It should be OK now to remove
it since we have fix bug 1108960  where MediaCache failed to run the
update loop to update the suspend status of the stream.

MozReview-Commit-ID: MbInehhScs
2017-08-09 16:07:53 +08:00
Matthew Gregan 2a28c36ef9 Bug 1388236 - Remove B2G-only AudioChannel code from media playback. r=jwwang 2017-08-10 13:00:07 +12:00
JW Wang f0e3b60298 Bug 1388228. P6 - following P5, we are now able to move some methods that are related to nsIChannel to BaseMediaResource. r=gerald
So we reduce the number of unimplemented methods in the sub-classes of MediaResource.

MozReview-Commit-ID: EAmUEv9WQk8
2017-08-07 18:09:56 +08:00
JW Wang 0b9a37ac78 Bug 1388228. P5 - move some more members to ChannelMediaDecoder. r=gerald
Those members only make sense for ChannelMediaResource.

MozReview-Commit-ID: 2z6WPQeJnIT
2017-08-07 13:23:43 +08:00
JW Wang 9e86d0ad53 Bug 1388228. P4 - move the implementation of MediaDecoder::CanPlayThroughImpl() down to ChannelMediaDecoder. r=gerald
Because GetStatistics() only makes sense for ChannelMediaResource.

MozReview-Commit-ID: HkEpb4frUx1
2017-08-07 11:48:43 +08:00
JW Wang efabf428f3 Bug 1388228. P3 - following P2, we can now remove unused code and canonicals. r=gerald
Note we remove the log in BufferingState::Enter() which prevents us from
removing ChannelMediaResource related code from MDSM. We can add it back
in the future after the refactoring.

MozReview-Commit-ID: B94iOI0bTXC
2017-08-04 17:56:28 +08:00
JW Wang e10067c40c Bug 1388228. P2 - cache the result of CanPlayThrough() and mirror it to MDSM. r=gerald
So we don't duplicate the code of calculating CanPlayThrough from
download rate and playback rate in MediaDecoder.

MozReview-Commit-ID: 7M5JAuUxFFc
2017-08-04 17:38:20 +08:00
JW Wang cfc61a1635 Bug 1388228. P1 - move some members to ChannelMediaDecoder. r=gerald
These members are used only by ChannelMediaDecoder.

MozReview-Commit-ID: 10CHV1sjY9k
2017-08-04 16:02:40 +08:00
Wes Kocher 6dca491247 Merge m-c to autoland, a=merge
MozReview-Commit-ID: CxCNV7W0utC
2017-08-07 15:26:40 -07:00
JerryShih 4e06f4cefc Bug 1357299 - P5: Pass KnowsCompositor instead of ShadowForwarder to media decoder. v2. r=nical
If we use WebRender, there is no ShadowForwarder with this configuration.
So, use the AsKnowsCompositor() instead.

MozReview-Commit-ID: KMcfdwySKDL
2017-08-07 18:15:22 +08:00
Sebastian Hengst a8245ca35f merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JhesEg4Bxjy
2017-08-04 19:28:27 +02:00
Bill McCloskey 969eb187fa Bug 1364821 - Introduce AbstractThread::AutoEnter and remove main thread's AbstractThread::GetCurrent() (r=jwwang)
MozReview-Commit-ID: FSLVn7xe3sq
2017-08-03 14:19:02 -07:00
JW Wang 4e9f9df9b4 Bug 1387702 - be sure to enter the AbstractThread context for state-mirroring to be usable. r=billm
MozReview-Commit-ID: 3kML9KVr01g
2017-08-07 10:54:17 +08:00
JW Wang b895b9af09 Bug 1386956. P3 - move the call to UnpinForSeek() from ~MediaDecoder() to Shutdown(). r=gerald
It is bad to call a virtual function (UnpinForSeek() -> GetResource()) in the destructor.

MozReview-Commit-ID: Db5pOHjhmQZ
2017-08-04 09:46:44 +08:00
JW Wang 8b086db5d2 Bug 1386956. P1 - replace use of mResource with GetResource() for we will move mResource to sub-classes. r=gerald
MozReview-Commit-ID: I90Xvy4u5Fd
2017-08-03 14:52:18 +08:00
JW Wang 6644dbad75 Bug 1385699. P4 - MediaDecoder::mExplicitDuration doesn't need to be a canonical anymore. r=cpearce
MozReview-Commit-ID: 4FUwQRS2K1m
2017-08-01 15:06:13 +08:00
JW Wang 07f6b2ed41 Bug 1385699. P3 - remove MediaDecoder::SetInfinite() and related code. r=cpearce
Since inf can be encoded in MDSM::mDuration, we don't need an additional flag
in MediaDecoder to indicate 'infinite' anymore. Note duration change from infinite
to finite is handled by MDSM, so we can remove the explicit calls to SetInfinite(false).

MozReview-Commit-ID: EoxwZJzPAJl
2017-08-01 14:15:29 +08:00
JW Wang 188632754d Bug 1385748. P3 - MediaDecoder::mNextState doesn't need to be a canonical for it has no mirrors. r=kaku
MozReview-Commit-ID: HiiPcKK08az
2017-07-31 10:21:43 +08:00
Kaku Kuo 0decfcfccc Bug 1383653 P1 - add debug messages for understanding the status of suspending video decoder; r=jwwang
MozReview-Commit-ID: 2pI6XRQQgbG
2017-07-24 13:21:35 +08:00
JW Wang c2e3f00362 Bug 1382557 - the duration should be finite when we can get one from the metadata. r=cpearce
This fixes the case where ChannelMediaResource::OnStartRequest() calls
mCallback->SetInfinite(true) to report an infinite duration, yet later
we get another duratoin from the metadata.

http://searchfox.org/mozilla-central/rev/8a61c71153a79cda2e1ae7d477564347c607cc5f/dom/media/MediaDecoder.cpp#1179-1185
Note IsInfinite() is checked before other duration sources. We need to call
SetInfinite(false) on the MediaDecoder so we can get the correct duration.

MozReview-Commit-ID: 3BlFNJzlgXo
2017-07-25 14:34:59 +08:00
JW Wang cbd526e0d5 Bug 1378295. P5 - remove AbstractMediaDecoder from MediaDecoder's base class. r=jya
MozReview-Commit-ID: lIAT21YMRR
2017-07-13 17:38:06 +08:00
Alastor Wu b6a34212ba Bug 1274919 - part3 : only send msg if someone is waiting for it. r=jwwang,mikedeboer
Only send the msg "Browser:UnselectedTabHover" when someone requests for the
msg, it can reduce non-necessary communication.

MozReview-Commit-ID: 2mBUMB4AMVo
2017-07-20 15:11:25 +08:00
Alastor Wu f57c1b00a7 Bug 1274919 - part2 : implement resume/suspend mechanism in MediaDecoder. r=jwwang
Create the new class "BackgroundVideoDecodingPermissionObserver" to handle the
suspended request sent from the front end side.

We would do registration on startup and deregistration on shutdown of MediaDecoder.

MozReview-Commit-ID: 1UwHA7YuVN3
2017-07-20 14:13:37 +08:00
JW Wang 364a0ea986 Bug 1316211. P13 - replace use of MediaDecoderReader with MediaFormatReader. r=gerald
We will remove MediaDecoderReader in the future.

MozReview-Commit-ID: BaCRXleKK5a
2017-07-19 17:01:32 +08:00
Jean-Yves Avenard 7e51fedec4 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
2017-07-13 12:54:03 +02:00
JW Wang 9bc8fd8bdd 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
2017-07-18 16:36:01 +08:00
JW Wang 3f6413a6f5 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
2017-07-13 15:02:06 +08:00
JW Wang 3759f8dadf 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
2017-07-13 14:49:23 +08:00
JW Wang 1e8feb20ab Bug 1380545 - remove DispatchKeyNeededEvent from MediaFormatReader.cpp. r=gerald
We will use MediaEventSource to dispatch the 'encrypted' events.

MozReview-Commit-ID: KY3nS9OrysI
2017-07-13 11:18:07 +08:00
JW Wang 4d34934d06 Bug 1380532. P2 - remove AbstractMediaDecoder::GetCrashHelper(). r=gerald
MozReview-Commit-ID: IDPifgdxwTd
2017-07-13 10:21:34 +08:00