Commit Graph

259 Commits

Author SHA1 Message Date
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
Phil Ringnalda
915c3cb404 Back out 2 changesets (bug 1214967) for b2g debug mochitest-14 hangs, or perhaps fatal assertions failing to be fatal until a hang, or summat
CLOSED TREE

Backed out changeset 120b53ea0f41 (bug 1214967)
Backed out changeset af6b752acbd0 (bug 1214967)
2015-10-16 20:26:20 -07:00
Chris Pearce
5802a627b3 Bug 1214967 - Create a list of GMPs/codecs that can be used for <video> decoding. r=jwwang 2015-10-17 10:39:36 +13:00
John Lin
5bd83278c7 Bug 1170589 - Force decoder to use all allocated buffers. r=bwu 2015-10-14 14:12:25 +08:00
Sotaro Ikeda
2ae2b0b270 Bug 1210045 - Fix GonkVideoDecoderManager shutdown during initialization r=bwu 2015-10-15 22:25:57 -07:00
Chris Pearce
b339118972 Bug 1214932 - Add media.wmf.enabled pref. r=jya 2015-10-15 14:51:34 +13:00
Chris Pearce
bd6f4df204 Bug 1214932 - Add exclusion guards for platform specific media pref caches. r=jya 2015-10-15 14:51:31 +13:00
Chris Pearce
83fed249a0 Bug 1214932 - Remove fragmented-mp4 from media prefs. r=jya 2015-10-15 14:51:28 +13:00
Jean-Yves Avenard
0269af726a Bug 1212795: P3. Make AppleDecoderModule detects if the required modules are loaded. r=jwwang 2015-10-12 14:47:50 +11:00
Jean-Yves Avenard
b104670364 Bug 1212795: P2. Ensure all frameworks required for video decoding on mac are loaded. r=jwwang
We used to rely on the compositor to have been started, which is a dangerous assumption..
2015-10-12 14:47:49 +11:00
Jean-Yves Avenard
7af6ac5cb1 Bug 1212795: P1. Ensure the check if HW acceleration is allowed is performed on the main thread. r=jwwang
The downside is that a restart is now required if the user change the preference to force HW decoding ; however this is the same behaviour as on Windows.
2015-10-12 14:47:49 +11:00
Jean-Yves Avenard
7d704a120e Bug 1213173: Always use FFmpeg regardless of version. r=kentuckyfriedtakahe
We don't need to prevent using FFmpegDecoderModule on older version anymore
2015-10-12 10:00:04 +11:00
Jean-Yves Avenard
50da6b541f Bug 1213131: [vpx] Configure libvpx decoder to use multi-threads decoding. r=kentuckyfriedtakahe 2015-10-09 15:46:38 +11:00
John Lin
ec509c177b Bug 1198664 - Use looper to process decoder tasks. r=bwu
--HG--
extra : rebase_source : dc2b04fb2ca4bb5298783993fdcb50854086e228
2015-10-07 00:32:00 +02:00
John Lin
1d3c7f5365 Bug 1198664 - Refactor: move common behaviors to base class. r=bwu,jya
--HG--
extra : rebase_source : 638f1e27980212e7b47e091bbc2450f6b99aa6c5
2015-10-06 02:18:00 +02:00
Chris Pearce
4350c14ce1 Bug 1212670 - Implement GMPDecoderModule::SupportsMimeType() and EMEDecoderModule::SupportsMimeType(). r=jwwang 2015-10-08 20:40:54 +13:00
Chris Pearce
70498d2115 Bug 1211812 - Add pref to select GMP to use for unencrypted decoding. r=jwwang 2015-10-08 20:40:09 +13:00
Chris Pearce
315fca7c60 Bug 1211812 - Use MozPromise to init mozilla::GMPVideoDecoder. r=jwwang 2015-10-08 20:38:59 +13:00
Jean-Yves Avenard
9a7c13fa78 Bug 1206977: P15. Fix FFmpeg shutdown crash should decoder not be initialised. r=me 2015-10-08 00:34:49 +11:00
Jean-Yves Avenard
e32d97b854 Bug 1206977: P13. Assert that data fed to EMEDecoderModule is encrypted. r=cpearce
The PDMFactory ensures that the EMEDecoderModule is only used for encrypted data, we can simplify EMEDecoderModule and make strong assumptions
2015-10-08 00:34:48 +11:00
Jean-Yves Avenard
620a0262c9 Bug 1206977: P9. Ensure PDMs are only ever created through the PDMFactory. r=cpearce 2015-10-08 00:34:46 +11:00
Jean-Yves Avenard
5d54dafcb3 Bug 1206977: P8. Have PDMFactory directly manage the EMEDecoderModule. r=cpearce 2015-10-08 00:34:45 +11:00
Jean-Yves Avenard
c463ef6fd5 Bug 1206977: P6. Make PlatformDecoderModule::SupportsMimeType pure virtual. r=cpearce 2015-10-08 00:34:44 +11:00
Jean-Yves Avenard
ff58eec402 Bug 1206977: P5. Update PlatformDecoderModule documentation. r=cpearce
Mostly removes no longer relevant doc.
2015-10-08 00:34:44 +11:00
Jean-Yves Avenard
9e830ea930 Bug 1206977: P4. Add AgnosticDecoderModule object. r=cpearce
This removes the need for PDMFactory to know anything about decoders.
2015-10-08 00:34:43 +11:00
Jean-Yves Avenard
35090bba3a Bug 1206977: P3. Allow PDM fallback. r=cpearce
We now search in all the PDM present the one that can handle the media.
2015-10-08 00:34:42 +11:00
Jean-Yves Avenard
dd5e99c694 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
cc74e2d1a4 Bug 1206977: P1. Remove unused PDM function members. r=cpearce 2015-10-08 00:34:41 +11:00
Jean-Yves Avenard
9861c50a98 Bug 1211335: Have FFMpegDecoderModule properly return if a codec is supported. r=cpearce 2015-10-08 00:34:41 +11:00
Nigel Babu
1a01355c4f 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
7e537c9909 Backed out changeset abaadd5361ad (bug 1198664) for B2G build bustage ON A CLOSED TREE 2015-10-07 12:33:08 +05:30
Nigel Babu
8a586a51d4 Backed out changeset 3a4fb0ededfd (bug 1198664) for B2G build bustage ON A CLOSED TREE 2015-10-07 12:32:01 +05:30
John Lin
993994a080 Bug 1198664 - Part 2 - Use looper to process decoder tasks. r=bwu 2015-10-06 02:20:00 +02:00
John Lin
3e0637f43f Bug 1198664 - Part 1 - Refactor: move common behaviors to base class. r=bwu,jya 2015-10-06 02:18:00 +02:00
Jean-Yves Avenard
ac5814731c Bug 1206977: P13. Assert that data fed to EMEDecoderModule is encrypted. r=cpearce
The PDMFactory ensures that the EMEDecoderModule is only used for encrypted data, we can simplify EMEDecoderModule and make strong assumptions
2015-10-07 16:40:30 +11:00
Jean-Yves Avenard
27b77f96da Bug 1206977: P9. Ensure PDMs are only ever created through the PDMFactory. r=cpearce 2015-10-07 16:40:28 +11:00
Jean-Yves Avenard
2da2bd26f9 Bug 1206977: P8. Have PDMFactory directly manage the EMEDecoderModule. r=cpearce 2015-10-07 16:40:27 +11:00
Jean-Yves Avenard
7ad7357100 Bug 1206977: P6. Make PlatformDecoderModule::SupportsMimeType pure virtual. r=cpearce 2015-10-07 16:40:26 +11:00
Jean-Yves Avenard
046f9f13a9 Bug 1206977: P5. Update PlatformDecoderModule documentation. r=cpearce
Mostly removes no longer relevant doc.
2015-10-07 16:40:25 +11:00
Jean-Yves Avenard
55d1cb62fc Bug 1206977: P4. Add AgnosticDecoderModule object. r=cpearce
This removes the need for PDMFactory to know anything about decoders.
2015-10-07 16:40:25 +11:00
Jean-Yves Avenard
78fc388e1e Bug 1206977: P3. Allow PDM fallback. r=cpearce
We now search in all the PDM present the one that can handle the media.
2015-10-07 16:40:24 +11:00
Jean-Yves Avenard
0256993164 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
9586070ed3 Bug 1206977: P1. Remove unused PDM function members. r=cpearce 2015-10-07 16:40:23 +11:00
Jean-Yves Avenard
89639edfde Bug 1211335: Have FFMpegDecoderModule properly return if a codec is supported. r=cpearce 2015-10-07 16:40:22 +11:00
Chris Pearce
494f013e18 Bug 1211339 - Ensure WMFDecoderModule::SupportsMimeType checks it can create decoders. r=jya 2015-10-06 16:52:52 +13:00
Carsten "Tomcat" Book
239ba800f1 Backed out 2 changesets (bug 1211339) for m3 test failures on a CLOSED TREE
Backed out changeset 91bff7bc67d7 (bug 1211339)
Backed out changeset d34f694b13cf (bug 1211339)
2015-10-05 14:34:44 +02:00
Chris Pearce
addcdce5f7 Bug 1211339 Part 1 - Ensure WMFDecoderModule::SupportsMimeType checks it can create decoders. r=jya 2015-10-05 22:39:00 +13:00
Alfredo Yang
d66d46126b Bug 1204622 - release codec listener at reader task queue. r=jya
--HG--
extra : rebase_source : adb41147997f51941746af1f8dfe151f784c1771
2015-10-01 00:43:00 +02:00
Jean-Yves Avenard
bf482d2ca8 Bug 1207442: Disable ffvpx with libav0.8 and earlier. r=edwin 2015-10-01 19:40:20 +10:00
Jean-Yves Avenard
e00a89455b Bug 1209806: Remove dependency on libavformat. r=edwin 2015-10-01 19:05:47 +10:00
Eugen Sawin
949294537b Bug 1190379 - Disable surface copying on emulators. r=snorp 2015-09-29 00:56:51 +02:00
Eugen Sawin
847a4ccf96 Bug 1190379 - Use AndroidDecoderModule for VP8/9. r=jya 2015-09-29 00:56:51 +02:00
Jean-Yves Avenard
57037c7820 Bug 1208917: Fix VP9 decoding with recent version of libav. r=kentuckyfriedtakahe
Recent libav do not require a codec parser to decode VP9.
2015-09-28 10:30:03 +10:00
Jean-Yves Avenard
3f3757ce78 Bug 1207429: P2. Enable FFmpeg by default if available. r=kentuckyfriedtakahe
By default we only use libav 9 or FFmpeg 1.2 if found on the system.

