The MoofParser didn't have logging on its normal code paths. This patch
implements such logging, covering entry and exit to many functions. Such verbose
logs are helpful for diagnosing failures and the specific file structure leading
to such failures. This should help improve our debugging experience if we can
get logs from end users which is particularly useful for cases where they can't
provide us with media due to geoblocking/proprietary media issues.
Differential Revision: https://phabricator.services.mozilla.com/D19021
--HG--
extra : moz-landing-system : lando
- Use different log levels in MoofParser. Generally Error is used for out of
memory, while warnings are used for bad mp4s.
- Add some new logs for parsing sample description entries.
- Add logs for when we can't find a Moof or fail to read a Moov.
- Have logs be more specific for the Box they're in where possible rather than
just log 'Moof'. E.g., when parsing the stsd box, we now log against that box,
not 'Moof'.
- Log instead of asserting if we're given multiple encrypted sample description
entries. This is valid per the spec, and can happen (though we don't expect
it), so we shouldn't assert.
Differential Revision: https://phabricator.services.mozilla.com/D19020
--HG--
extra : moz-landing-system : lando
From the following table, we can know the feature policy have no any effect for the autoplay result.
That is, if the document has been gesture activated, we want to playback, regardless of the status of the feature policy.
If the site has denied autoplay permission via feature policy, if the user gesture activates (clicks play) we still want to be able to play.
Therefore, we can remove `feature-policy` checking.
| gesture activated | autoplay feature policy status | allowed to play |
|-------------------|--------------------------------|-----------------|
| activated | allowed | true |
| not activated | not allowed | false |
| activated | not allowed | true |
| not activated | allowed | false |
Differential Revision: https://phabricator.services.mozilla.com/D18098
--HG--
extra : moz-landing-system : lando
Replacing js and text occurences of asyncOpen2
Replacing open2 with open
Differential Revision: https://phabricator.services.mozilla.com/D16885
--HG--
rename : layout/style/test/test_asyncopen2.html => layout/style/test/test_asyncopen.html
extra : moz-landing-system : lando
Similar to what we do for H264 and for vp9 in webm, we parse the VP9 bytestream and check if a frame is a keyframe there instead.
Differential Revision: https://phabricator.services.mozilla.com/D18790
--HG--
extra : moz-landing-system : lando
VideoInfo.mImageRect is typically only used for VP8/VP9 content, however the Windows decoder use a common code between H264 and VP8/VP9 decoding and use this data to determine the image size. So we end up with conflicting image size and image rect (which contains cropping data).
Differential Revision: https://phabricator.services.mozilla.com/D18976
--HG--
extra : moz-landing-system : lando
This patch would try to start a blocked AudioContext when it creates a MediaStreamAudioSourceNode which has an active input stream or when a node's inactive stream becomes active, which means someone is feeding input data to AudioContext.
Therefore, we can do the similar thing like what we did for AudioScheduledSourceNode and MediaElementAudioSourceNode, to start AudioContext if current autoplay policy has allowed AudioContext to start.
Differential Revision: https://phabricator.services.mozilla.com/D18576
--HG--
extra : moz-landing-system : lando
For cases where the class has direct calls (that is, we cast `this` to the
subclass before making the call) no longer declare Recv/Answer methods on the
base class at all. This should ensure that slots for them are not generated in
vtables, and also allow the derived class to choose the method signature (e.g.
whether it wants to take something by reference or by value).
Differential Revision: https://phabricator.services.mozilla.com/D18132
--HG--
extra : moz-landing-system : lando
For cases where the class has direct calls (that is, we cast `this` to the
subclass before making the call) no longer declare Alloc/Dealloc methods on the
base class at all. This should ensure that slots for them are not generated in
vtables, and also allow the derived class to choose the method signature (e.g.
whether it wants to take something by reference or by value).
Differential Revision: https://phabricator.services.mozilla.com/D18131
--HG--
extra : moz-landing-system : lando
When calling a Recv/Alloc/Dealloc method on most types, cast `this` to the
derived class.
There is a heuristic to figure out what the correct derived type is. There is a
blacklist of types which we can't do direct calls on for the moment, as well as
an override for types that do work with direct calls but which don't match the
heuristic.
Differential Revision: https://phabricator.services.mozilla.com/D16492
--HG--
extra : moz-landing-system : lando
Check that we can resume after appening a partial media segment header and calling abort().
Depends on D18651
Differential Revision: https://phabricator.services.mozilla.com/D18762
--HG--
extra : moz-landing-system : lando
The helper stream which is created by the AudioParam can't be directly got from the AudioNode, which means that we can't suspend/resume all streams related with the AudioNode.
Therefore, we should also append these streams when AudioContext requires all streams.
Differential Revision: https://phabricator.services.mozilla.com/D18296
--HG--
extra : moz-landing-system : lando
In order to enable asynchronous launch, destruction of
GeckoChildProcessHost (and its subclasses) has to be delayed until after
launching (or anything else that might be made asynchronous in the
future) has completed, to prevent use-after-free. However, there are
other dependencies on process hosts always being destroyed on the I/O
thread, so refcounting would be difficult to use.
Instead, GeckoChildProcessHost now may not be destroyed directly, but
must go through a method that handles the scheduling.
There are also some minor cleanups to the affected headers (removed
duplicate access modifiers, and made PluginProcessParent final).
Depends on D18010
Differential Revision: https://phabricator.services.mozilla.com/D18011
--HG--
extra : moz-landing-system : lando
The logic was redundant with the next step that will already remove all until the next keyframe.
Depends on D18321
Differential Revision: https://phabricator.services.mozilla.com/D18322
--HG--
extra : moz-landing-system : lando
Per spec:
https://w3c.github.io/media-source/#sourcebuffer-coded-frame-removal
Step 3 of the Coded Frame Removal Interval:
"Remove all media data, from this track buffer, that contain starting timestamps greater than or equal to start and less than the remove end timestamp. "
So to decide if a frame should be removed from a track buffer, its start time is the only information to be used.
Differential Revision: https://phabricator.services.mozilla.com/D18321
--HG--
extra : moz-landing-system : lando
Using a variant more clearly indicates how MoofParser works: you cannot request
a specific track id and to parse all tracks. Callers must now explicitly select
one or the other.
Differential Revision: https://phabricator.services.mozilla.com/D18135
--HG--
extra : moz-landing-system : lando
Refcounted objects should be put into refptrs when they are created.
This patch also moves the crash helper out of the object early in
Init, to maybe reduce the chance of a leak if it fails early.
This field is only used to pass in a value to the Init() method. It
can't be passed in directly because on Android there are two
implementations of CDMProxy, and MediaDrmCDMProxy doesn't take a crash
helper.
Differential Revision: https://phabricator.services.mozilla.com/D17707
--HG--
extra : moz-landing-system : lando
This field is only used to pass a pointer from the ctor to the Init()
method. Instead, just pass in the crash helper directly.
This avoids some problems with the existing code where the crash
helper is not AddRefed immediately after creation, which could lead to
leaks in some error cases.
Differential Revision: https://phabricator.services.mozilla.com/D17707
--HG--
extra : moz-landing-system : lando
Clang 7 was making the pow => exp2 optimization for us, and for some reason clang 8 stopped doing so. This resulted in a surprisingly large regression in raptor numbers.
Differential Revision: https://phabricator.services.mozilla.com/D18148
--HG--
extra : moz-landing-system : lando
There's a strong cycle of references between SamplesWaitingForKey and
CDMProxy that does not get cleared unless keys actually come in. This
causes a leak. One way to avoid that leak is to clear the proxy
reference when the things holding the SamplesWaitingForKey is shut
down.
Differential Revision: https://phabricator.services.mozilla.com/D17960
--HG--
extra : moz-landing-system : lando
We reenable the corresponding tests unconditionally because we don't run
tests on the msvc builds anyways (and they're going to be retired soon).
Differential Revision: https://phabricator.services.mozilla.com/D18028
--HG--
extra : moz-landing-system : lando