Add logging to aid in debugging of our EME ADTS conversion path.
MozReview-Commit-ID: A7Wv8n31V8V
--HG--
extra : rebase_source : 13f20179aa29180047a37a127029d0e28a1c4f80
Update EMEDecoderModule to use 2 as profile number when the given profile is
less than 1 or greater than 4. The CDM doesn't appear to care what values are
given, but 2 was chosen as a safe fallback per discussion on the bug. This
addresses the use case where 0 values are stored in mProfile due to the use of
extended profiles (which are then stored in the mExtendedProfile field).
MozReview-Commit-ID: 5XgabNDsgdf
--HG--
extra : rebase_source : dd66a872aaac2acf4af55f06d3c24f53debe4e63
Apple layout standard has a 1:1 equivalence with the WAVE standard. As such, any streams under 18 channels, properly defining a channel layout, should play on all platform.
Otherwise, as Opus and Vorbis, the result will be platform dependent.
MozReview-Commit-ID: ID6b9u2UNQr
Under 8 channels, the audio will be reordered so it can be playable on any platforms.
Over 8 channels, the channels will be as output by the decoder. Playing of such stream will be platform dependent as neither Opus nor Vorbis define a channel layout with more than 8 channels.
With WebAudio however, the result will be platform independent (as long as you don't attempt to play it)
MozReview-Commit-ID: 93ATiKm9y20
This makes it for future easier conversion for the FFmpeg and Windows WMF decoder, so that we can use their channel map directly.
Also introduce a difference between 2F2 and QUAD, cubeb supports will be added in a future change.
MozReview-Commit-ID: L5NkjeuGslI
The logging added in this patch was landed to help debug very rare shutdown
failures on android, but the logging runs on other platforms and is annoying.
No one is looking at fixing the rare shutdown problem on Android. So remove the
logging until fixing the shutdown failure becomes a priority.
FFVPXRuntimeLinker could not handle file paths that contain characters outside the current system code page on Windows. This patch will fix it by using wide char APIs.
MozReview-Commit-ID: 9ES1xFELjDs
--HG--
extra : rebase_source : 4bdc082bd6db9263b41fe74d524e0a4d98802ea8
extra : intermediate-source : 8afa22df3893c678884e3a0811fb6c82790c1a3c
extra : source : c6f916a967a78e176bdb699a85e194bbdc372bce
We've had reports from a partner that their EME content is failing after a
seek. This is caused by decrypting EME content too fast after a seek triggering
bug 1338924. So we need to make our decryption less "bursty". So adjust our
decrypt throttling to instead throttle the decrypt to 200ms of content every
100ms of wall-clock-time, rather than 2s of content every 1s of
wall-clock-time. This makes us decode more smoothly, and appears to resolve the
issue with the partner stream.
MozReview-Commit-ID: 1nNuTJrreN
--HG--
extra : rebase_source : 3c2c9529a5493b30db1214bba782243be509b56a
It is necessary to provide the AAC's magic cookie to the decoder for some files (such as ambisonics or quad-stereo). We already do so for the Windows and FFmpeg decoder.
It's another case of how did it work before really.
MozReview-Commit-ID: sOtY1sPeBU
--HG--
extra : rebase_source : 4d7d7d18aa878f20238f48ee17cd8dfc267356fc
https://msdn.microsoft.com/en-us/library/windows/desktop/dd797815(v=vs.85).aspx
Relax the resolution limitation from "width <= 4096 and height <= 2304" to "any width and height combination as long as the total pixel count is under 4096x2304".
MozReview-Commit-ID: 5wHiJfLaJkp
--HG--
extra : rebase_source : 11bf99d0eb3b50ea0199a7f65e0491e43318d29c
Mostly-mechanical replacement of MOZ_LOG with DDMOZ_LOG, usually just removing
the class name and `this` pointer (as they are already implicitly recorded).
Some files needed a bit more work when logging was done from helper classes or
static functions.
MozReview-Commit-ID: IeJJmzYqWMQ
--HG--
extra : rebase_source : 94200838dcdaf6c3bda9de30042ce2d307237eef
Mostly-mechanical additions:
- Log constructions&destructions, usually by just inheriting from
DecoderDoctorLifeLogger, otherwise with explicit log commands (for internal
classes for which DecoderDoctorTraits can't be specialized),
- Log links between most objects, e.g.: Media element -> decoder -> state
machine -> reader -> demuxer -> resource, etc.
And logging some important properties and events (JS events, duration change,
frames being decoded, etc.)
More will be added later on, from just converting MOZ_LOGs, and as needed.
MozReview-Commit-ID: KgNhHSz35t0
--HG--
extra : rebase_source : dd7206e350e32671adc6f3b9e54ebf777251de2c
There's little advantage over using NV12 and using YUV420 allows for easier and faster frame copy. We assume of course that Apple's VideoToolbox have more optimized code than we do.
MozReview-Commit-ID: IjvepxW3OZI
--HG--
extra : rebase_source : 089f5a63c4871366aed8f0c0ef3ef6bd3c2d0a0f
High resolution, high framerate was disabled by default on old AMD cards on the provisio that it was bad. But this assumes that the CPU decoder could do it better.
This assumption appears fragile at best, as CPU with those old adapter are likely to be old and underpower to start with.
Chrome doesn't appear to restrict use of those cards to a given resolution.
So we disable this restriction, while making it user configurable.
MozReview-Commit-ID: HhADHNR0FdJ
--HG--
extra : rebase_source : ece39cd9b84c6e372d1002ee12e72523cee3d04d
We have already early returned by checking nalLenSize == 4. So there is no need to check it again, delete the deadcode.
MozReview-Commit-ID: GEcPGHDslON
--HG--
extra : rebase_source : 78102d946499f5908d7cb20c7bc148cb2fc87821
The VP9 decoder following a flush will often return MF_E_NOTACCEPTING. Attempting to request an output would cause the error MF_E_TRANSFORM_NEED_MORE_INPUT to be returned. We can simply feed the decoder with the compressed sample.
MozReview-Commit-ID: GUNniZsOKWr
--HG--
extra : rebase_source : 047a0d4dbea16e6f3d7e2269432ed3a591387dbe
The DXVA decoder might hit some error because of the hardware device status.
This patch try to pass the error code to the decoder promise object to
deal with the error.
MozReview-Commit-ID: IAj8gzKGF3j
Update to upstream commit id e87fb2378f01103d5d6e477a4ef6892dc714e614
from a couple of weeks ago to pick up changes.
MozReview-Commit-ID: H7H69A7qFXD
--HG--
extra : rebase_source : dee676da15b65e4eea612d20529c4fb312bbddfb
Using flag PR_LD_LOCAL causes PR_LoadLibraryWithFlags to fail, and there should be no difference with PR_LD_GLOBAL anyway on Android.
MozReview-Commit-ID: DAduV8yg8Sx
--HG--
extra : rebase_source : 83f28e6b74dcc7d58bf780ad1451153c4c447a0a
The behaviour of the system decoder is unpredictable.
MozReview-Commit-ID: FubvCm0xyiL
--HG--
extra : rebase_source : 4ac49f1c6fc575e361520598de413f7439a05d0e
Android audio backend only supports S16 audio sample, so configure ffmpeg audio decoder to output 16 bits audio by default. Adding format conversions as necessary.
MozReview-Commit-ID: J6N4rbMZ3Ug
--HG--
extra : rebase_source : 7a8a72a7e9cd3dde2c8659d363875c6d5072b6b2
In AppleCMLinker.cpp, Logging.h and PlatformDecoderModule.h are needed for the LOG macro.
In AppleATDecoder.cpp VideoUtils.h is needed because FramesToTimeUnit() is called in ::DecodeSample().
MozReview-Commit-ID: 2guOwAsYJF1
--HG--
extra : amend_source : e1e98650060f8946361823b5e634d5bf51709a0f
It is unknown if an av_parser is usable after having been drained. So to be certain, we simply tear it down and re-create it.
MozReview-Commit-ID: 6NFMHbRMwxs
--HG--
extra : rebase_source : c31db990ef04ec2586d965b9a08be47532bd87a2
Per FFmpeg documentation: to signal EOF to the av_parser, input length should be 0 (so that the last frame can be output).
MozReview-Commit-ID: F22RcRnT3HS
--HG--
extra : rebase_source : f704e33526347244d38d1ab0b7fa1e5a0cda84cb
Capturing |this| only if |self| needs to appear more than twice in a lambda.
MozReview-Commit-ID: 38iYDznjgBH
--HG--
extra : rebase_source : 9471fd4519c5c5be6e6e10eb11db8eeb041327d1
According to FFmpeg documentation, the out parameter is "set to size of parsed buffer or zero if not yet finished. " however this is only the case if no error occurred; otherwise it is left untouched.
We want the invalid content to generate a decoding error, so we set size to inputSize to ensure decoding failed later.
MozReview-Commit-ID: FZeiZUdUtLG
--HG--
extra : rebase_source : 2e81d730bacaea5bb968f704a36b403117dafcba
Adding partial support for 10/12-bit video images seems to have
broken the native pixel-stride support we were using to pass
8-bit AV1 frame data formatted in 16-bit pixel values, resulting
in vertical green lines.
Revert to the earlier behaviour of always downsampling to 8 bit data.
This is slower for the demo stream, but at least displays correctly.
MozReview-Commit-ID: 8kSd9kph9DE
--HG--
extra : rebase_source : 040795b4d99a2001397c0021f34d39535aa4aa2d
Windows 10 Falls Creator Update build 16287 is known to have the fix to the problem that made bug 1403063 necessary.
MozReview-Commit-ID: 5m3ZWMes1yl
--HG--
extra : rebase_source : 5f6cd508de75f7e315f4334f76d64b389e4f2ce3
This allows for decoding VP9 profile 2 and 3.
At this stage, it is not possible to render the decoded frames.
MozReview-Commit-ID: DFXMvaM8Ynb
--HG--
extra : rebase_source : e17f24a00595461910f6d0cbd8ef4ba25453e8c5