Commit Graph

401 Commits

Author SHA1 Message Date
Jan-Ivar Bruaroey
e519d05b74 Bug 1193075 - add viewport constraints for independent scrolling in tab sharing. r=smaug, r=jesup 2015-10-22 17:03:47 -04:00
Jan-Ivar Bruaroey
8eb44ff540 Bug 1166293 - Use AsyncShutdown API to shut down media thread in non-e10s. r= jesup 2015-10-14 23:54:39 -04: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
Andrew McCreight
dc667287f6 Bug 1210591, part 1 - Use nsVariantCC in various places. r=smaug
Most of these will end up in DataTransfer:mItems, so this is needed
for it to do anything useful.
2015-10-09 10:24:23 -07:00
Andrew McCreight
0c62d00526 Bug 1210517 - Create nsVariant directly rather than via do_CreateInstance(). r=froydnj
The goal here is to leave creation stuff mostly for JS, so we can
convert it entirely over to a non-threadsafe cycle-collected version
without breaking any existing C++ users.

I didn't do this for a remaining use in nsGlobalWindow.h to avoid
including nsVariant.h all over the place.
2015-10-07 08:17:42 -07:00
Jan-Ivar Bruaroey
416250d08d Bug 1210852 - do SelectSettings of device capabilities on media thread. r=jesup 2015-10-03 20:42:26 -04:00
Sotaro Ikeda
4302b4f0a7 Bug 1186813 - Replace nsBaseHashtable::EnumerateRead() calls in dom/media/ with iterators r=cpearce 2015-09-30 06:40:54 -07:00
Andreas Pehrson
310106a37d Bug 1103188 - Keep track of stopped tracks in gUM stream listener. r=jib
This is needed to avoid something like:
* [old stream] stop track 1 -> deallocate MediaDevice for track 1
* [new stream] gUM() -> allocate MediaDevice for track 1
* [old stream] stop stream -> deallocate MediaDevice for track 1
* [new stream] gUM() -> start MediaDevice for track 1 (oops, MediaDevice was no more!)
2015-09-30 14:08:33 +08:00
Andreas Pehrson
b53b7b0e03 Bug 1103188 - Keep track of capture stop only in gUM stream listener. r=jib 2015-09-30 14:08:26 +08:00
Andreas Pehrson
245842068e Bug 1103188 - Always call MediaManager::NotifyFinished/NotifyRemoved on main thread. r=jib 2015-09-30 14:08:22 +08:00
Andreas Pehrson
e9dc12e436 Bug 1103188 - Deprecate DOMMediaStream::Stop(). r=jib 2015-09-30 09:32:06 +08:00
Andreas Pehrson
1ef1c35d28 Bug 1103188 - Remove identical override nsDOMUserMediaStream::Stop(). r=jib 2015-09-30 09:32:05 +08:00
Andreas Pehrson
400f1f3074 Bug 1170958 - Remove ProcessedMediaStream::ForwardTrackEnabled. r=roc,jesup
TrackUnionStream guarantees that TrackIDs are maintained if no tracks
have claimed them before.

