Commit Graph

131 Commits

Author SHA1 Message Date
JW Wang
3165a55346 Bug 1220551. Part 2 - remove arguments from NotifyDataArrivedInternal(). r=jya. 2015-11-02 21:28:57 +08:00
JW Wang
fb4f215e74 Bug 1217714 - Remove some unused functions from MediaDecoderReader. r=jya. 2015-10-26 14:10:29 +08:00
Jean-Yves Avenard
e7316ae5cf 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
7dec790a99 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
43d11758bc Bug 1216850. Part 3 - backout bug 1214073. r=me. 2015-10-21 14:04:20 +08:00
JW Wang
6e7bab6364 Bug 1216850. Part 2 - backout bug 1214498. r=me. 2015-10-21 11:45:53 +08:00
JW Wang
44d9dd6f96 Bug 1216850. Part 1 - backout bug 1215003. r=me. 2015-10-21 10:59:56 +08:00
Eugen Sawin
7f2045a065 Bug 1211443 - Drop scheduled update if decoder initialization isn't done yet. r=jya 2015-10-19 20:13:41 +02:00
JW Wang
698a2ef447 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
e4e2da55c9 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
5254890206 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
Jean-Yves Avenard
7c80fad3c7 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.
2015-10-15 02:04:00 +02:00
JW Wang
d880584251 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
d57ef825f3 Bug 1214073 - MediaDecoderReader::ReleaseMediaResources will do dispatch if necessary. r=gerald. 2015-10-14 11:52:26 +08:00
JW Wang
8e808c080b Bug 1212723. Part 2 - remove unused argument aCloneDonor from MediaDecoderReader::Init(). r=jya. 2015-10-13 15:28:57 +08:00
JW Wang
ddb5ad7d92 Bug 1212246. Part 1 - remove the aBorrowedTaskQueue parameter from the MediaDecoderReader constructor. r=jya. 2015-10-09 09:25:23 +08:00
Jean-Yves Avenard
7d0beeed77 Bug 1212176: Remove arguments passed to MediaDataDemuxer::NotifyDataArrived API. r=cpearce
Be more explicit on what it does and how it should be used.
2015-10-08 20:47:21 +11:00
JW Wang
5b9af9d011 Bug 1212260 - MediaFormatReader::SetCDMProxy should call |OwnerThread()->Dispatch|. r=cpearce. 2015-10-08 14:05:06 +08:00
Jean-Yves Avenard
9a2f1f7a43 Bug 1206977: P11. Don't rely on SupportsMimeType to determine if a track can be played. r=cpearce
The PDMFactory will run more accurate checks based on the TrackInfo object and will fail to create a decoder if the type is unsupported. So use that instead
2015-10-08 00:34:47 +11:00
Jean-Yves Avenard
b62c8325ea Bug 1206977: P8. Have PDMFactory directly manage the EMEDecoderModule. r=cpearce 2015-10-08 00:34:45 +11:00
Jean-Yves Avenard
d024ce2042 Bug 1206977: P2. Wrap PDM creation in a new PDMFactory class. r=cpearce
There is no change of behaviour from the original PlatformDecoderModule.
2015-10-08 00:34:42 +11:00
Jean-Yves Avenard
0fd7970155 Bug 1212164: Prevent use of demuxer before initialization completes. r=cpearce 2015-10-08 00:34:40 +11:00
Nigel Babu
52bc70c35b Backed out 16 changesets (bug 1206977, bug 1211652, bug 1211335) for linux bc7 bustage ON A CLOSED TREE
Backed out changeset 51b1b076a386 (bug 1206977)
Backed out changeset dec7c35469d1 (bug 1206977)
Backed out changeset bf9ddc78b394 (bug 1206977)
Backed out changeset 08f5cff5aa12 (bug 1206977)
Backed out changeset e4e91de99867 (bug 1206977)
Backed out changeset 696ecf2e2947 (bug 1206977)
Backed out changeset ab2d524a9b35 (bug 1206977)
Backed out changeset d66be0e4547f (bug 1206977)
Backed out changeset 64c58afbd6c1 (bug 1206977)
Backed out changeset eb10d09015e1 (bug 1206977)
Backed out changeset 042959216393 (bug 1206977)
Backed out changeset 7e0de7f62202 (bug 1206977)
Backed out changeset 3d095569f6ba (bug 1206977)
Backed out changeset 041418a07ae5 (bug 1206977)
Backed out changeset 654970da23e4 (bug 1211335)
Backed out changeset 8ba8e24a84d3 (bug 1211652)
2015-10-07 13:43:39 +05:30
Nigel Babu
a893674fcd Backed out changeset 67b7e1825a7f (bug 1212164) for depending on bug 1206977 2015-10-07 13:43:10 +05:30
Jean-Yves Avenard
5d3983a845 Bug 1212164: Prevent use of demuxer before it is ready. r=cpearce 2015-10-07 16:54:43 +11:00
Jean-Yves Avenard
7d282db7f5 Bug 1206977: P11. Don't rely on SupportsMimeType to determine if a track can be played. r=cpearce
The PDMFactory will run more accurate checks based on the TrackInfo object and will fail to create a decoder if the type is unsupported. So use that instead
2015-10-07 16:40:29 +11:00
Jean-Yves Avenard
995dd6437f Bug 1206977: P8. Have PDMFactory directly manage the EMEDecoderModule. r=cpearce 2015-10-07 16:40:27 +11:00
Jean-Yves Avenard
f38b410c80 Bug 1206977: P2. Wrap PDM creation in a new PDMFactory class. r=cpearce
There is no change of behaviour from the original PlatformDecoderModule.
2015-10-07 16:40:24 +11:00
Jean-Yves Avenard
1de89b1d34 Bug 1209850: Only attempt to initialize decoders as they are required. r=alfredo 2015-10-01 23:05:16 +10:00
Carsten "Tomcat" Book
39e172d201 Backed out 1 changesets (bug 1209850) for causing m2 test failures
Backed out changeset 9c01e0e3da74 (bug 1209850)
2015-10-01 14:05:49 +02:00
Jean-Yves Avenard
3aed179a17 Bug 1209850: Only attempt to initialize decoders as they are required. r=alfredo 2015-10-01 19:07:39 +10:00
JW Wang
a321981a6a Bug 1208922. Part 6 - IsWaitingOnCDMResource() is not used by MDSM anymore. Remove it from MediaDecoderReader and make it private in MediaFormatReader. r=cpearce. 2015-09-27 18:59:52 +08:00
JW Wang
f0a92d266a Bug 1208922. Part 5 - MDSM can now query capabilities from CDMProxy without reader setting them in MediaInfo. r=cpearce. 2015-09-27 18:59:50 +08:00
JW Wang
480aaa8ac6 Bug 1208922. Part 2 - add MediaDecoderReader::SetCDMProxy so it won't need to ask MediaDecoder for a CDMProxy. r=cpearce. 2015-09-27 18:40:03 +08:00
Jean-Yves Avenard
4d804a5a95 Bug 1089586: Abort pending seeks. r=jwwang
We only perform the last seek requested instead.
2015-09-29 11:37:15 +10:00
Jean-Yves Avenard
07c2523a11 Bug 1205911: P2. Ensure demuxer is reset before performing a seek. r=edwin
Should there be any demuxing request pending resolution, it would have caused our internal seek to ultimately fail.
2015-09-18 16:03:58 +10:00
Jean-Yves Avenard
bc0f744683 Bug 1205911: P1. Cancel pending demux request when searching for next keyframe. r=edwin 2015-09-18 16:03:58 +10:00
Jean-Yves Avenard
193c1dbdb7 Bug 1204757: P1. Update MediaDataDemuxer::Init() behavior. r=cpearce
A MediaDataDemuxer is now not to resolve the init promise until it has all the metadata.
Except MediaSource, all demuxers would be doing blocking read to scan for the metadata, and having partial metadata would be an error.
For MediaSource, we pass the NotifyDataArrived message which will cause the MediaSourceDemuxer to re-attempt to search for the metadata.

