Commit Graph

150 Commits

Author SHA1 Message Date
JW Wang
ecaa7b7a0d Bug 1295901 - Change the semantics/naming of MediaDecoderReader::ReleaseMediaResources(). r=jya
MozReview-Commit-ID: DyOwNcC2JK5

--HG--
extra : rebase_source : 5b14dfe1df7ed9eab1783fba64ff4a481e520339
2016-08-17 15:03:30 +08:00
Kaku Kuo
c058f404b8 Bug 1274626 part 5 - provide APIs to switch to blank decoders dynamically; r=jya
MozReview-Commit-ID: PyoIsrEf1r

--HG--
extra : transplant_source : C%D6%9E%89%E2O%DB%DFb%A8%9Az%1FE%11%06oo%EE%3C
2016-07-29 14:51:18 +08:00
Carsten "Tomcat" Book
d647d056e2 Backed out changeset c5b79d4a6913 (bug 1274626) 2016-08-02 17:47:26 +02:00
Kaku Kuo
9b64312544 Bug 1274626 - Part 5 - provide APIs to switch to blank decoders dynamically; r=jya
MozReview-Commit-ID: PyoIsrEf1r

--HG--
extra : transplant_source : %16D%C0%AE%DAf8%21P%1ER%3C%E36%C7K%08G%99%2B
2016-07-29 14:51:18 +08:00
Jean-Yves Avenard
49ac56ce9a Bug 1288329: [ogg] P1. Add support for metadata chaining in OggDemuxer. r=gerald,jwwang
This is not the cleanest approach, but ensures identical behavior with the OggReader when it comes to firing loadedmetadata event and handling the change of seekability.

