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

109 Коммитов

Автор SHA1 Сообщение Дата
Alfredo Yang 68adb6b579 Bug 1068151 - keep decoding a corrupted video. r=jya 2016-05-30 18:24:00 +02:00
JW Wang 1f7b60118b Bug 1275807 - Remove remaining use of FlushableTaskQueue. r=cpearce.
MozReview-Commit-ID: L12wxh7GPIr

--HG--
extra : rebase_source : 745ae8240326246050513c96300eba1e32d84130
2016-05-24 16:48:26 +08:00
Jean-Yves Avenard 48f24d3464 Bug 1275538: P2. Drop decoded frames that we know are already too late. r=kamidphish
MozReview-Commit-ID: EZ2Ql2DtTKa

--HG--
extra : rebase_source : 4dbffc3538e86562a6bb347354f4ff377e484f04
2016-05-26 14:58:48 +10:00
Chris Pearce daf024be7d Bug 1249706 - Backout a085ea2d24bb for blowing telemetry server's mind. r=backout
--HG--
extra : rebase_source : fc17ac88544ff800b141a276f66282b34f613dfe
2016-05-25 10:31:15 +12:00
Jean-Yves Avenard 51b5eef658 Bug 1270323: P1. Don't reset flag indicating that new data was received. r=cpearce
A bit of a shot in the dark, but it is possible that data got received but that information got lost as reset was called.

MozReview-Commit-ID: 1KjQeCFsGPJ

--HG--
extra : rebase_source : 3a522045bde0658fdfeccbf4d0cac11b43bc35d7
2016-05-21 22:58:40 +08:00
Jean-Yves Avenard 90596205d1 Bug 1272964: P4. Only flush decoder if skip to next keyframe actually succeeds. r=cpearce
As the decoder was flushed and reset prior the skip to next keyframe started, and future error would be unrecoverable. So only reset the decoder once the skip completes and succeeded. Otherwise we default back to normal decoding.

MozReview-Commit-ID: GEj1i0EsaYO

--HG--
extra : rebase_source : c1d2beafa6e35f571b941e8f173ec10b726ec1a0
2016-05-19 15:02:43 +08:00
Jean-Yves Avenard c1bf16766d Bug 1272964: P2. Don't activate skip to next keyframe until we passed the internal seek target. r=gerald
currentTime may be past the start of the internal seek time, but before its end, which would have triggered a false positive: we do not want to jump to the next key frame here.

MozReview-Commit-ID: H5O9XXnk84T

--HG--
extra : rebase_source : 0bc96472acfe03ff0c87a6fc3712bd99b96064b6
2016-05-18 11:48:05 +08:00
Kaku Kuo 016612435e Bug 1272267 - Adjust the seek target in the MediaFormatReader. r=jya
MozReview-Commit-ID: H297znLMtOC

--HG--
extra : rebase_source : 3872312d3aed6530554ef524e4fd99fd68f28202
2016-05-16 18:15:17 +08:00
Jean-Yves Avenard b4a0208665 Bug 1273018: P3. Adjust range of audio assertions. r=gerald
With the new video-only seek type, we need to ignore the current audio decoding state whenever video-only seeking is in progress.

MozReview-Commit-ID: 5eynmG2UyyA

--HG--
extra : rebase_source : 7e9bdd7c44cb4a80129bfc468da87288e520c984
2016-05-16 16:15:45 +08:00
Jean-Yves Avenard 9773d374d9 Bug 1273018: P1. Rename some members. r=gerald
MediaFormatReader::mOriginalSeekTarget now has different use and the name was no longer reflective of the actual usage.

MozReview-Commit-ID: Fu0fmgUlbgr

--HG--
extra : rebase_source : 7c106fc4832def7c6a4b91e1950ed5b3e1109129
2016-05-16 14:47:57 +08:00
Dan Glastonbury 332d6f1a7d Bug 1272422 - Part 3: Don't reset audio queue. r=jya
When resuming from suspended video, don't reset the audio queues or
audio demuxing state in MFR.

Extracted the code from ResetDemuxers() and inlined it at calling sites
as recommended by jya.

MozReview-Commit-ID: 3wpH075RrKW
2016-05-13 15:50:11 +10:00
Dan Glastonbury 526fdd85f6 Bug 1224973 - Part 5: Implement suspend decoding for background video. r=cpearce,jwwang,jya
Implemented by short-circuiting calls to RequestVideoData in MDSM so no
frames are decoded. Resuming playback when video moves to foreground by
using the SeekTask/SeekJob/Seek in MDSM with result of GetMediaTime().

