Commit Graph
470 Commits
Author SHA1 Message Date
Alastor Wu aa3bb873a8 Bug 1403832 - part1 : replace Error.Code() with Error.ErrorName(). r=jya
Use ErrorName() as it provides more useful information for the error detail.

MozReview-Commit-ID: BQUPQGcLd8L
2017-09-29 00:37:45 +08:00
Jean-Yves Avenard 4d7b4b662f Bug 1403129 - Don't cache decoder's description. r=gerald
MozReview-Commit-ID: 5ULVmUWUBGk
2017-09-26 15:26:34 +02:00
Alastor Wu 3c868e042f Bug 1402206 - print error name for MediaFormatReader::OnSeekFailed(). r=jya
Print error code couldn't effectively help people understand the reason of error, we should print its name.

MozReview-Commit-ID: KaBTi8zpq91
2017-09-22 16:23:08 +08:00
Kaku Kuo 61f6ec1765 Bug 1401902 - we should use MediaDataDecoder's address as an ID instead of MFR::DecoderData's address;r=gerald
We misused MFR::DecoderData's address as an identity in bug 1393399 but our intention was MediaDataDecoder's address.

We report telemetry data when we get the 1st decoded frame from a new MediaDataDecoder, which is identified by its address.

If we misuse the MFR::DecoderData's address as identity, it will take longer than we expect since only when
the MFR is recreated will we get a new MFR::DecoderData.

MozReview-Commit-ID: HOf5hTSoBed
2017-09-21 18:02:30 +08:00
Jean-Yves Avenard b7d8f106b0 Bug 1401922 - P1. Ensure an error is returned when no decoder could be created. r=alwu
PDMFactory::CreateDecoder may not always modify CreateDecoderParams::mError as not all PDM handle this optional return value.

MozReview-Commit-ID: K8WFA0o778U
2017-09-21 13:25:05 +02:00
Jean-Yves Avenard fa5dd54cf3 Bug 1400614 - P2. Change string output content. r=gerald
Doesn't look as nice as I had hoped.

MozReview-Commit-ID: 6GAXsVKC2sQ
2017-09-17 09:56:38 +02:00
Jean-Yves Avenard a8489f03ce Bug 1400614 - P1. Handle case where we have no video track. r=gerald
MozReview-Commit-ID: KcHMH3pOouc
2017-09-17 00:57:17 +02:00
Jean-Yves Avenard cc32ae22ca Bug 1397307 - P10. Remove uncessary loop. r=gerald
We only process a demuxed sample at a time. Waiting until one is decoded to do the next pending ones.

MozReview-Commit-ID: JlXhyPzso8U
2017-09-14 14:45:10 +02:00
Jean-Yves Avenard 83ce98fde1 Bug 1397307 - P7. Display video resolution and frame rate in debug data. r=gerald
MozReview-Commit-ID: 9vsheKkAm4p
2017-09-12 17:40:42 +02:00
Jean-Yves Avenard 45410b9a4e Bug 1397307 - P6. Calculate average video frame rate as video is playing. r=gerald
We unfortunately can't store this information in the VideoInfo as typically the framerate isn't found in the container's metadata. Additionally, the VideoInfo object is readable-only as it is shared across threads.

As such, we can only estimate it as we demux samples.

MozReview-Commit-ID: 5HB33ubfGAs
2017-09-12 21:20:09 +02:00
Jean-Yves Avenard 3541968456 Bug 1397307 - P5. Avoid creating two decoders on first sample. r=gerald
Don't unnecessarily, create a decoder, flush, shutdown and create a new one on the first sample.

MozReview-Commit-ID: 8utEX5JEmq8
2017-09-12 21:02:24 +02:00
Jean-Yves Avenard f7f105d1e3 Bug 1397307 - P2. Wrap boolean in structure to prevent unwanted conversion. r=gerald
Automatic conversion (say from int to bool) makes DecoderParam difficult to extend.

MozReview-Commit-ID: G0T7jPogskN
2017-09-08 15:45:38 +02:00
Alastor Wu 1d510c21f6 Bug 1397141 - part7 : update error description in MFR. r=jya
MozReview-Commit-ID: 9Sb5ogX2Bf2
2017-09-13 15:38:06 +08:00
Sebastian Hengst ce0bcf1880 Backed out changeset eab2e401c60f (bug 1397141) 2017-09-13 09:25:28 +02:00
Alastor Wu 0eb6717668 Bug 1397141 - part7 : update error description in MFR. r=jya
MozReview-Commit-ID: 5QPdFCMesi5
2017-09-13 15:06:14 +08:00
Jean-Yves Avenard 5348c04ddc Bug 1396629 - P1. Use nsCString. r=cpearce
The default string is over 400 bytes long, it will never fit in the default 64 bytes buffer of an nsAutoCString.