A more universal solution could be considered involving the MediaFormatReader and changing the MediaDataDemuxer API, of interest would be adding support for a new event fired whenever we have a change of content or metadata (useful with MSE or recorded webm of a WebRTC session

MozReview-Commit-ID: BojB2r1CtA3

--HG--
extra : rebase_source : 352fa61b62316264d1a2c8669f427d75f15ca19b
2016-07-28 15:32:11 +10:00
Wes Kocher
8f0a108b9a Backed out 6 changesets (bug 1288329) for wpt failures a=backout
Backed out changeset f33cb032cc9f (bug 1288329)
Backed out changeset 49ea83d00a77 (bug 1288329)
Backed out changeset 1406c14098f1 (bug 1288329)
Backed out changeset 936b73eb37c6 (bug 1288329)
Backed out changeset a1c4d9b9de32 (bug 1288329)
Backed out changeset a76b6e559777 (bug 1288329)

--HG--
extra : amend_source : 4e054fc4af62693934a4ae450a9595443b6a961d
2016-07-29 12:36:20 -07:00
Jean-Yves Avenard
eabdba0469 Bug 1288329: [ogg] P1. Add support for metadata chaining in OggDemuxer. r=gerald,jwwang
This is not the cleanest approach, but ensures identical behavior with the OggReader when it comes to firing loadedmetadata event and handling the change of seekability.

A more universal solution could be considered involving the MediaFormatReader and changing the MediaDataDemuxer API, of interest would be adding support for a new event fired whenever we have a change of content or metadata (useful with MSE or recorded webm of a WebRTC session

MozReview-Commit-ID: BojB2r1CtA3

--HG--
extra : rebase_source : 04704c13bfbdc83fe7c03505876deb8cda2043e6
2016-07-28 15:32:11 +10:00
Jonathan Watt
b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Eugen Sawin
778760ed81 Bug 1214710 - [2.5] Recover decode seek position when resuming suspended playback. r=jwwang 2016-06-08 18:04:33 +02:00
Eugen Sawin
a368c596cb Bug 1214710 - [1.11] Implement ReaderQueue for simultaneous decoder limit enforcement. r=jya,jwwang 2016-06-08 18:04:32 +02:00
Carsten "Tomcat" Book
d8feaef998 Backed out changeset 74a7d364f5a3 (bug 1214710) for bustage on a CLOSED TREE 2016-06-08 12:08:53 +02:00
Carsten "Tomcat" Book
6a323f91ff Backed out changeset d64ca44c11ce (bug 1214710) 2016-06-08 12:08:40 +02:00
Eugen Sawin
590ee15d1a Bug 1214710 - [2.4] Recover decode seek position when resuming suspended playback. r=jwwang 2016-06-08 11:31:20 +02:00
Eugen Sawin
5a015f6bec Bug 1214710 - [1.11] Implement ReaderQueue for simultaneous decoder limit enforcement. r=jya,jwwang 2016-06-08 11:29:11 +02:00
Dan Glastonbury
eaa1d08d90 Bug 1276570: Replace TargetQueues enum with bitwise-or flags. r=jwwang
MozReview-Commit-ID: 95rnjumeBf

--HG--
extra : rebase_source : bffaaa632cbe2f9d27f82746a85f2089ede6301a
2016-05-31 14:32:37 +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
Dan Glastonbury
78730160f5 Bug 1224973 - Part 3: Plumb element visibility into MDSM. r=jya,jwwang
change MediaDecoder::mIsVisible to be a Canonical<bool> and plumb through to
the MediaDecoderStateMachine.  This will be used to trigger suspending the
decoding of video frames.

MozReview-Commit-ID: F3Dpf0ogE7c
2016-05-12 09:53:51 +10: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
e7a6f22684 Bug 1265629 - Remove unused MediaDecoderReader::BreakCycles(). r=kaku. 2016-04-20 14:45:19 +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
Jean-Yves Avenard
e345db00ed Bug 1243608: P4. Have MediaDecoderReader::SeekPromise return a TimeUnit. r=cpearce 2016-02-02 18:57:13 +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
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
JW Wang
518cc44e44 Bug 1219142. Part 2 - remove unused code. r=jya. 2015-11-18 09:01:01 +08:00
JW Wang
fbb85ac25a Bug 1219142. Part 1 - add AbstractMediaDecoder::DataArrivedEvent() to publish events. r=jya. 2015-11-18 09:00:56 +08:00
JW Wang
8dedbfa33d Bug 1223599 - Remove the throttling argument from AbstractMediaDecoder::NotifyDataArrived(). r=jya. 2015-11-11 17:59:16 +08:00
JW Wang
2344481e8c Bug 1220558. Part 2 - remove unused members. r=jya. 2015-11-11 07:43:41 +08:00
JW Wang
4f2d0e76bc Bug 1220558. Part 1 - remove unused arguments from MediaDecoderReader::DispatchNotifyDataArrived() and its callees/callers. r=jya. 2015-11-11 07:43:38 +08: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
JW Wang
ab48413bfa Bug 1217692. Part 2 - fix some styles to keep 80 cols limit. r=jya. 2015-10-26 11:29:48 +08:00
JW Wang
82503359f9 Bug 1217692. Part 1 - move members that don't have to be public to protected or private sections. r=jya. 2015-10-26 11:25:25 +08: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
cc0244c899 Bug 1215003. Part 3 - fix AsyncReadMetadata() and its callers. r=gerald. 2015-10-19 10:52:34 +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
JW Wang
2b5568154e Bug 1215003. Part 1 - Move MediaDecoderReader::ReadMetadata and overrides to private sections. r=gerald. 2015-10-19 10:51:48 +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
Nathan Froyd
583afa0965 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
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
JW Wang
d3c9b0b0df Bug 1212723. Part 2 - remove unused argument aCloneDonor from MediaDecoderReader::Init(). r=jya. 2015-10-13 15:28:57 +08:00
JW Wang
146f761ff8 Bug 1212246. Part 2 - remove mTaskQueueIsBorrowed and unnecessary checks for mTaskQueue is never null. r=jya. 2015-10-09 09:25:43 +08:00
JW Wang
32c513290f Bug 1212246. Part 1 - remove the aBorrowedTaskQueue parameter from the MediaDecoderReader constructor. r=jya. 2015-10-09 09:25:23 +08:00
JW Wang
88f2b7fbdf Bug 1209887. Part 1 - add assertions. r=jya. 2015-09-30 06:55:20 +08:00
JW Wang
0bb44154c7 Bug 1208932 - Remove ReadMetadataFailureReason::WAITING_FOR_RESOURCES. r=jya. 2015-09-27 20:48:09 +08:00