Commit Graph

12 Commits

Author SHA1 Message Date
Chris Pearce
12f8d2203e Bug 1352556 - Validate output of MFGetAttributeSize. r=gerald
MozReview-Commit-ID: J1NirhKfTK6
2017-05-01 16:12:27 +12:00
JW Wang
f2ea37e57b Bug 1357986 - Use helper functions of TimeUnit to make code more readable. r=kaku
1. using media::TimeUnit to save some typing.
2. replace TimeUnit() with TimeUnit::Zero().
3. replace TimeUnit::FromXXX(0) with TimeUnit::Zero().
4. replace TimeUnit::FromMicroseconds(std::numeric_limits<int64_t>::max()) with TimeUnit::FromInfinity().
5. replace some uses of int64_t with TimeUnit.
6. replace t > TimeUnit() with t.IsPositive().

MozReview-Commit-ID: 6hC94PXx86i

--HG--
extra : rebase_source : 1ea3b409e6ec12915f3e1a00359d6ff4152c8917
extra : intermediate-source : e31a12ad0e7a4840119036f261ed17eaaff85734
extra : source : ae07ee48000c4a52da0e4fd502b4d690ec51ce1f
2017-04-17 16:35:04 +08:00
Jean-Yves Avenard
9fc377410f Bug 1337559: P3. Fix coding style of windows decoder. r=gerald
MozReview-Commit-ID: 2O9sn9Y1qzB

--HG--
extra : rebase_source : bd5c33150201d3672a5c8f67aca581141d7e49f4
2017-02-11 03:24:56 +11:00
Chris Peterson
4b56a6fac1 Bug 1324183 - Part 1: Remove some Windows Vista and 7 version checks in dom/media/. r=gerald
--HG--
extra : amend_source : 64fbc1c09fd0b5d1b7c560716f8b23003662fe95
extra : histedit_source : b94fa9bb663c607affe43740e3a546861d6a74fb
2016-12-17 16:59:52 -08:00
Chris Pearce
1c82c47cb2 Bug 1279171 - Add Windows Version checks in wmf::MFStartup() and PDMFactory::CreatePDMs(). r=mattwoodrow
I was able to reproduce the crash in CMFPropertyStore::CreatePropertyStore
once when running under Win95 Compatibility mode. Normally Firefox crashes
trying to start up under Compatibility mode, so it's hard for me to verify
that this patch fixes the crash. We'll just have to push it and see.

In compatibility mode, GetVersionEx() returns the Windows version being
emulated, so if we add version checks around where we start up WMF, we
should catch the users running in compatibility mode.

We can also refrain from starting the RemoteDecoderModule if we're not
going to be able to use WMF in the GPU process; if we're on Windows less
than Vista, or if we're emulating Windows less then Vista.

MozReview-Commit-ID: Iu4B1NcgHio

--HG--
extra : rebase_source : 80e9f446a60c7f4edcb1219ec2702e68376e3aa0
2016-10-04 16:05:53 +13:00
Eric Rahm
e5be6e71b3 Bug 1307223 - Don't warning multiple times about WMF dlls failing to load. r=cpearce
We already report failure in |LoadDlls| on the initial failure to load, there's
no need to warn more than once per session.

MozReview-Commit-ID: FhsR2ZaMSLT

--HG--
extra : rebase_source : ae7d94af5c9d9253b82b2d45dc6967b5b21c6492
2016-10-03 14:02:15 -07:00
Jean-Yves Avenard
e4508d8aa1 Bug 1217226: P1. Use VideoInfo display size data rather than attempt to detect value in stream. r=cpearce
The VideoInfo data now contains accurate and up to date information about the video display size, its aspect ratio and borders.

While the WMF can determine those values for H264 through the SPS NAL, it can't be done reliably for a VP9 stream.

Picture size is still determined by the WMF to ensure the allocated DXVA texture has the right size.
2015-10-29 00:46:30 +11: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
Jean-Yves Avenard
c7b6fa505d Bug 1179094: Use TimeUnit in PlatformDecoderModule. r=cpearce 2015-07-08 10:56:16 +10:00
Chris Pearce
1b2cf52b02 Bug 1174055 - Remove some now uncalled WMF functions. r=jya 2015-06-16 14:28:01 +12:00
Chris Pearce
2f60326595 Bug 1174055 - Remove WMFReader. r=jya
--HG--
rename : dom/media/wmf/DXVA2Manager.cpp => dom/media/platforms/wmf/DXVA2Manager.cpp
rename : dom/media/wmf/DXVA2Manager.h => dom/media/platforms/wmf/DXVA2Manager.h
rename : dom/media/wmf/WMF.h => dom/media/platforms/wmf/WMF.h
rename : dom/media/wmf/WMFUtils.cpp => dom/media/platforms/wmf/WMFUtils.cpp
rename : dom/media/wmf/WMFUtils.h => dom/media/platforms/wmf/WMFUtils.h
2015-06-16 14:28:01 +12:00