When used within MediaSource's TrackBuffersManager, a demuxer will never be created until we have received a complete init segment (this task is performed by the various ContainerParsers)
2015-09-16 18:14:17 +10:00
Jean-Yves Avenard
9ecf3dbdf3 Bug 1193670: P1. Remove use of SharedDecoderManager. r=cpearce 2015-09-16 18:14:15 +10:00
Jean-Yves Avenard
d2c8ecf725 Bug 1204407: P1. Remove no longer used mainthread object. r=cpearce 2015-09-16 18:14:14 +10:00
Jean-Yves Avenard
b52263188a Bug 1204419: P3. Remove now unused MediaDecoderReader functions. r=cpearce 2015-09-16 18:14:12 +10:00
Jean-Yves Avenard
d0386ee336 Bug 1199904: Only start decoding ahead after explicitly requesting data. r=gerald
Decode ahead will be stopped when seeking or when switching resolution.
2015-08-30 20:48:09 +10:00
Jean-Yves Avenard
51689374b6 Bug 1197075: P4. Reject skip promise on cancellation or shutdown. r=edwin
Also remove redundant code.
2015-08-26 15:36:54 +10:00
Jean-Yves Avenard
38e604beda Bug 1197075: P3. Decode frames ahead of MDSM requesting them. r=edwin
This makes the media.*-decode-ahead pref performs more according to its name.
We decode audio and video in advance so a MediaDataPromise can be resolved almost instantly.
Default is 2.
2015-08-26 15:36:54 +10:00
Jean-Yves Avenard
f8a39b0726 Bug 1197075: P2. Revert "Bug 1171257 - Add force decode ahead to MediaFormatReader r=jya,bholley". r=edwin 2015-08-26 15:36:53 +10:00
Jean-Yves Avenard
f800a05d89 Bug 1196696: Always check that track demuxer was successfully created. r=jwwang 2015-08-26 12:50:06 +10:00
Jean-Yves Avenard
86fdd87d74 Bug 1197664: Report the total number of decoded frames. CLOSED TREE r=kentuckyfriedtakahe 2015-08-24 23:46:35 +10:00
Matt Woodrow
8125c31adc Bug 1196417 - Make video software fallback only affect the current video instead of the entire browser. r=cpearce 2015-08-20 11:43:36 -04:00
Benjamin Chen
47d214758e Bug 1192733: fix the MediaFormatReader can not back from dormant state. r=jya 2015-08-14 12:02:15 +08:00
Jean-Yves Avenard
b7e8770a7b Bug 1195071: Check for MediaDataDecoder::Input error. r=cpearce 2015-08-17 10:28:43 +10:00