MozReview-Commit-ID: 3FHPQDgCtMF
2017-09-04 21:07:11 +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
Jean-Yves Avenard 54b88c8e00 Bug 1394591 - P3. Add codec type to decoder description name. r=gerald
MozReview-Commit-ID: 8vQUFhhMtqO
2017-09-01 14:58:19 +02:00
Jean-Yves Avenard b111004277 Bug 1394591 - P1. Use nsCString for decoder description. r=gerald
This will allow to modify the string returned later.

MozReview-Commit-ID: Giw1JyukE4v
2017-09-01 14:25:28 +02:00
Sebastian Hengst 4da5ab4851 Backed out changeset 409dbe62d0ea (bug 1394591) for asserting GLBlitHelper requires vertex_array_object in dom/media/mediasource/test/test_FrameSelection.html on Android 4.3. r=backout 2017-09-04 00:08:33 +02:00
Sebastian Hengst 6dd681b0f2 Backed out changeset 478ba48df051 (bug 1394591) 2017-09-04 00:07:07 +02:00
Jean-Yves Avenard ebd380047e Bug 1394591 - P3. Add codec type to decoder description name. r=gerald
MozReview-Commit-ID: 8vQUFhhMtqO
2017-09-01 14:58:19 +02:00
Jean-Yves Avenard 225ffcb469 Bug 1394591 - P1. Use nsCString for decoder description. r=gerald
This will allow to modify the string returned later.

MozReview-Commit-ID: Giw1JyukE4v
2017-09-01 14:25:28 +02:00
Jean-Yves Avenard ee2be623b4 Bug 1396428 - Fix end of lines. r=jya
MozReview-Commit-ID: 3reYozTMKk0
2017-09-03 21:28:52 +02:00
Kaku Kuo dbb63b9844 Bug 1393399 P5 - report the recovery time telemetry; r=gerald
MozReview-Commit-ID: 3Z0Esl1F6fV
2017-08-31 18:02:06 +08:00
Kaku Kuo bf10334e3e Bug 1393399 P4 - implement GPUProcessCrashTelemetryLogger helper class; r=gerald
GPUProcessCrashTelemetryLogger is used to report telemetry of the time used to recover a decoder from GPU crash.

It uses MediaDecoderOwnerID to identify which video we're dealing with.
It uses MediaDataDecoderID to make sure that the old MediaDataDecoder has been deleted and we're already recovered.
It reports two recovery times, one is calculated from GPU crashed (that is, the time when VideoDecoderChild::ActorDestory() is called) and the other is calculated from the MFR is notified with NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER error.

MozReview-Commit-ID: 82BRc2Vs3cw
2017-08-31 17:56:17 +08:00
Kaku Kuo a487cd7052 Bug 1393399 P3 - keep the MediaDecoderOwner's identification in MFR; r=gerald
When GPU process crashes, the MediaDecoder, MDSM, and MFR are all destroyed.
So, we use MediaDecoderOwner to identify which video we're dealing with.

MozReview-Commit-ID: 1cv08M7Cpcf
2017-08-31 17:31:51 +08: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
Chris Pearce 4f1d542122 Bug 1394648 - Switch from nsInt{Point,Rect,Size} to gfx::Int{Point,Rect,Size} in dom/media. r=jwwang
The nsRect.h and nsSize.h headers typedef nsIntRect to gfx::IntRect etc, so the
rect/size objects we use will be the same, just under a different name.
However the old headers #include a bunch of things we don't use, so we if we
use the gfx objects directly we end up with a smaller include graph.