In the gUM case, we have a SourceMediaStream which we wholly own (the
DOMMediaStream's Input stream), piped into a TrackUnionStream which
no-one external is able to add tracks to (the DOMMediaStream's Owned
stream) - addTrack()ed tracks are added to the DOMMediaStream's Playback
stream.

The MediaStreamTracks being enabled/disable refer to a TrackID in the
DOMMediaStream's Owned stream.

Alas, we don't need to forward a track's enabled state, we can just do
it on the source.
2015-09-30 09:31:54 +08:00
Andreas Pehrson
737f97851c Bug 1170958 - Feed a SourceMediaStream-backed dom stream instead of a raw SourceMediaStream in MediaManager. r=jesup
Simplifies the structure of MediaManager somewhat. Possible since
MediaManager owns both the SourceMediaStream and the DOMMediaStream.
2015-09-30 09:31:54 +08:00
Andreas Pehrson
9fb5ec93b1 Bug 1170958 - Refactor DOMMediaStream to contain a 3-stage track chain. r=roc
This lets us separate tracks by ownership like so:
* Input    - Owned by the producer of the DOMMediaStream (gUM etc.)
* Owned    - Contains Input tracks (per above) or tracks cloned tracks
             if this DOMMediaStream is a clone.
* Playback - Contains Owned tracks plus tracks addTrack()ed to this
             DOMMediaStream minus tracks removeTrack()ed from this
             DOMMediaStream.
2015-09-30 09:31:54 +08:00
Wes Kocher
84e72a2137 Backed out 9 changesets (bug 1170958) for frequent test_getUserMedia_addTrackRemoveTrack.html failures
Backed out changeset 277c1f8098d1 (bug 1170958)
Backed out changeset aa86bb9eea95 (bug 1170958)
Backed out changeset 8af8b85a4b26 (bug 1170958)
Backed out changeset ec1bf225e9cb (bug 1170958)
Backed out changeset 4a04ddca2b6b (bug 1170958)
Backed out changeset e85c9977a311 (bug 1170958)
Backed out changeset 16b40ff04e8f (bug 1170958)
Backed out changeset ad206925c84a (bug 1170958)
Backed out changeset 2106eccec79b (bug 1170958)
2015-09-25 13:08:55 -07:00
Wes Kocher
50ac2b87e5 Backed out 7 changesets (bug 1103188) for frequent test_getUserMedia_addTrackRemoveTrack.html failures
Backed out changeset f0f33a8ef14c (bug 1103188)
Backed out changeset dbe0ebdebad5 (bug 1103188)
Backed out changeset bb656022a1a7 (bug 1103188)
Backed out changeset cc6b5f5ba444 (bug 1103188)
Backed out changeset ca97d52bf144 (bug 1103188)
Backed out changeset de8cc967f8eb (bug 1103188)
Backed out changeset 6da8f4905060 (bug 1103188)
2015-09-25 13:08:44 -07:00
Andreas Pehrson
afde4d73e7 Bug 1103188 - Deprecate DOMMediaStream::Stop(). r=jib 2015-09-25 23:23:31 +08:00
Andreas Pehrson
9d02866a25 Bug 1103188 - Remove identical override nsDOMUserMediaStream::Stop(). r=jib 2015-09-25 23:23:30 +08:00
Andreas Pehrson
c5ca578a06 Bug 1170958 - Remove ProcessedMediaStream::ForwardTrackEnabled. r=roc,jesup
TrackUnionStream guarantees that TrackIDs are maintained if no tracks
have claimed them before.

In the gUM case, we have a SourceMediaStream which we wholly own (the
DOMMediaStream's Input stream), piped into a TrackUnionStream which
no-one external is able to add tracks to (the DOMMediaStream's Owned
stream) - addTrack()ed tracks are added to the DOMMediaStream's Playback
stream.

The MediaStreamTracks being enabled/disable refer to a TrackID in the
DOMMediaStream's Owned stream.

Alas, we don't need to forward a track's enabled state, we can just do
it on the source.
2015-09-25 23:23:18 +08:00
Andreas Pehrson
7f8b2b04db Bug 1170958 - Feed a SourceMediaStream-backed dom stream instead of a raw SourceMediaStream in MediaManager. r=jesup
Simplifies the structure of MediaManager somewhat. Possible since
MediaManager owns both the SourceMediaStream and the DOMMediaStream.
2015-09-25 23:23:18 +08:00
Andreas Pehrson
dbb83ae994 Bug 1170958 - Refactor DOMMediaStream to contain a 3-stage track chain. r=roc
This lets us separate tracks by ownership like so:
* Input    - Owned by the producer of the DOMMediaStream (gUM etc.)
* Owned    - Contains Input tracks (per above) or tracks cloned tracks
             if this DOMMediaStream is a clone.
* Playback - Contains Owned tracks plus tracks addTrack()ed to this
             DOMMediaStream minus tracks removeTrack()ed from this
             DOMMediaStream.
2015-09-25 23:23:18 +08:00
Andreas Pehrson
d8b8b4cf69 Bug 1192170 - Remove media capture indicator when all tracks have ended. r=jib 2015-09-25 13:55:29 +08:00
Randell Jesup
36f1c10ade Bug 953265: make getUserMedia fake audio tones configurable in frequency via pref r=jib 2015-09-24 09:23:37 -04:00
Randell Jesup
61f2b07fab Bug 1206900: Add telemetry for device types captured with getUserMedia() r=jib,smaug 2015-09-21 22:20:45 -04:00
Jan-Ivar Bruaroey
7810914636 Bug 1206982 - getUserMedia s/PermissionDeniedError/SecurityError/. r=jesup 2015-09-21 20:57:12 -04:00
Jan-Ivar Bruaroey
6c9de039ed Bug 912342 - get Promise out. r=jesup 2015-09-20 10:04:51 -04:00
Jan-Ivar Bruaroey
32e9d893c2 Bug 912342 - Move code SelectSettings to MediaConstraintsHelper. r=jesup 2015-09-19 02:00:48 -04:00
Jan-Ivar Bruaroey
c8450f5db9 Bug 912342 - Pass in Audio/VideoDevice in place of Audio/VideoSource. r=jesup 2015-09-19 00:49:07 -04:00
Jan-Ivar Bruaroey
b2c0974877 Bug 912342 - Change capture resolution. r=jesup 2015-09-20 18:45:57 -04:00
Jan-Ivar Bruaroey
7575061788 Bug 912342 - Move code MediaOperationTask from .h to .cpp. r=jesup 2015-09-16 22:44:14 -04:00
Jan-Ivar Bruaroey
a0aeb846e8 Bug 1195951 - fix heap type on stack error in MediaUtils' Pledge class. r=jesup 2015-09-20 02:26:41 -04:00
Jan-Ivar Bruaroey
6dccc3ae57 Bug 1181896 - make gUM fail w/OverconstrainedError and candidate argument r=jesup 2015-09-18 14:04:41 -04:00
Jan-Ivar Bruaroey
1fedf527e6 Bug 1181896 - rename .constraintName to .constraint in MediaStreamError r=jesup,bz 2015-09-18 14:03:30 -04:00
Richard Barnes
7f2bacd58c Bug 1205156 - Add telemetry to measure how often getUserMedia is used over non-secure origins r=jib 2015-09-17 08:44:50 -04:00
Robert O'Callahan
2b6ab625a1 Bug 1189506. Remove aFlags parameter from AllocateInputPort. r=karlt 2015-09-04 16:42:42 +12:00
Robert O'Callahan
d23422b233 Bug 1189506. Remove usage of FLAG_BLOCK_OUTPUT from MediaManager. r=jesup 2015-09-04 16:39:37 +12:00
Jan-Ivar Bruaroey
8fec18ab44 Bug 1201197 - add dedicated listener to enumerateDevices. r=jesup 2015-09-03 19:09:34 -04:00
Jan-Ivar Bruaroey
ffe45a44b9 Bug 1187315 - Refactor out Constraints.webidl. r=bz 2015-07-29 01:16:19 -04:00
Paul Adenot
e862413472 Bug 1190676 - Part 6 - Fix consumers: MediaManager. r=jesup 2015-08-25 10:29:51 +02:00
Aryeh Gregor
d23d38648e Bug 1179451 - Part 4: Don't pass nsRefPtr&& to functions that want raw pointers. r=froydnj 2015-08-13 15:22:48 +03:00
Jan-Ivar Bruaroey
3a04feeda0 Bug 1191298 - don't fail on unknown audio constraints e.g. getUserMedia({ audio: {} }) (regression) r=jesup 2015-08-10 12:16:30 -04:00
Birunthan Mohanathas
a44818609c Bug 1185763 - Part 3: Rename nsTArray::MoveElementsFrom to AppendElements. r=froydnj 2015-08-11 08:29:46 -07:00
Birunthan Mohanathas
88ff16fb47 Bug 1185763 - Part 1: Always use mozilla::Move with nsTArray::MoveElementsFrom. r=froydnj 2015-08-11 08:29:46 -07:00
Paul Adenot
a980557bdb Bug 1156472 - Part 12 - Allow to pipe the AudioCaptureStream into an AudioContext. r=mt,roc 2015-07-24 14:28:17 +02:00
Paul Adenot
21801c1e4e Bug 1156472 - Part 11 - Unbitrot MediaManager.cpp over jib's changes. r=jib 2015-07-24 14:28:17 +02:00
Paul Adenot
23ff8c6db0 Bug 1156472 - Part 5 - Add MediaEngineWebRTCAudioCaptureSource as a new audio source, and "audioCapture" as a new MediaSource. r=jesup,bz 2015-07-24 14:28:16 +02:00
Wes Kocher
81078e6666 Backed out 14 changesets (bug 1156472) for test_getUserMedia_audioCapture.html failures on b2g emulator
Backed out changeset deec8eb18346 (bug 1156472)
Backed out changeset 0f5bec4c05ba (bug 1156472)
Backed out changeset 2dd83ac00bf9 (bug 1156472)
Backed out changeset abd4e47887f7 (bug 1156472)
Backed out changeset 4824d9874663 (bug 1156472)
Backed out changeset 12805598e6fa (bug 1156472)
Backed out changeset e2f0062a1f67 (bug 1156472)
Backed out changeset 99ef8e436a7f (bug 1156472)
Backed out changeset 65bbfc1546af (bug 1156472)
Backed out changeset 2ab4f16eaf0a (bug 1156472)
Backed out changeset 7f565685e20a (bug 1156472)
Backed out changeset 28c03c98cb2b (bug 1156472)
Backed out changeset d477cfba6e1d (bug 1156472)
Backed out changeset 9819fa56caa1 (bug 1156472)
2015-07-24 13:15:57 -07:00
Paul Adenot
e6848007dc Bug 1156472 - Part 12 - Allow to pipe the AudioCaptureStream into an AudioContext. r=mt,roc 2015-07-24 14:28:17 +02:00