Commit Graph
418 Commits
Author SHA1 Message Date
Emilio Cobos Álvarez 3602c50091 Bug 866513 - Non-empty MediaStreamTrack labels. r=jib 2016-01-16 13:39:00 +01:00
Chris Peterson a7120f9e2d Bug 1240264 - Annotate intentional switch fallthroughs in dom/media/. r=cpearce
dom/media/MediaManager.cpp:1905:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/media/webm/WebMBufferedParser.cpp:133:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
2016-01-14 01:42:18 -08:00
Jan-Ivar Bruaroey 30bc729116 Bug 1224766 - forward callID to disambiguate multiple gUM requests from same window. r=jesup,smaug 2016-01-07 17:30:10 -05:00
Jim Mathies d4fa858fd3 Bug 1107702 - Try to avoid internal memory exhaustion problems with the Windows api GetAdaptersInfo by making a priming call to the api during startup. r=jesup 2016-01-07 13:57:42 -06:00
Jan-Ivar Bruaroey bbe9406871 Bug 1229413 - remove MediaManager's xpcom-will-shutdown observer. r=jesup 2015-12-01 12:13:47 -05:00
Jan-Ivar Bruaroey fa0f1a3350 Bug 1229926 - only fake cams and mics. r=jesup 2015-12-02 22:51:03 -05:00
Jan-Ivar Bruaroey 54b44fa62f Bug 1229926 - don't throw OverConstrainedError(deviceId) on fake devices. r=jesup 2015-12-02 21:35:56 -05:00
David Rajchenbach-Teller e65e25e0d9 Bug 1216972 - MediaManager AsyncShutdown for content processes. r=jesup 2015-11-18 21:42:16 +01:00
Randell Jesup 65a93a3cfb Bug 1218799: Shutdown MediaManager engines from the MediaManager thread r=jib 2015-11-18 15:03:13 -05:00
sajitk 13171aa66e Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian 2015-11-15 14:49:01 +01:00
Wes Kocher 9ec1c7554a Backed out changeset 1e5f3d1151d6 (bug 1219480) for cpp unittest bustage CLOSED TREE 2015-11-11 09:36:56 -08:00
sajitk 47326a1fc0 Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian 2015-11-11 06:52:00 +01:00
Andreas Pehrson cfe8b3ba07 Bug 1219711 - Let fake stream take precedence in testing. r=jib
TL;DR requesting a fake stream always gives you a fake stream. No magic.

The gUMConstraint `fake: true` should take precedence and if set always
use MediaEngineDefault.
If it is set the state of `faketracks` is passed
on to MediaEngineDefault.
If it is not set, but (any of) audio/video loopback devices are set, the
device enumeration will filter out only those.
2015-11-09 23:17:42 +08:00
Wes Kocher c73d800615 Backed out 5 changesets (bug 1219711) for frequent android m(9) failures
Backed out changeset 2d5f09d89424 (bug 1219711)
Backed out changeset cf14a6e5f340 (bug 1219711)
Backed out changeset 4eaa8cf9a752 (bug 1219711)
Backed out changeset 65abe62869df (bug 1219711)
Backed out changeset a21d79a94307 (bug 1219711)
2015-11-06 11:14:11 -08:00
Matthew Noorenberghe 4f21c5082b Bug 1221365 - Move "Is origin potentially trustworthy?" logic outside ServiceWorkerManager.cpp. r=ckerschb,bkelly 2015-11-06 11:10:17 -08:00
Andreas Pehrson a840d1fe82 Bug 1219711 - Let fake stream take precedence in testing. r=jib
TL;DR requesting a fake stream always gives you a fake stream. No magic.

The gUMConstraint `fake: true` should take precedence and if set always
use MediaEngineDefault.
If it is set the state of `faketracks` is passed
on to MediaEngineDefault.
If it is not set, but (any of) audio/video loopback devices are set, the
device enumeration will filter out only those.
2015-11-05 17:15:51 +08:00
Birunthan Mohanathas ac37dec517 Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Jan-Ivar Bruaroey bb562fbe30 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 27a1d87931 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 4e6d8f6705 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 bf7f6dda03 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 844e01aa14 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 222ce9e7f0 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 b90bf4a786 Bug 1210852 - do SelectSettings of device capabilities on media thread. r=jesup 2015-10-03 20:42:26 -04:00
Sotaro Ikeda 1fd7664aa2 Bug 1186813 - Replace nsBaseHashtable::EnumerateRead() calls in dom/media/ with iterators r=cpearce 2015-09-30 06:40:54 -07:00
Andreas Pehrson 51410210e5 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 05cce110e5 Bug 1103188 - Keep track of capture stop only in gUM stream listener. r=jib 2015-09-30 14:08:26 +08:00
Andreas Pehrson 1690c45f82 Bug 1103188 - Always call MediaManager::NotifyFinished/NotifyRemoved on main thread. r=jib 2015-09-30 14:08:22 +08:00
Andreas Pehrson c4546fec8c Bug 1103188 - Deprecate DOMMediaStream::Stop(). r=jib 2015-09-30 09:32:06 +08:00
Andreas Pehrson d99f13c30e Bug 1103188 - Remove identical override nsDOMUserMediaStream::Stop(). r=jib 2015-09-30 09:32:05 +08:00
Andreas Pehrson b756a21b79 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 341695d3d0 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 9261227d49 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 954ce67cb5 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 0a9f4caf61 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 d172fec88f Bug 1103188 - Deprecate DOMMediaStream::Stop(). r=jib 2015-09-25 23:23:31 +08:00
Andreas Pehrson cc74cc751e Bug 1103188 - Remove identical override nsDOMUserMediaStream::Stop(). r=jib 2015-09-25 23:23:30 +08:00
Andreas Pehrson 56ea0b7c51 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 2e7e495b0a 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 4132b4532f 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 2bf13eb68d Bug 1192170 - Remove media capture indicator when all tracks have ended. r=jib 2015-09-25 13:55:29 +08:00
Randell Jesup 0c68a13709 Bug 953265: make getUserMedia fake audio tones configurable in frequency via pref r=jib 2015-09-24 09:23:37 -04:00
Randell Jesup a0e0733cf7 Bug 1206900: Add telemetry for device types captured with getUserMedia() r=jib,smaug 2015-09-21 22:20:45 -04:00
Jan-Ivar Bruaroey 9614e19203 Bug 1206982 - getUserMedia s/PermissionDeniedError/SecurityError/. r=jesup 2015-09-21 20:57:12 -04:00
Jan-Ivar Bruaroey c4b3e017cd Bug 912342 - get Promise out. r=jesup 2015-09-20 10:04:51 -04:00
Jan-Ivar Bruaroey 7789ae96cd Bug 912342 - Move code SelectSettings to MediaConstraintsHelper. r=jesup 2015-09-19 02:00:48 -04:00
Jan-Ivar Bruaroey 42b6f9f868 Bug 912342 - Pass in Audio/VideoDevice in place of Audio/VideoSource. r=jesup 2015-09-19 00:49:07 -04:00
Jan-Ivar Bruaroey 98c1e4690a Bug 912342 - Change capture resolution. r=jesup 2015-09-20 18:45:57 -04:00
Jan-Ivar Bruaroey 80b9e1d32b Bug 912342 - Move code MediaOperationTask from .h to .cpp. r=jesup 2015-09-16 22:44:14 -04:00
Jan-Ivar Bruaroey 2135ae562c Bug 1195951 - fix heap type on stack error in MediaUtils' Pledge class. r=jesup 2015-09-20 02:26:41 -04:00