Special consideration is made to only seek the video part of Seek() to
remove an audible glitch in the audio playback when the video becomes
visible again.

MozReview-Commit-ID: 7YFDTanslXu
2016-05-12 09:54:15 +10:00
Jean-Yves Avenard ffcc71c256 Bug 1269408: P6. Add debugging information, useful when a mochitest timeout. r=gerald
Access to some members is not thread-safe; but the typical use of those informations is when a mochitest has timed out, and by that time the MFR will have been idled for over 5 minutes.

MozReview-Commit-ID: 21BxrSZXVVJ
2016-05-06 17:28:55 +10:00
Jean-Yves Avenard 6da72a9485 Bug 1269408: P4. Ensure the decoders are flushed prior performing an internal seek. r=gerald
Some decoders (WMF) keep some internal counters on how many frames have been output and use this to calculate the time of the decoded audio frame. As such, when internally seeking, the next frame decoded would have always been past the seek target.

MozReview-Commit-ID: puzs6ecqbD
2016-05-06 17:28:41 +10:00
Jean-Yves Avenard 7d7e1ae0c4 Bug 1269408: P3. Ensure a new seek request will cancel the previous internal seek. r=gerald
MozReview-Commit-ID: 3dR8JWt4KSN
2016-05-06 17:28:35 +10:00
Jean-Yves Avenard 89278050c4 Bug 1269408: P1. Retry InternalSeek if previous attempt failed once more data is available. r=gerald
MozReview-Commit-ID: Jro2PRtGX7c
2016-05-06 17:28:21 +10:00
Jean-Yves Avenard 7945decc88 Backed out changeset ecb87e0e1cab ("Bug 1269178: P1. Retry InternalSeek if previous attempt failed once more data is available. r=gerald") 2016-05-06 17:27:34 +10:00
Jean-Yves Avenard aab4c4df00 Backed out changeset 31f6d645e9e5 ("Bug 1269178: P2. Ensure that no skip to next keyframe logic is activated while there's a pending seek. r=gerald") 2016-05-06 17:27:34 +10:00
Kyle Huey 941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Jean-Yves Avenard 0508995f47 Bug 1269178: P2. Ensure that no skip to next keyframe logic is activated while there's a pending seek. r=gerald
While a seek is pending, the demuxer has been reset meaning that ShouldSkip() would almost always incorrectly return true and would corrupt the seeking state.

MozReview-Commit-ID: 6R912Fu6Nul

--HG--
extra : rebase_source : a20a5d0ed1c0d21c04014790bdf5a0c07edb82a4
2016-05-02 10:53:31 +10:00
Jean-Yves Avenard a2f6eca10d Bug 1269178: P1. Retry InternalSeek if previous attempt failed once more data is available. r=gerald
MozReview-Commit-ID: DtaKBzxRVR8

--HG--
extra : rebase_source : ad49222ad6405caac6e56cda959cd230b5f9b925
2016-05-01 23:37:09 +10:00
Carsten "Tomcat" Book ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey 48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
JW Wang 67a95734d1 Bug 1266304. Part 2 - remove unnecessary template parameters. r=kaku.
MozReview-Commit-ID: E2TnNbMvJaR
2016-04-22 14:16:56 +08:00
JW Wang 69b738fc15 Bug 1266304. Part 1 - Merge MediaDecoderReader::AudioDataPromise and MediaDecoderReader::VideoDataPromise. r=kaku.
MozReview-Commit-ID: BhhA7sjCTtQ
2016-04-22 14:16:49 +08:00
JW Wang ffd7b45558 Bug 1265311. Part 2 - constify some functions. r=jya.
MozReview-Commit-ID: HMlg0M64PhQ
2016-04-19 16:14:33 +08:00
Matt Woodrow fd534aefc7 Bug 1257013 - Part 3: Stop checking for corrupt frames in MediaDecoderStateMachine since we no longer produce them. r=ajones
--HG--
extra : rebase_source : a68da2757970cd28da5719d77e3036f9051041e5
2016-03-21 18:50:41 +13:00
Bryce Van Dyk 2be9a949c6 Bug 1251460 - MDSM now waits on a promise to enqueue first frame loaded. r=jya
MediaDecoderStateMachine's EnqueueFIrstFrameLoadedEvent would previously call
into MediaDecoderReader to update MDR's buffered ranges and enqueue the frame
loaded event. This commit aims to instead have the buffered update take place,
and only afterwards enqueue the event. This should remove the possibility that
the event will be fired and handled before the update of the buffered ranges has
taken place.

MozReview-Commit-ID: GP8w2nF4xmj

