Commit Graph

236 Commits

Author SHA1 Message Date
JW Wang
399eff85fc Bug 1220646 - don't access mOwner which is invalid after shutdown. r=kinetik. 2015-11-03 20:26:57 +08:00
JW Wang
89a23d426c Bug 1219169. Part 1 - Remove AbstractMediaDecoder::OnStateMachineTaskQueue(). r=jya. 2015-11-02 10:36:48 +08:00
JW Wang
48028b5b2a Bug 1217653 - MediaDecoder::GetOwner() should return null after shutdown. r=kinetik. 2015-10-28 14:17:28 +08:00
JW Wang
a7589ce310 Bug 1218280. Part 1 - create MediaResourceCallback for MediaResource to send notifications. r=roc. 2015-10-27 10:28:26 +08:00
Eric Rahm
5b38c55967 Bug 1174785 - Part 2: Convert xpcom over to LogModule. r=froydnj
--HG--
extra : rebase_source : 58d3b32bd0174f2540512cef810cafdd3556ef6b
2015-10-19 12:50:14 -07:00
JW Wang
f4b4ec1c67 Bug 1215023. Part 2 - remove null check of mOwner. We check mShuttingDown to know whether it is valid to call functions of mOwner. r=kinetik. 2015-10-19 13:55:38 +08:00
JW Wang
6d842ecf29 Bug 1215023. Part 1 - make MediaDecoder::mOwner a const member. We will check mShuttingDown before calling functions of mOwner. r=kinetik. 2015-10-19 13:55:26 +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
JW Wang
5147e1f0af Bug 1214989. Part 3 - remove MediaDecoder::Init() and its callers. r=gerald. 2015-10-15 11:39:45 +08:00
JW Wang
e470e1616d Bug 1214989. Part 1 - add MediaDecoderOwner to the constructors of MediaDecoder and sub-classes. r=gerald. 2015-10-15 11:36:21 +08:00
Eric Rahm
88d7e6c28e Bug 1190592 - Part 1: Add mediasource memory reporter. r=jya
This adds asyncrounous reporting of MSE resources.
2015-08-20 18:10:33 -04:00
JW Wang
c54e262481 Bug 1214519 - Fix the coding style of member initializer lists of MediaDecoder. r=jya. 2015-10-15 10:38:14 +08:00
JW Wang
1cc6677a90 Bug 1214065 - Remove unused arguments from MediaDecoder::Load() and its friends. r=kinetik. 2015-10-14 11:46:27 +08:00
JW Wang
a072559a2a Bug 1212701. Part 1 - remove AbstractMediaDecoder::OnDecodeTaskQueue(). r=jya. 2015-10-12 12:05:49 +08:00
JW Wang
a890d8c667 Bug 1146482 - remove MediaDecoder::mReentrantMonitor which is not used anymore. r=jya. 2015-10-07 14:53:22 +08:00
JW Wang
aadc51ecc8 Bug 1211766 - Remove AbstractMediaDecoder::GetReentrantMonitor(). r=jya. 2015-09-30 07:04:49 +08:00
Jean-Yves Avenard
04cdb572f3 Revert "Bug 1209388: [mp3] Remove AppleMP3Reader. r=kentuckyfriedtakahe" r=me
This reverts commit ecbe6589d36e

