Commit Graph
1098 Commits
Author SHA1 Message Date
JW Wang 101e01f229 Bug 1216850. Part 2 - backout bug 1214498. r=me. 2015-10-21 11:45:53 +08:00
JW Wang 97a83e3d05 Bug 1216850. Part 1 - backout bug 1215003. r=me. 2015-10-21 10:59:56 +08:00
Kilik Kuo ae4bb28254 Bug 1194918 - Move av-sync and video frame rendering logic from MDSM to VideoSink. r=jwwang. 2015-10-19 18:08:11 +08:00
Kilik Kuo 154db5b190 Bug 1194918 - Add VideoSink which contains either AudioSinkWrapper or DecodedStreamSink as a default operating MediaSink in MDSM. r=jwwang. 2015-10-19 17:32:16 +08:00
JW Wang 2f6e153526 Bug 1215003. Part 3 - fix AsyncReadMetadata() and its callers. r=gerald. 2015-10-19 10:52:34 +08:00
Jonathan Hao ce74a9c16c Bug 1207964 - Remove workaround from bug 1080461. r=jwwang 2015-10-14 15:25:00 +08:00
Nathan Froyd 4e6d8f6705 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
2015-10-18 01:24:48 -04:00
Nathan Froyd bf7f6dda03 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Dan Glastonbury 1c36d235d5 Bug 1193614 - Schedule State Machine when VideoQueue() is low. r=cpearce
If UpdateRenderedVideoFrames() can't find a frame in VideoQueue() that
is `in the future`, ie. has a time stamp that is greater than clock
time, the thread is scheduled in 40ms.

The logic in UpdateRenderedVideoFrames() always leaves the current frame
sent to the compositor at the head of the queue. It's time stamp is
always less than clock time.