--HG--
extra : transplant_source : %A0m%13%95%E3Gs%ACMd%1F%F4%25%B9qE%28J%21R
2016-03-09 15:32:49 +13:00
Nathan Froyd 0ce6da7e92 Bug 1253711 - delete unused MediaFormatReader::ByteInterval typedef; r=jya 2016-03-04 15:25:58 -05:00
Louis Christie 4a902ba49c Bug 1249706: Added telemetry for the proportion of frames dropped keyed by several details. r=jya 2016-02-23 13:19:40 +13:00
Jean-Yves Avenard 1397b86c7b Bug 1243608: P6. Only seek audio to video seek time when performing a fast seek. r=cpearce
This allows for much faster seek time.
2016-02-02 18:57:14 +11:00
Jean-Yves Avenard 83fff9be79 Bug 1243608: P2. Pass the full SeekTarget object to MediaDecoderReader::Seek. r=cpearce
This will allow the reader to know if we are performing a fast seek.
2016-02-02 18:57:12 +11:00
Jean-Yves Avenard 3bdc8c2cc9 Bug 1241677: P2. Add media decoder's description to about:media report. r=cpearce 2016-01-25 10:33:40 +11:00
Jean-Yves Avenard e35b5b767d Bug 1236703: P1. Add debugging information for MSE to about:media plugin. r=kentuckyfriedtakahe
Add : number of frames decoded and number of frames skipped during skip to next key frame and if hardware acceleration is currently in use.
2016-01-20 09:50:25 +11:00
Jean-Yves Avenard bc55ba93a4 Bug 1240411: P9. Clean up media headers. r=jwwang
Remove redundant virtual keyword and add missing override if any.
2016-01-19 19:47:36 +11:00
Jean-Yves Avenard af9786e6b0 Bug 1229987: P2. Drain decoder when encountering gap. r=cpearce
This allows for all buffered frames to be playable.
2015-12-18 19:26:52 +11:00
JW Wang e4cbe0c128 Bug 1228939 - 1. add mSeekable to MediaInfo. 2. use MediaEventSource to notify the decoder when the media is not seekable. 3. remove unused code. r=jya. 2015-12-02 15:42:32 +08:00
Jean-Yves Avenard 321718db5f Bug 1226707: P3. Only create the type of decoder we will need. r=cpearce 2015-11-23 16:30:49 +11:00
JW Wang 2c0bf35e10 Bug 1220551. Part 2 - remove arguments from NotifyDataArrivedInternal(). r=jya. 2015-11-02 21:28:57 +08:00
JW Wang 924432c2ee Bug 1217714 - Remove some unused functions from MediaDecoderReader. r=jya. 2015-10-26 14:10:29 +08:00
Jean-Yves Avenard 3b37e9ab5c Bug 1207198: P1. Do not initialize decoders during ReadMetadata. r=cpearce
Decoders are created and initialized automatically when needed.
Also fix issues where we could have a pending initialization promise pending when going into dormant mode.
2015-10-23 23:34:06 +11:00
James Cheng f01266ed3f Bug 1194606 - Make MediaDecoderStateMachine capable of requesting different kind (decoded/raw) of media data. r=jya 2015-10-20 05:33:00 -04:00
JW Wang 1deed476dc Bug 1216850. Part 3 - backout bug 1214073. r=me. 2015-10-21 14:04:20 +08:00
JW Wang 8e64159f84 Bug 1216850. Part 2 - backout bug 1214498. r=me. 2015-10-21 11:45:53 +08:00
JW Wang 8cbe3a5118 Bug 1216850. Part 1 - backout bug 1215003. r=me. 2015-10-21 10:59:56 +08:00
JW Wang 9e488683b4 Bug 1215003. Part 2 - rename AsyncReadMetadata and move it to the private section. r=gerald. 2015-10-19 10:52:15 +08:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Jean-Yves Avenard 6db8b43cba Bug 1213176: P1. Remove most MediaFormatReader dependencies on its MediaDecoder parent. r=jwwang
The LayersBackend can be defined at construction time, however if a parent MediaDecoder exists, the value will be overwritten by the MediaDecoderOwner value.

--HG--
extra : rebase_source : fefad83560d5bfa2aee9f665fe138397eb390019
2015-10-15 02:04:00 +02:00
JW Wang 1065049ddb Bug 1214498 - MediaDecoderReader::DisableHardwareAcceleration should figure out which thread to dispatch the job. r=gerald. 2015-10-14 14:25:01 +08:00
JW Wang 6765563707 Bug 1214073 - MediaDecoderReader::ReleaseMediaResources will do dispatch if necessary. r=gerald. 2015-10-14 11:52:26 +08:00