Commit Graph

4727 Commits

Author SHA1 Message Date
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
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
419cfce138 Bug 1214967 - Proxy observer service notification across to content process when GMPs are added/removed. r=billm,jwwang 2015-10-17 10:39:45 +13: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
Nathan Froyd
fe57e31ffe Bug 1212027 - part 7 - modify IPDL codegen to store sub-protocols in a hashtable rather than an array; r=jld,nical,cpearce,billm 2015-10-07 14:30:33 -04:00
Nathan Froyd
835e1550cb Bug 1212027 - part 5 - add LoneManagedOrNull for simplifying a lot of upcoming code; r=jld
A lot of existing code has variations on:

  if (ManagedPFooChild().Length()) {
    ...(ManagedPFooChild()[0])...
  }
  // Do something with nullptr, or some other action.

It's pretty reasonable to repeat this code when the managed protocols
are stored in an array; the code gets much less nice when managed
protocols are stored in a hashtable.  Let's write a small utility
function to handle those details for us.  Then when we change the
underlying storage, we only need to update this function, rather than a
bunch of callsites.

ProtocolUtils.h is included by all the generated IPDL headers, so
LoneManagedOrNull should be available everywhere the above pattern would
be encountered.
2015-10-07 20:15:56 -04:00
Jean-Yves Avenard
6db8b43cba 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.

--HG--
extra : rebase_source : fefad83560d5bfa2aee9f665fe138397eb390019
2015-10-15 02:04:00 +02: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
Wes Kocher
0f015ebe75 Merge b2ginbound to central, a=merge 2015-10-15 11:34:27 -07:00
Carsten "Tomcat" Book
d89def21d7 Merge m-c to b2g-inbound 2015-10-15 12:04:19 +02:00
Kelly Davis
c9766e67ad Bug 1214092 - Part 1 of 1: Exposed WebSpeech API SpeechRecognition Interface to privileged apps. r=smaug 2015-10-12 22:56:00 +02:00
JW Wang
5147e1f0af Bug 1214989. Part 3 - remove MediaDecoder::Init() and its callers. r=gerald. 2015-10-15 11:39:45 +08:00
JW Wang
e868f91ff6 Bug 1214989. Part 2 - add MediaDecoderOwner to Clone() and overrides. r=gerald. 2015-10-15 11:37:47 +08:00
JW Wang
e470e1616d Bug 1214989. Part 1 - add MediaDecoderOwner to the constructors of MediaDecoder and sub-classes. r=gerald. 2015-10-15 11:36:21 +08: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
1cc6677a90 Bug 1214065 - Remove unused arguments from MediaDecoder::Load() and its friends. r=kinetik. 2015-10-14 11:46:27 +08:00
Jan-Ivar Bruaroey
48f5209447 Bug 1213738 - media::Pledge.Then() moves lambda args instead of copying them. r=jesup
--HG--
extra : transplant_source : X%BAyz%A1%BBD%03%3D%21Tv%C7%3E%CFT%02%D0%5D%85
2015-10-13 14:34:54 -04:00
Jan-Ivar Bruaroey
dad9a8cbfb Bug 1213738 - media::NewRunnableFrom() and media::NewTaskFrom() move lambda arg instead of copying it. r=jesup
--HG--
extra : transplant_source : 7%CD%AD%C5%CA%01%D6%D6%CB71%C8L%B6w6%9A%E9%ECN
2015-10-12 19:12:01 -04:00
Chris Pearce
2c28e66665 Bug 1209385 - Backout 417dab86a413 and 6078e8b4878b. r=backout 2015-10-14 19:42:25 +13:00
Chris Pearce
7f29db1d5a Bug 1214478 - Ensure MediaKeySession.close() does not store its promise twice. r=gerald 2015-10-14 19:42:24 +13:00
Gian-Carlo Pascutto
2375870ce2 Bug 1209987 - webrtc.org Engine creation and destruction should happen on the WebRTC threads. r=jesup 2015-10-14 08:39:10 +02:00
Chris Pearce
544e62ef89 Bug 121442 - Add platform to GMP storage base dir. r=gerald 2015-10-14 12:18:06 +13:00
Wes Kocher
07ed05b047 Backed out changeset fc7d1acf804f (bug 1209987) for m-e10s(2) leaks CLOSED TREE 2015-10-13 12:21:02 -07:00
Eric Rahm
d4f1bff852 Bug 1190592 - Part 2: Add test for mediasource memory reporter. r=jya 2015-10-14 20:48:58 -07:00
Kilik Kuo
3b7a3980ff Bug 1213897 - Extract DelayedScheduler out of MDSM to a common class. r=jwwang
--HG--
extra : rebase_source : 5408c282a678fe060d24138eccbe34cf99c8c929
2015-10-13 15:39:01 +08:00
Gian-Carlo Pascutto
0c40104171 Bug 1209987 - webrtc.org Engine creation and destruction should happen on the WebRTC threads. r=jesup 2015-10-13 13:58:44 +02: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
8dc6926042 Bug 1212723. Part 1 - don't share mBufferedState per bug 1212723 comment 6. r=jya. 2015-10-13 15:28:50 +08:00
Martin Thomson
95732de5e0 Bug 1213937 - Make WebRTC certificates SHA-256 only, r=drno
--HG--
extra : rebase_source : 7fcd4d357f1d1ff1991a19f2b4e6f49a17997783
2015-10-12 13:31:24 -07:00
Eric Rahm
88d7e6c28e Bug 1190592 - Part 1: Add mediasource memory reporter. r=jya
This adds asyncrounous reporting of MSE resources.
2015-08-20 18:10:33 -04:00
JW Wang
c54e262481 Bug 1214519 - Fix the coding style of member initializer lists of MediaDecoder. r=jya. 2015-10-15 10:38:14 +08: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
Andreas Pehrson
26afff5658 Bug 1070216 - Assert main MediaEngine APIs are called on the owning thread. r=jib
--HG--
extra : commitid : J9Hj3Lffpg
extra : rebase_source : da1183be4a7d8c4a750b3c9ea65c3d10390c938a
2015-10-15 01:08:34 +08:00
Andreas Pehrson
21f95c0d4a Bug 1070216 - Properly manage lifetime of allocated CaptureDevices. r=jib
We currently avoid Deallocating a CaptureDevice used for multiple gUMStreams
when one of them calls Deallocate() by keeping track of how many called
Start().