Because there's always one, old frame in the queue, the logic in
OnVideoDecoded() needs to reschedule the state machine when queue size
is two, after adding the new frame.
2015-10-15 07:29:03 +10:00
JW Wang 533dab4862 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 48c6ff4892 Bug 1214073 - MediaDecoderReader::ReleaseMediaResources will do dispatch if necessary. r=gerald. 2015-10-14 11:52:26 +08:00
JW Wang 582b648a0d Bug 1214065 - Remove unused arguments from MediaDecoder::Load() and its friends. r=kinetik. 2015-10-14 11:46:27 +08:00
Kilik Kuo a2580e42be Bug 1213897 - Extract DelayedScheduler out of MDSM to a common class. r=jwwang 2015-10-13 15:39:01 +08:00
JW Wang 17c6b91845 Bug 1212723. Part 2 - remove unused argument aCloneDonor from MediaDecoderReader::Init(). r=jya. 2015-10-13 15:28:57 +08:00
JW Wang f787446b04 Bug 1212701. Part 2 - remove MediaDecoderStateMachine::OnDecodeTaskQueue() which is unused. r=jya. 2015-10-12 12:05:52 +08:00
JW Wang 5fb6ba91b6 Bug 1212220 - cache pref values so they are safe to access off the main thread. r=roc. 2015-10-11 20:11:04 +08:00
Kilik Kuo c068370869 Bug 1211364 - Check frame validity earlier when decoded frames arrive in MDSM. r=jwwang
Rebase to currnet truck
2015-10-07 14:52:05 +08:00
JW Wang 3c0a0246a0 Bug 1211787 - Improve the accuracy of MediaDecoderStateMachine::GetDecodedAudioDuration(). r=roc. 2015-10-07 12:09:34 +08:00
JW Wang 2999762c86 Bug 1208934 - Remove usage of decoder monitor from MDSM. r=kinetik. 2015-10-06 10:26:33 +08:00
JW Wang 870ab859c9 Bug 1209864. Part 1 - make all methods run on the main thread and remove usage of the decoder monitor. r=roc. 2015-09-27 21:37:48 +08:00
JW Wang c4ae729fcf Bug 1208933 - Remove AbstractMediaDecoder::NotifyWaitingForResourcesStatusChanged(). r=jya. 2015-09-27 21:02:18 +08:00
JW Wang 41d590b03d Bug 1208932 - Remove ReadMetadataFailureReason::WAITING_FOR_RESOURCES. r=jya. 2015-09-27 20:48:09 +08:00
JW Wang c70cfb59fb Bug 1208922. Part 3 - forward the CDMProxy from MediaDecoder to MediaDecoderReader via MDSM. r=cpearce. 2015-09-27 18:48:59 +08:00
JW Wang 956174bf1b Bug 1188643. Buffer more audio in audio capture mode to avoid glitches. r=cpearce. 2015-09-30 10:32:49 +08:00
Nigel Babu 3bfb9f3efe Backed out changeset dcbabf6ce153 (bug 1188643) for linux crashtest bustage 2015-09-24 12:31:20 +05:30
Jean-Yves Avenard 885f59e253 Bug 1159343: Interrupt seek early when possible. r=jwwang 2015-09-24 16:46:14 +10:00
Jean-Yves Avenard c3ac8c62f6 Bug 1207478: P4: Make it impossible for the MDSM frame calculation to overflow. r=jwwang
This should make P3 unnecessary as far as the MDSM is concerned.
2015-09-24 16:42:53 +10:00
JW Wang 6c11227c09 Bug 1188643. Buffer more audio in audio capture mode to avoid glitches. r=cpearce. 2015-09-24 14:20:38 +08:00
JW Wang 103983020c Bug 1206607 - Remove some dead code from MDSM. r=kinetik. 2015-09-22 13:55:55 +08:00
JW Wang 5e18f53546 Bug 1206576 - Dispatch some MDSM functions to hide its internal thread model. r=jya. 2015-09-21 14:01:45 +08:00
JW Wang d05c452aaf Bug 1204430. Part 2 - mirror MediaDecoder::mMediaSeekable. r=kinetik. 2015-09-21 13:49:01 +08:00
JW Wang d0109b84dd Bug 1204430. Part 1 - dispatch AbstractMediaDecoder::SetMediaSeekable() to the main thread. r=kinetik. 2015-09-21 13:48:39 +08:00
Kilik Kuo 5f15c0212c Bug 1204882 - Move MediaDecoder::FrameStatistics out of MediaDecoder for easier use in other classes. r=jwwang 2015-09-15 22:57:20 +08:00
JW Wang 07e9255c83 Bug 1204413 - Make MediaDecoder::IsTransportSeekable run on the main thread. r=kinetik. 2015-09-16 10:44:35 +08:00
JW Wang 588d887390 Bug 1172830 - Move buffering check out of MediaDecoderStateMachine::UpdateRenderedVideoFrames(). r=cpearce. 2015-09-15 17:47:26 +08:00
JW Wang 808fe6faf0 Bug 1204401 - Change the buffering criteria in MDSM::UpdateRenderedVideoFrames. r=jya. 2015-09-15 17:46:25 +08:00
JW Wang 6a06b18d3b Bug 1203877 - Remove MediaDecoder::UpdatePlaybackOffset. r=kinetik. 2015-09-15 13:51:12 +08:00
JW Wang 90798ab180 Bug 1203418. Part 3 - ensure MDSM::mPlaybackOffset and MediaDecoder::mPlaybackPosition are mono-increasing to avoid "jitter" in calculating playback statistics. r=cpearce. 2015-09-15 10:05:19 +08:00
JW Wang 0f35178ea2 Bug 1203418. Part 2 - duplicate the implementation of MediaDecoder::GetStatistics so MDSM can call it on its own thread. r=cpearce. 2015-09-15 10:04:50 +08:00
James Cheng 8a00cdead2 Bug 1203047 - Make MediaDecoderReader know less about AudioData/VideoData by using MediaData instead. r=jya 2015-09-10 03:06:00 +02:00
JW Wang 1aa1009804 Bug 1203374. Part 2 - duplicate the implementation of MediaDecoder::CanPlayThrough so MDSM can call its own CanPlayThrough() on its own thread. r=jya. 2015-09-10 16:40:52 +08:00
JW Wang a898a26bcf Bug 1203374. Part 1 - extract the code of computing canplaythrough so it is reusable. r=jya.
1. extract MediaDecoder::Statistics to its own file.
2. sort out include orders of MediaDecoderStateMachine.cpp
2015-09-10 16:37:26 +08:00
JW Wang 51231a4ae6 Bug 1202540 - Remove MDSM::mPlayStartTime. r=kinetik. 2015-09-10 11:31:30 +08:00
JW Wang 8ea5f6dfd7 Bug 1202351 - Remove MDSM::mPlayDuration. r=cpearce. 2015-09-10 10:19:42 +08:00
JW Wang b967b4e654 Bug 1199562. Part 3 - remove unused code. r=roc. 2015-09-09 10:12:46 +08:00
JW Wang dd1c84f8b5 Bug 1199562. Part 2 - replace usage of mStreamSink with mMediaSink in most cases. r=roc. 2015-09-09 10:12:35 +08:00
JW Wang d62cc56267 Bug 1199562. Part 1 - rename mAudioSink to mMediaSink as well as related member names. r=roc. 2015-09-09 10:12:23 +08:00
JW Wang 9737c4754a Bug 1199155. Part 3 - rename mDecodedStream to mStreamSink. r=roc. 2015-09-07 19:32:16 +08:00
JW Wang 271a5d08ac Bug 1199155. Part 2 - fix includes and forward declarations. r=roc. 2015-09-07 19:32:04 +08:00
JW Wang ae961d59c0 Bug 1199121. Part 3 - remove unused code. r=kinetik. 2015-09-07 11:58:27 +08:00