Commit Graph

259 Commits

Author SHA1 Message Date
sajitk
582e1a55fa Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian 2015-11-15 14:49:01 +01:00
Wes Kocher
f3a9eb2a26 Backed out changeset 1e5f3d1151d6 (bug 1219480) for cpp unittest bustage CLOSED TREE
--HG--
extra : commitid : BMVKq6cPeho
2015-11-11 09:36:56 -08:00
sajitk
3cbe348cdd Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian
--HG--
extra : rebase_source : c73098485fa005d914304fb6e7f8eba3c15e66dc
2015-11-11 06:52:00 +01:00
Jean-Yves Avenard
290f389093 Bug 1221825: P2. Ensure frame memory allocation succeeded. r=cpearce 2015-11-12 01:10:37 +11:00
Sotaro Ikeda
4c2784ab56 Bug 1214997 - Use MozPromise in MediaCodecProxy and OMXCodecProxy r=bwu 2015-11-10 05:42:42 -08:00
John Lin
39c2ac658f Bug 1222919 - Make ProcessFlush() virtual. r=jya 2015-11-09 18:59:00 +01:00
John Lin
c101307436 Bug 1216895 - assert that decoder methods are run on correct thread. r=jya
--HG--
extra : rebase_source : 37e335c89a88ff1744b55e006b67132f11fc2080
2015-11-09 18:58:00 +01:00
Benjamin Chen
cf35fa9aa2 Bug 1219300 - Add mutex to protect the |result| because the variable will be access by multiple threads at the same time. r=cpearce 2015-11-06 15:28:22 +08:00
John Lin
2839234b55 Bug 1217220 - use output timestamp to decide which item needs to be removed from waiting list. r=jya
--HG--
extra : rebase_source : cb63a9d083c235ad92f7cedb48140bc8420f9549
2015-11-06 01:38:00 +01:00
Mike Hommey
4d40edea15 Bug 1221453 - Use AbsolutePaths with LOCAL_INCLUDES instead of manual -I in CXXFLAGS. r=gps 2015-11-06 09:59:21 +09:00
Nathan Froyd
1f0804852a Bug 1220491 - clarify ownership relationships for creators of AudioData; r=gerald
The way we pass in AudioDataValue arrays into AudioData is non-uniform:
sometimes we have nsAutoArrayPtrs, sometimes we don't, and it's not
immediately obvious from the function signature of the constructor that
we're actually taking ownership of this array.  Let's fix that by using
UniquePtr<AudioDataValue[]> smart pointers to hold the data prior to
creating AudioData values, and for passing in to AudioData's
constructor.  Using standard-er C++ things instead of our homegrown ones
is a good thing.
2015-11-01 17:34:26 -05:00
John Lin
2f883c5504 Bug 1199809 - Make a copy of output buffer after flush(). r=sotaro 2015-11-01 23:25:00 +01:00
John Lin
7c5a9241cb Bug 1199809 - Refactor: use RAII to help manage output buffer lifecycle. r=sotaro 2015-10-29 21:14:00 +01:00
John Lin
c405c5b4c1 Bug 1199809 - Don't schedule decoder I/O task when there will be more input. r=bwu 2015-10-29 21:14:00 +01:00
John Lin
62176cd8f0 Bug 1199809 - Create native window early to avoid race condition. r=jya
If AsyncAllocateVideoMediaCodec() run faster enough, mNativeWindow will be created after codecReserved() is called and we'll configure decoder w/o native window.
2015-10-29 21:14:00 +01:00
John Lin
c806e89190 Bug 1199809 - Reset last decoded frame time on looper thread to avoid race condition. r=jya 2015-10-29 21:14:00 +01:00
John Lin
33bad36665 Bug 1199809 - Remove all references to unused task queue. r=jya 2015-10-29 21:14:00 +01:00
Birunthan Mohanathas
9985829ecc Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Jean-Yves Avenard
bd9b321d2d Bug 1219134: P4. Properly assign the decoded sample duration. r=edwin
We default to the previous logic if for some unlikely condition we couldn't find the frame's duration (using the last input frame's duration)
2015-11-02 12:18:42 +11:00
Jean-Yves Avenard
c21fe67619 Bug 1219134: P3. Properly set the keyframe flag. r=edwin
We were incorrectly setting the keyframe flag of the last input sample rather than of the decoded one.
2015-11-02 12:18:41 +11:00
Jean-Yves Avenard
3787f2d9e5 Bug 1219134: P2. Use LibAV/FFmpeg logic to detect invalid pts. r=edwin
The logic was extracted from LibAV cmdutils.c. FFmpeg provides an API for that (av_frame_get_best_effort_timestamp()) unfortunately this isn't provided by LibAV.
So copy the logic instead in order to keep compatibility with the two forks.
2015-11-02 12:18:40 +11:00
Jean-Yves Avenard
fe233d60f5 Bug 1219134: P1. Fix pts calculation in FFmpeg video decoder. r=edwin
This is the primary reason why we got no pts returned (pts were set to 0) when using early version of LibAV. Apparently you are expected to set the pts when allocating the buffer of a frame.
This is undocumented, but both LibAV and FFmpeg do so internally. So do the same.
2015-11-02 12:18:40 +11:00
Carsten "Tomcat" Book
657fae2cc0 Backed out changeset 571ec9b53caa (bug 1219134) on request from jya for problems with the FFmpeg 2015-10-30 13:51:03 +01:00
Carsten "Tomcat" Book
42a2e03f42 Backed out changeset 4953d5ffbacf (bug 1219134) 2015-10-30 13:50:30 +01:00
Carsten "Tomcat" Book
657bc370a2 Backed out changeset 68799b5ac681 (bug 1219134) 2015-10-30 13:50:29 +01:00
Carsten "Tomcat" Book
0b6f8e837a Backed out changeset 6b57ad2001ff (bug 1219134) 2015-10-30 13:50:27 +01:00
Jean-Yves Avenard
ec0cfbcf70 Bug 1219134: P4. Properly assign the decoded sample duration. r=edwin
We default to the previous logic if for some unlikely condition we couldn't find the frame's duration (using the last input frame's duration)
2015-10-30 19:11:53 +11:00
Jean-Yves Avenard
f9f672be30 Bug 1219134: P3. Properly set the keyframe flag. r=edwin
We were incorrectly setting the keyframe flag of the last input sample rather than of the decoded one.
2015-10-30 19:11:53 +11:00
Jean-Yves Avenard
12142482c6 Bug 1219134: P2. Use LibAV/FFmpeg logic to detect invalid pts. r=edwin
The logic was extracted from LibAV cmdutils.c. FFmpeg provides an API for that (av_frame_get_best_effort_timestamp()) unfortunately this isn't provided by LibAV.
So copy the logic instead in order to keep compatibility with the two forks.
2015-10-30 19:11:52 +11:00
Jean-Yves Avenard
b9466da3da Bug 1219134: P1. Fix pts calculation in FFmpeg video decoder. r=edwin
This is the primary reason why we got no pts returned (pts were set to 0) when using early version of LibAV. Apparently you are expected to set the pts when allocating the buffer of a frame.
This is undocumented, but both LibAV and FFmpeg do so internally. So do the same.
2015-10-30 19:11:52 +11:00
Chris Pearce
58dbc83919 Bug 1214967 - Create a list of GMPs/codecs that can be used for <video> decoding. r=jwwang 2015-10-29 21:54:52 +13:00
Chris Pearce
143cbf9e7c Bug 1210231 - Enable unencrypted <video> playback using Adobe's GMP for decoding. r=jya 2015-10-29 21:54:38 +13:00
Jean-Yves Avenard
7dcba4750b Bug 1218577: Use only Blank PDM if enabled. r=kamidphish 2015-10-29 10:35:52 +11:00
James Willcox
d51dcbce99 Bug 1214678 - Allow Apple media decoders to work on iOS r=jya 2015-10-28 14:10:28 -05:00
Sotaro Ikeda
515f989f4b Bug 1219140 - Remove AskMediaCodecAndWait() r=bwu 2015-10-28 05:30:12 -07:00
Jean-Yves Avenard
554ca9db03 Bug 1195094: P2. Ensure TrackInfo object passed to constructor is never modified. r=cpearce
The PDM documentation states that it is safe to keep a reference to the TrackInfo object provided to the constructor.

However, this wasn't enforced by the H264Converter which would modify the object and worse, did in a non thread-safe fashion
2015-10-29 00:46:31 +11:00
Jean-Yves Avenard
aee82bf660 Bug 1195094: P1. Properly detects SPS changes for decoders requiring Annex B. r=cpearce 2015-10-29 00:46:31 +11:00
Jean-Yves Avenard
ec67463c06 Bug 1217226: P2. Implement WMFMediaDataDecoder::ConfigurationChanged. r=cpearce
We need to be notified by the reader that the stream content has changed as we no longer rely on the WMF to analyze it.
2015-10-29 00:46:31 +11: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
Jean-Yves Avenard
235047e12e Bug 1101885: P5. Only attempt to use HW VP decoder if DXVA active. r=cpearce 2015-10-29 00:46:30 +11:00
Jean-Yves Avenard
f630daef7a Bug 1101885: P3. Allow decoder creation fallback. r=cpearce
While we may be able to instantiate a decoder, we may not be able to initialise
it once all information is available.
2015-10-29 00:46:30 +11:00
Jean-Yves Avenard
2a94872b8e Bug 1101885: P2. Don't shutdown WMF framework before releasing decoder. r=cpearce 2015-10-29 00:46:30 +11:00
Jean-Yves Avenard
d78e64baeb Bug 1101885: P1. Make pref dynamic. r=cpearce
So we don't have to restart the browser for changes to take effect.
2015-10-29 00:46:30 +11:00
James Willcox
1866d4ece3 Bug 1204483 - Fix busted audio decoding output on Android r=esawin 2015-10-27 12:43:50 -05:00
Eugen Sawin
01e0e7c1d8 Bug 1163667 - [5.1] Ensure empty demuxer sample queue before initiating draining. r=snorp 2015-10-26 18:30:53 +01:00
Chris Pearce
e2337163c0 Bug 1205083 - Don't enable low latency WMF video decoding as it crashes sometimes. r=jya 2015-10-21 21:17:56 +13:00
Benjamin Chen
1bb190d317 Bug 1174721 - Use AudioCompactor for GonkAudioDecoderManager. r=sotaro
--HG--
extra : transplant_source : %29%E2H%CF%87k%D4%F4%5Dj%EE%00%CBD%BB%9Em%3C%3A%BC
2015-10-21 10:09:39 +08:00
John Lin
52219acf63 Bug 1207214 - Assert decoder attaches EOS flag to final output buffer. r=sotaro
--HG--
extra : rebase_source : 760fc437d59a3d57d42e0cd6755f6b7016158840
2015-10-16 00:45:00 -04:00
Alfredo Yang
0eb273bf78 Bug 1215441 - Skip flush before Init() is completed. r=sotaro
--HG--
extra : rebase_source : 6eb1535c88637c72ce1945ff773f7de359fb9688
2015-10-16 01:02:00 -04: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