May be better of waiting a little bit in case we find that the new MP3Demuxer isn't up to scratch
2015-10-02 19:24:54 +10:00
Jean-Yves Avenard
b2c18c37f4 Bug 1209388: [mp3] Remove AppleMP3Reader. r=kentuckyfriedtakahe
Following bug 1209410, it was no longer used.
2015-10-02 18:44:34 +10:00
JW Wang
fd23a5e794 Bug 1208933 - Remove AbstractMediaDecoder::NotifyWaitingForResourcesStatusChanged(). r=jya. 2015-09-27 21:02:18 +08:00
JW Wang
92100b0074 Bug 1208930 - Remove usage of decoder monitor from MediaDecoder. r=jya. 2015-09-27 20:12:14 +08:00
JW Wang
489900ad10 Bug 1208922. Part 4 - remove AbstractMediaDecoder::GetCDMProxy() and devirtualize MediaDecoder::SetCDMProxy(). r=cpearce. 2015-09-27 18:59:08 +08:00
JW Wang
401634bd83 Bug 1208922. Part 1 - add MediaDecoder::RequestCDMProxy() which resolves when a CDMProxy is set and capabilities are known. The client code won't need to handle the situation where a CDMProxy is set but capabilities are still unknown. This simplifies the client code a lot. r=cpearce. 2015-09-27 18:39:37 +08:00
Olivier Brunel
11e774d18d Bug 1194631 - Make firefox build with --disable-logging. r=jrmuizel 2015-09-22 17:39:12 +02:00
JW Wang
ea6f339396 Bug 1207017. Part 1 - fix coding styles. r=kinetik. 2015-09-22 13:57:24 +08:00
JW Wang
9f60378309 Bug 1206574 - Remove AbstractMediaDecoder::IsShutdown(). r=cpearce. 2015-09-22 10:56:17 +08:00
JW Wang
5d35a74e15 Bug 1206576 - Dispatch some MDSM functions to hide its internal thread model. r=jya. 2015-09-21 14:01:45 +08:00
JW Wang
9fd579e930 Bug 1204430. Part 2 - mirror MediaDecoder::mMediaSeekable. r=kinetik. 2015-09-21 13:49:01 +08:00
JW Wang
c22dac30b8 Bug 1204430. Part 1 - dispatch AbstractMediaDecoder::SetMediaSeekable() to the main thread. r=kinetik. 2015-09-21 13:48:39 +08:00
JW Wang
0b01a4b74a Bug 1204413 - Make MediaDecoder::IsTransportSeekable run on the main thread. r=kinetik. 2015-09-16 10:44:35 +08:00
JW Wang
0f170dcc0b Bug 1203877 - Remove MediaDecoder::UpdatePlaybackOffset. r=kinetik. 2015-09-15 13:51:12 +08:00
JW Wang
991d089255 Bug 1203418. Part 1 - cache the results of ComputePlaybackRate() so they can be mirrored by MDSM. r=cpearce.
Since the results of ComputePlaybackRate() depend on mDuration and mPlaybackStatistics,
we call ComputePlaybackRate() when mDuration is changed or mPlaybackStatistics->Stop() is called.
GetStatistics() won't have to call ComputePlaybackRate() because the results are already stored in
mPlaybackBytesPerSecond and mPlaybackRateReliable.
We will fix the MDSM part in the next patch.
2015-09-15 10:04:50 +08:00
JW Wang
57b5b58c47 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
4fecfe3ea1 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
d5b1c53fd7 Bug 1195158. Part 5 - 1. Fix insufficient includes and sort out include order. 2. Only disconnect |mTimedMetadataListener| when the state machine is created. r=cpearce. 2015-09-07 11:39:46 +08:00
JW Wang
7cab08fca3 Bug 1195158. Part 4 - remove unused code. r=cpearce. 2015-09-07 11:39:16 +08:00
JW Wang
09c4ea2b2e Bug 1195158. Part 3 - connect listeners. r=cpearce.
a. MediaMetadataManager is connected to MediaDecoderReader::mTimedMetadataEvent to receive TimedMetadata events.
b. OggReader publish TimedMetadata events through MediaDecoderReader::mTimedMetadataEvent.
c. MDSM calls MediaMetadataManager::DispatchMetadataIfNeeded to publish metadata if playback positoin reaches the publish time.
d. MediaDecoder is connected to MediaMetadataManager::mTimedMetadataEvent to receive TimedMetadata events.
e. MediaDecoder updates its metadata when TimedMetadata events are received.
2015-09-07 11:38:34 +08:00
Chris Pearce
5bc0a35a7d Bug 1197022 - [EME] Disable dormant mode for EME videos on all channels. r=kentuckyfriedtakahe 2015-08-21 13:34:21 +12:00
Bobby Holley
4ad57e8274 Bug 1195867 - Hoist StateWatching and StateMirroring into XPCOM. r=froydnj
--HG--
rename : dom/media/StateMirroring.h => xpcom/threads/StateMirroring.h
rename : dom/media/StateWatching.h => xpcom/threads/StateWatching.h
2015-08-18 15:37:06 -07:00
Sebastian Hengst
a133c6114b Backed out changesets 7610baf4a3ae, 6226b99f19bd, 157e41e32906, 60a3b1862f71 (bug 1195158). r=backout
Backed out changeset 7610baf4a3ae (bug 1195158)
Backed out changeset 6226b99f19bd (bug 1195158)
Backed out changeset 157e41e32906 (bug 1195158)
Backed out changeset 60a3b1862f71 (bug 1195158)
2015-08-18 10:52:09 +02:00
JW Wang
b47fc2fd4d Bug 1195158. Part 4 - remove unused code. r=cpearce. 2015-08-18 11:12:39 +08:00
JW Wang
c024260362 Bug 1195158. Part 3 - connect listeners. r=cpearce.
a. MediaMetadataManager is connected to MediaDecoderReader::mTimedMetadataEvent to receive TimedMetadata events.
b. OggReader publish TimedMetadata events through MediaDecoderReader::mTimedMetadataEvent.
c. MDSM calls MediaMetadataManager::DispatchMetadataIfNeeded to publish metadata if playback positoin reaches the publish time.
d. MediaDecoder is connected to MediaMetadataManager::mTimedMetadataEvent to receive TimedMetadata events.
e. MediaDecoder updates its metadata when TimedMetadata events are received.
2015-08-18 11:12:39 +08:00
Bobby Holley
7cc6fc32f7 Bug 1188976 - Rename ProxyMediaCall to InvokeAsync. r=froydnj 2015-08-17 14:54:42 -07:00
Aryeh Gregor
15205c18ac Bug 1179451 - Part 4: Don't pass nsRefPtr&& to functions that want raw pointers. r=froydnj
--HG--
extra : rebase_source : d25c43a593a72615259e39ae053376f261aa55ad
2015-08-13 15:22:48 +03:00
JW Wang
3a7d265755 Bug 1193603. Part 2 - Fix miscalculation in converting micro seconds to seconds. r=jya. 2015-08-12 18:02:34 +08:00
JW Wang
c8f63ccc7b Bug 1191684 - Remove unnecessary calls to NotifyAll() on the decoder monitor since no one calls Wait(). r=cpearce. 2015-08-10 09:54:48 +08:00
Bobby Holley
a6c9a6255e Bug 1190492 - Init AbstractThread statics from XPCOM. r=froydnj 2015-08-07 16:38:34 -07:00
JW Wang
c1624b854e Bug 1191173 - Mirror MediaDecoder::mSameOriginMedia in MDSM. r=jya. 2015-08-06 18:05:30 +08:00
Bobby Holley
e7a16a397c Bug 1190496 - Init SharedThreadPool from XPCOM rather than MediaDecoder. r=froydnj 2015-08-04 14:00:52 -07:00
Benjamin Chen
69e26539a4 Bug 1186752 - Remove ScheduleStateMachine() in MediaDecoder.cpp since we have state mirror. r=jwwang 2015-07-23 18:39:09 +08:00
Paul Adenot
f7bb3fd5bd Bug 1156472 - Part 7 - Allow to un-capture an HTMLMediaElement. r=pehrsons,jwwang 2015-07-24 14:28:17 +02:00