The normal lifetime sequence however, is:
Allocate()
Start()
Stop()
Deallocate()

This patches fixes the lifetime management by keeping track of how many
users of the CaptureDevice called Allocate().

--HG--
extra : commitid : J9Hj3Lffpg
extra : rebase_source : 0f9928a45c4810b3d6236bdf8a71587ad46de601
2015-10-15 01:08:33 +08:00
Andreas Pehrson
f6ecc34621 Bug 1070216 - Guard against a null MediaInputPort in DOMMediaStream::FindPlaybackDOMTrack(). r=roc
--HG--
extra : commitid : J9Hj3Lffpg
extra : rebase_source : 6a1c4b15de505b195c0dd2f6c8d7b6ec4571964d
2015-10-15 01:08:33 +08:00
Andreas Pehrson
3676fecac6 Bug 1070216 - Test MediaStream Constructors. r=jib
--HG--
extra : commitid : J9Hj3Lffpg
extra : rebase_source : 27821889bf3de7cd7e42d3bdaec2839aeebd71bc
2015-10-15 01:08:33 +08:00
Andreas Pehrson
177bf507ed Bug 1070216 - Break out createOscillatorStream from test_gUM_addTrackRemoveTrack.html to test framework. r=padenot
--HG--
extra : commitid : J9Hj3Lffpg
extra : rebase_source : fe452cb711df9ec06f127fe70cd1f7a3251143c9
2015-10-15 01:08:33 +08:00
Andreas Pehrson
018c9c1d2b Bug 1070216 - Let AudioStreamAnalyser accept streams with no tracks. r=padenot
--HG--
extra : commitid : J9Hj3Lffpg
extra : rebase_source : 2050291634a22beec652724a2d4d91359cf9009c
2015-10-15 01:08:33 +08:00
Andreas Pehrson
e9df90e867 Bug 1070216 - Make it possible to disable AudioStreamAnalyser's debug canvas. r=padenot
--HG--
extra : commitid : J9Hj3Lffpg
extra : rebase_source : 76e647138a347925b93c2f6088473e1ceb9f63f2
2015-10-15 01:08:33 +08:00
Andreas Pehrson
63f62a0f86 Bug 1070216 - Implement MediaStream constructors. r=smaug,jib,padenot
--HG--
extra : commitid : J9Hj3Lffpg
extra : rebase_source : 76cc0498fa18159657760f6622f49f4b6938bdfc
2015-10-15 01:08:33 +08:00
Andreas Pehrson
419c440d96 Bug 1070216 - Guard against adding a track owned by one MSG to a stream owned by another. r=padenot
--HG--
extra : commitid : J9Hj3Lffpg
extra : rebase_source : 83b604c3b8c69c9edf55bdfaaebe67b6f2251c46
2015-10-15 01:08:33 +08:00
Andreas Pehrson
0391659f93 Bug 1070216 - constify DOMMediaStream::Get[Audio/Video]Tracks(). r=roc
--HG--
extra : commitid : J9Hj3Lffpg
extra : rebase_source : ef9c0288c603ff81191ac8bd8e16910d5360673e
2015-10-15 01:08:33 +08:00
Andreas Pehrson
ab1e81e08f Bug 1070216 - Split DOMMediaStream::InitStreamCommon into three. r=roc
This allows us to initiate a DOMMediaStream into three states:
* One that has input, owned and playback streams, for data producers
  like gUM or RTCPeerConnection.
* One with owned and playback streams, for cloned DOM streams.
  If a cloned DOM stream has an empty input stream connected to its
  owned stream, both are regarded as not having current data.
* One with only a playback stream, for when it has been created with the
  default constructor from JS. Its track set can only be changed by
  addTrack() and removeTrack() which when called only affect mPlaybackStream.

--HG--
extra : commitid : J9Hj3Lffpg
extra : rebase_source : 03fd61130c8948c1be996e536eb3078bb09d8480
2015-10-15 01:08:32 +08:00
Andreas Pehrson
b38fe36e95 Bug 1210286 - Enable MediaRecorder with Canvas CaptureStream on Android and B2G. r=jolin
--HG--
extra : commitid : HafpaHoj6i
extra : rebase_source : 42c71c05574edd9153d1323088ca1873dbe11a8a
2015-10-12 10:33:58 +08:00
Andreas Pehrson
7fb8d88099 Bug 1210286 - Fall back to converting SourceSurfaces (RGB) to NV12 in OMXCodecWrapper. r=jolin
--HG--
extra : commitid : HafpaHoj6i
extra : rebase_source : a975b625410158b345121f51b1839ac49d4a3883
2015-10-12 10:33:58 +08:00