If media.fragmented-mp4.ffmpeg.enabled is set, will allow use of libav 0.7 and ffmpeg 0.8 or later.
2015-09-27 15:19:28 +10:00
Sotaro Ikeda
34a6dca7cc Bug 1205351 - Replace nsBaseHashtable::Enumerate() calls in dom/media/ with iterators r=cpearce 2015-09-24 18:48:25 -07:00
Jeff Gilbert
187dfafc29 Bug 1191042 - Use CreateOffscreen for WebGL instead of CreateHeadless. - r=jrmuizel 2015-09-24 12:21:05 -07:00
Chris Pearce
787b689f00 Bug 1207376 - Check whether H264Converter created its decoder successfully. r=jya 2015-09-23 17:46:04 +12:00
Jean-Yves Avenard
5d1d418de1 Bug 1206979: P3. Request S16 audio for libav 0.8 and earlier. r=edwin 2015-09-23 12:59:28 +10:00
Jean-Yves Avenard
4dd514a9b5 Bug 1206979: P2. Get around libav 0.8.5 bug. r=edwin
And probably others. When multhreading decoding is enabled ; the frames dimensions were incorrectly set.
2015-09-23 12:59:27 +10:00
Jean-Yves Avenard
71d911ed61 Bug 1206979: P1. Add method to determine which version of libavcodec is available. r=edwin 2015-09-23 12:59:27 +10:00
Jean-Yves Avenard
9a88d127d2 Bug 1206568: P2. Clean up header declarations. r=cpearce
Make it consistent across the use of virtual/override
2015-09-23 12:59:26 +10:00
Jean-Yves Avenard
8283012c2a Bug 1206568: P1. Ensure FFmpeg decoder is only accessed through the decoder's task queue. r=cpearce
Add strong assertion that it is indeed the case.
2015-09-23 12:59:25 +10:00
Phil Ringnalda
449e9119b4 Back out f84aedf7a62d (bug 1191042) for b2g emulator test failures
CLOSED TREE
2015-09-22 19:26:13 -07:00
Jeff Gilbert
8d443901df Bug 1191042 - Use CreateOffscreen for WebGL instead of CreateHeadless. - r=jrmuizel 2015-09-22 16:49:25 -07:00
Wes Kocher
38fc20426e Backed out changeset 49a711e67d8b (bug 1190379) for various android crashes CLOSED TREE 2015-09-21 09:09:29 -07:00
Eugen Sawin
3907bbb549 Bug 1190379: Use AndroidDecoderModule for VP8/9. r=jya 2015-09-21 16:39:12 +02:00
Jean-Yves Avenard
05453d1f17 Bug 1193670: P3. Remove no longer needed SharedDecoderManager class. r=cpearce 2015-09-16 18:14:17 +10:00
Jean-Yves Avenard
5d87284234 Bug 1204776: P4. Have VPX/Opus/Vorbis decoder use PlatformDecoderModule log. r=cpearce 2015-09-16 12:26:04 +10:00
Jean-Yves Avenard
86e37be133 Bug 1204776: P3. Have FFmpeg PDM use PlatformDecoderModule log. r=cpearce 2015-09-16 12:26:04 +10:00
Jean-Yves Avenard
79a43bbd6b Bug 1204776: P2. Make Apple PDM use PlatformDecoderModule log. r=cpearce 2015-09-16 12:26:03 +10:00
Jean-Yves Avenard
5264765a6e Bug 1204776: P1. Have the PlatformDecoderModules use their own log. r=cpearce
Stop using MP4Demuxer.
2015-09-16 12:26:03 +10:00
Ralph Giles
0d0442a459 Bug 1204672 - Fix a log comment typo. r=gerald
--HG--
extra : rebase_source : 8c68bbe933909c7aafc0492d330d87dc0e3b5700
2015-09-14 14:22:55 -07:00
Matt Woodrow
d546102ebb Bug 1200775 - Followup to fix typo and indent issues
--HG--
extra : rebase_source : cb495e5ba5afc28455d0a6f3dba7fea38c1d4ba1
2015-09-10 15:15:41 -04:00
Matt Woodrow
c44bc286ab Bug 1202296 - Recreate the MFTDecoder when we want to disable DXVA. r=cpearce
--HG--
extra : rebase_source : 9731f42fccede3910efd674ca4cef79ac4b3f17b
2015-09-10 13:39:02 -04:00
Matt Woodrow
a4a6ea224d Bug 1202296 - Hide the MFTDecoder within MFTManager so that we can recreate it opaquely. r=cpearce
--HG--
extra : rebase_source : 8ce6adacd26ceaa243737db06fc652a8dd16bdc6
2015-09-10 13:38:17 -04:00
Matt Woodrow
ed728f3334 Bug 1200775 - Check intel specific h264 decoder when checking for DXVA support. r=cpearce
--HG--
extra : rebase_source : 1ba6576d38a0ccfe4c78b082b0d0bc97b293078f
2015-09-10 13:20:21 -04:00
Jean-Yves Avenard
6f800ab99a Bug 1197319: P3. Allow VP8/VP9 decoding via FFmpeg. r=kentuckyfriedtakahe 2015-09-10 22:05:39 +10:00
Jean-Yves Avenard
13a129c06b Bug 1197319: P2. Parse raw data to identify single frames before decoding. r=kentuckyfriedtakahe
A VP9 or VP9 packet may contains alternate frames. They need to be fed separately to the ffmpeg decoder.
2015-09-10 22:05:39 +10:00
Jean-Yves Avenard
bcf327201c Bug 1197319: P1. Fix image alignment allocation. r=kentuckyfriedtakahe 2015-09-10 22:05:38 +10:00
Chris Pearce
1850678d9d Bug 1197050 - Move GMPDecoderModule up in PlatformDecoderModule::CreatePDM(). r=jya 2015-08-31 16:08:51 +12:00
Chris Pearce
2a8456892c Bug 1197064 - Don't assume positive audio frame offset in GMPAudioDecoder. r=jya 2015-08-31 16:08:51 +12:00
Nicholas Nethercote
f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Ryan VanderMeulen
5de5b6089e Merge m-c to inbound. a=merge
CLOSED TREE
2015-08-27 21:34:20 -04:00
Ryan VanderMeulen
b5b68e3ea5 Merge inbound to m-c. a=merge 2015-08-27 21:31:35 -04:00
Munro Chiang
fe8c5a0eb4 Bug 1178214 - Return INIT_ERROR when video resolution exceeds hw codec capability. r=sotaro 2015-08-24 17:39:34 +08:00
Jan Gerber
047564197e Bug 1197777 - Use libavformat-ffmpeg.so.56 if available. r=k17e
--HG--
extra : rebase_source : 54ef1b5058acc3a9b38dc5538f9a1c2592226300
2015-08-24 14:08:09 +02:00
Gerald Squelart
6d3ff1e50e Bug 1194518 - Part 5: Using std::deque instead of nsTArray to store delayed frames. r=jya
--HG--
extra : histedit_source : de2ea03ed86f397cd22af57712c0cac2b059dd25
2015-08-26 18:50:00 -04:00
Gerald Squelart
653149094c Bug 1194518 - Part 4: Using delaying wrapper according to pref 'media.fuzz.video-decode-minimum-frame-interval-ms'. r=jya
--HG--
extra : histedit_source : a04c70f51b2fcb9be69438972db8aee7af5f179e
2015-08-26 18:49:00 -04:00
Gerald Squelart
1c67bdca71 Bug 1194518 - Part 3: Delaying decoder wrapper, ensures a decoder appears consistently slow. r=jya
--HG--
extra : histedit_source : 56b8bcfdccceae4baa063f771ec0266348c5ede0
2015-08-26 18:47:00 -04:00
Gerald Squelart
252bc4441c Bug 1194518 - Part 2: Using passthrough wrapper if pref 'media.fuzz.video-decode-passthrough' is true. r=jya
--HG--
extra : histedit_source : cc9ffad2d732b81a7bab8409f2cf38f98c255c98
2015-08-26 18:45:00 -04:00
Gerald Squelart
170d3a19e9 Bug 1194518 - Part 1: Passthrough decoder wrapper, useful to spy on MediaFormatReader-decoder calls. r=jya
--HG--
extra : histedit_source : 6e2024c516d90bb224768d82b1110f141552e683
2015-08-26 18:43:00 -04:00
Jean-Yves Avenard
302be82a9a Bug 1199193: Ensure DrainComplete() is called once all decoded frames have been output. r=rillian 2015-08-28 10:00:35 +10:00
Jean-Yves Avenard
9628c1371f Bug 1198094: P1. Limit rate at which InputExhausted could be called by mac decoder. r=rillian 2015-08-28 10:00:34 +10:00
Phil Ringnalda
1e59442474 Back out 30a8392db2c2 (bug 1198094) for mQueuedSamples assertion failures 2015-08-26 22:09:40 -07:00
Jean-Yves Avenard
a2b1b65a1e Bug 1198094: P1. Limit rate at which InputExhausted could be called by mac decoder. r=rillian 2015-08-27 12:28:19 +10:00
Jean-Yves Avenard
82da93d699 Bug 1196558: Don't assert should output task not be dispatched. r=edwin
We are in a racy situation where the task queue could start flushing after we've tested if it was being flushed. We do not care if the task isn't going to be dispatched as we want the frame to be dropped when that happens anyway.
2015-08-26 12:50:06 +10:00
Alfredo Yang
f0e65815d2 Bug 1197151 - Correct TaskQueue asertion. r=jya 2015-08-23 19:36:00 -04:00
Timothy B. Terriberry
e81c9798f0 Bug 1196353 - Use standard Xiph extradata format to pass headers from demuxers to decoders. r=jya 2015-08-21 10:17:00 -04:00
Matt Woodrow
ec61d0727e 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
Matt Woodrow
107cd6aa7d Bug 1196411 - Disable DXVA on 60fps 1080p videos for AMD cards that can't decode quick enough. r=jya 2015-08-20 11:37:26 -04:00