MozReview-Commit-ID: 7S4OSqBJK9m
2017-08-29 14:00:33 +12:00
Carsten "Tomcat" Book 3fe83e45ea merge mozilla-inbound to mozilla-central a=merge 2017-07-27 10:57:25 +02:00
Bevis Tseng 2ecbda13e2 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm 2017-07-26 16:13:35 +08:00
Kartikaya Gupta 14424677af Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv
2017-07-26 16:03:57 -04:00
JW Wang 53ee015f6f Bug 1378295. P2 - move AutoNotifyDecoded from AbstractMediaDecoder to FrameStatistics. r=jya
MozReview-Commit-ID: EdS2U2sfPdk
2017-07-13 15:17:25 +08:00
JW Wang 74c1491a11 Bug 1378295. P1 - remove unused MFR::mDecoder. r=jya
MozReview-Commit-ID: BuvxlYs0LqD
2017-07-13 15:13:12 +08:00
JW Wang 5e924b387c Bug 1380568. P2 - remove AbstractMediaDecoder::NotifyDecodedFrames(). r=jya
MozReview-Commit-ID: AZyPseUiZLl
2017-07-13 14:12:25 +08:00
JW Wang ecec830b02 Bug 1380568. P1 - store FrameStatistics in MFR. r=jya
So we can remove the use of AbstractMediaDecoder::NotifyDecodedFrames().

MozReview-Commit-ID: Ch7Saha6zdi
2017-07-07 11:05:03 +08:00
Wes Kocher e93069274c Merge m-c to inbound, a=merge
MozReview-Commit-ID: Ah48RzFU8Mt
2017-07-21 18:20:46 -07:00
Sylvestre Ledru 576cac5ec7 Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL
2017-07-15 19:03:04 +02:00
JW Wang bbbf59d39a Bug 1316211. P15 - remove MDR from the base class of MFR. r=gerald
MozReview-Commit-ID: Jf5pCxkhexg
2017-07-19 22:18:37 +08:00
JW Wang 03567250c1 Bug 1316211. P14 - move members from MDR to MFR. r=gerald
MozReview-Commit-ID: EwdteoEY1uS
2017-07-19 17:34:05 +08:00
JW Wang ddc232dfec Bug 1316211. P11 - remove empty functions. r=gerald
MozReview-Commit-ID: 44blKyrVzLV
2017-07-19 15:15:14 +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
Kaku Kuo 2fd1e0d71f Bug 1378691 P3 - return next key frame time back to MDSM; r=jwwang
MozReview-Commit-ID: LVhJ0DpM24c
2017-07-11 10:15:33 +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 ca36e00427 Bug 1380532. P1 - pass GMPCrashHelper through MediaDecoderReaderInit to MFR. r=gerald
So we can reduce dependency on AbstractMediaDecoder.
See bug 1378295 comment 1 for the detail.

Note it is not ideal to repeat |init.mCrashHelper = ...| several times in
this patch. We will re-visit it to reduce code duplication after bug 1378295
is done.

MozReview-Commit-ID: AEC56ukqtYr
2017-07-13 10:19:36 +08:00
JW Wang b311e08e8b Bug 1380234. P3 - remove AbstractMediaDecoder::CompositorUpdatedEvent() and its users. r=jya
MozReview-Commit-ID: JioS7MC5qFh
2017-07-12 16:49:59 +08:00
JW Wang 6a14800881 Bug 1380234. P2 - send compositor updates to the reader directly without using MediaEventSource. r=jya
MozReview-Commit-ID: EJO2PK525gS
2017-07-12 16:28:19 +08:00
JW Wang 2f2bfdced5 Bug 1380234. P1 - pass KnowsCompositor to MFR through MediaDecoderReaderInit. r=jya
MozReview-Commit-ID: 3krK3meG5jV
2017-07-12 15:37:02 +08:00
Kaku Kuo 6f640b0f4f Bug 1380244 - trigger skip-to-next-key-frame quicker; r=jya
This patch is going to loose the criteria of skip-to-next-key-frame.

The original rules are here:
http://searchfox.org/mozilla-central/rev/31311070d9860b24fe4a7a36976c14b328c16208/dom/media/MediaFormatReader.cpp#1559

Skip-to-next-key-frame is triggered if the playback position is LARGER than the next key frame time.
But, from the video-track point of view, when the skip-to-next-key-frame is triggered, it skips to the next-next key frame.

Here is an example, say, we are playing a media file with its playback position at time _a_,
and its video decoding is falling behind at time _v_.
The next key frame is at time _k1_ and next-next key frame is at time _k2_.

              a
----|---------|---------|-------------|----------------> time
    v                   k1            k2

When the playback position _a_ passes _k1_ (_a_ > _k1_), the skip-to-next-key-frame is triggered,
and the demuxer jumps to _k2_ directly.



The idea here is to give a chance when (_a_ == _k1_), let demuxer jump to _k1_ and see if the video decoding could catch up.

MozReview-Commit-ID: 6aRSYDOI1ds
2017-07-12 16:16:49 +08:00