Граф коммитов

237 Коммитов

Автор SHA1 Сообщение Дата
Kyle Huey 941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Carsten "Tomcat" Book ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey 48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Kyle Huey 7579799b01 Bug 1266595: Replace Chromium Task with Runnable. r=froydnj 2016-04-27 17:06:05 -07:00
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Andreas Pehrson be74876e25 Bug 1208371 - Add PrincipalHandle to MediaChunks. r=mt,jesup
PrincipalHandle is a thread safe pointer to a holder of (the main-thread-only
nsIPrincipal) that can be passed around the MSG.

A MediaStreamTrack whose source has just updated its principal, sets the new
principal aside (as its "pending principal"), and combines the new principal
into its current principal.

Then the source starts passing the new principal to the MediaStreamGraph as
a PrincipalHandle.

Changes to a track's PrincipalHandle on the MSG will be surfaced through the
MediaStreamTrackListener API. These changes are dispatched to main thread
and compared to a MediaStreamTrack's pending principal. In case of a match
the track knows the correct principal is flowing and can move the pending
principal to be the current principal and update any main thread principal
observers.

MozReview-Commit-ID: D0JXGWhQFFU

--HG--
extra : rebase_source : 296e269bb46fc5a85a9c3f90dfc0dc40e53572bc
2016-04-06 14:56:44 +02:00
Andreas Pehrson 0396985d77 Bug 1208371 - Route ApplyConstraints through MediaStreamTrackSource. r=jib
MozReview-Commit-ID: CnJnxszKU4o

--HG--
extra : rebase_source : f5ef65897108b3feadd51b8b11a47f65a7a71ff1
2016-02-01 22:43:38 +08:00
Andreas Pehrson 88628853b2 Bug 1208371 - Move OnTracksAvailableCallback out of DOMMediaStream. r=roc
So it can be forward declared.

MozReview-Commit-ID: 4RH7p8AzO84

--HG--
extra : rebase_source : e9c4ef72029de4ed09dca3b51ba2b46829f41d14
2016-01-05 10:16:21 +08:00
Nathan Froyd 9fb640a914 Bug 1251715 - use UniquePtr instead of ScopedDeletePtr in dom/media/; r=gerald
UniquePtr is more standard than ScopedDeletePtr; using standard
constructs whenever possible is preferable.
2016-02-26 14:21:05 -05:00
Wes Kocher 6866309c97 Backed out 2 changesets (bug 1251714, bug 1251715) for gtest failures in media code
Backed out changeset 1bbd0cd10f76 (bug 1251714)
Backed out changeset 80b197c5608f (bug 1251715)

MozReview-Commit-ID: EHOtiKLS4Xr
2016-03-01 11:36:35 -08:00
Nathan Froyd 710083b54a Bug 1251715 - use UniquePtr instead of ScopedDeletePtr in dom/media/; r=gerald
UniquePtr is more standard than ScopedDeletePtr; using standard
constructs whenever possible is preferable.
2016-02-26 14:21:05 -05:00
Gian-Carlo Pascutto 546b46fa4c Bug 1177242 - Verify whether sandboxed Content process has permissions to access the camera/mic. r=jesup 2016-02-17 18:57:26 +01:00
Andreas Pehrson 68c86a9506 Bug 957691: Ensure that MediaManager ends all tracks before finishing its source stream r=jib,jesup,pehrsons
This puts all the logic in GetUserMediaCallbackMediaStreamListener and none in
MediaOperationTask to make it simpler to reason about what's happening.

When we want to stop a track, the gUMCallbackListener will send a
MEDIA_STOP_TRACK if other tracks will still be live.
If it was the last live track, the gUMCallbackListener will send a MEDIA_STOP
instead. The MEDIA_STOP makes sure the passed in devices (we pass in all) are
stopped before finishing the stream.

MozReview-Commit-ID: E43Iqw491tB
2016-02-05 13:20:20 +01:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Jan-Ivar Bruaroey d7d3df857d Bug 1224766 - forward callID to disambiguate multiple gUM requests from same window. r=jesup,smaug
--HG--
extra : rebase_source : 038e5b2eb6d2332da05c2c7dc44dc6ed3dde3d83
2016-01-07 17:30:10 -05:00
Jim Mathies d52bf97565 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
Randell Jesup bc9f456480 Bug 1218799: Shutdown MediaManager engines from the MediaManager thread r=jib 2015-11-18 15:03:13 -05:00
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
Birunthan Mohanathas 9985829ecc Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Jan-Ivar Bruaroey ef83b4f124 Bug 1166293 - Use AsyncShutdown API to shut down media thread in non-e10s. r= jesup
--HG--
extra : transplant_source : %5Cfb%EC%C4%C6L%9E%8C%0E%E5%C5%C3/%81lS%06%D2%F3
2015-10-14 23:54:39 -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
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
Jan-Ivar Bruaroey 61cd22ad23 Bug 1210852 - do SelectSettings of device capabilities on media thread. r=jesup
--HG--
extra : transplant_source : %8E%BB%7B%90MSt%0F%40s%8A%0C/%16y%15Ne%2A%1E
2015-10-03 20:42:26 -04:00
Andreas Pehrson 9914ff85f8 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!)

--HG--
extra : commitid : FmkFYbCfel7
extra : rebase_source : e17ad400705198c48e3d561241dd50d0844c472e
2015-09-30 14:08:33 +08:00
Andreas Pehrson 6f60cbc89d Bug 1103188 - Keep track of capture stop only in gUM stream listener. r=jib
--HG--
extra : commitid : AqIOlsR7w1y
extra : rebase_source : 6f5670be3bf711a38eb9f914dc69c5b987dd9b9e
2015-09-30 14:08:26 +08:00
Andreas Pehrson aaef4911a9 Bug 1103188 - Always call MediaManager::NotifyFinished/NotifyRemoved on main thread. r=jib
--HG--
extra : commitid : 8kb5G98FAY9
extra : rebase_source : 97086507d1c546f9423f4d2f790924c21ccfa28a
2015-09-30 14:08:22 +08:00
Andreas Pehrson 143e9256c4 Bug 1192170 - Remove media capture indicator when all tracks have ended. r=jib
--HG--
extra : commitid : 7nO1zyYTfLV
extra : rebase_source : 4761874ce4d5bb2d5675d3fa8e235cb491348919
2015-09-25 13:55:29 +08:00
Jan-Ivar Bruaroey 4fbccc5b50 Bug 912342 - get Promise out. r=jesup
--HG--
extra : commitid : L54TpPNzEgB
extra : rebase_source : 29eceb81efe9ab96053b37a202714319be13fc80
2015-09-20 10:04:51 -04:00
Jan-Ivar Bruaroey 17d85435b2 Bug 912342 - Pass in Audio/VideoDevice in place of Audio/VideoSource. r=jesup
--HG--
extra : commitid : KyF5JvNyJbV
extra : rebase_source : e8fc7ff48eb38d5df55cd685e187a2069f66d6de
2015-09-19 00:49:07 -04:00
Jan-Ivar Bruaroey 434ce0be70 Bug 912342 - Change capture resolution. r=jesup
--HG--
extra : commitid : I3MtL3fA2IA
extra : rebase_source : 5ffa9bc955b35b2915afea6c5bff794ca97a4ea2
2015-09-20 18:45:57 -04:00
Jan-Ivar Bruaroey e5af2b70b2 Bug 912342 - Move code MediaOperationTask from .h to .cpp. r=jesup
--HG--
extra : commitid : L4YvvKBc9ft
extra : rebase_source : 3f732a3e21b8a9038ce35f232c012169134248e9
2015-09-16 22:44:14 -04:00
Jan-Ivar Bruaroey f953fc2b69 Bug 1195951 - fix heap type on stack error in MediaUtils' Pledge class. r=jesup
--HG--
extra : commitid : 7vVVqOmBW1W
extra : rebase_source : 186c56708e579f2734a1a9db8acebcb69c9f5af2
2015-09-20 02:26:41 -04:00
Paul Adenot da9b49eced Bug 1156472 - Part 11 - Unbitrot MediaManager.cpp over jib's changes. r=jib 2015-07-24 14:28:17 +02:00
Paul Adenot 6f08789e18 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 83b4188234 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 889273bd21 Bug 1156472 - Part 11 - Unbitrot MediaManager.cpp over jib's changes. r=jib 2015-07-24 14:28:17 +02:00
Paul Adenot f692e0d9ce 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
Carsten "Tomcat" Book 2b73aa4f63 Backed out 14 changesets (bug 1156472) for bustage on a CLOSED TREE
Backed out changeset 2ddbf85a42c0 (bug 1156472)
Backed out changeset 306d02e17081 (bug 1156472)
Backed out changeset 03598139f39a (bug 1156472)
Backed out changeset 4b1e6069b598 (bug 1156472)
Backed out changeset 6c588a5eaaec (bug 1156472)
Backed out changeset 8c98d7beaea7 (bug 1156472)
Backed out changeset fbf59fbb5875 (bug 1156472)
Backed out changeset 66479dd9eed9 (bug 1156472)
Backed out changeset c8502deeed33 (bug 1156472)
Backed out changeset 1a60ff1149a1 (bug 1156472)
Backed out changeset af1638279785 (bug 1156472)
Backed out changeset 8210276a98ca (bug 1156472)
Backed out changeset 13730e7c5997 (bug 1156472)
Backed out changeset 05acb71cf981 (bug 1156472)
2015-07-24 17:08:37 +02:00
Paul Adenot 7872410708 Bug 1156472 - Part 11 - Unbitrot MediaManager.cpp over jib's changes. r=jib 2015-07-24 14:28:17 +02:00
Paul Adenot e1e882cb56 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
Jan-Ivar Bruaroey 36217c88d3 Bug 1181428 - Defer persisting until gUM succeeds or persistent permission. r=mt
--HG--
extra : transplant_source : %FDn%E3%9C%9Ee%0E%16%FE%B3%DD6%40%1C%9D%07%DB%8DjZ
2015-07-10 10:15:19 -04:00
Jan-Ivar Bruaroey 88f4606bfa Bug 1181428 - Move code to reuse test for active gum or persistent permission. r=mt
--HG--
extra : transplant_source : %1B%98O0t%95d%D5Y%C4%5C%8DMt%DC%94%03%A7%15%03
2015-07-09 23:07:42 -04:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Jan-Ivar Bruaroey e895da16b9 Bug 1037389 - add support for deviceId in gUM constraints (merged 11 patches). r=smaug, r=jesup 2015-07-02 18:01:52 -04:00
Jan-Ivar Bruaroey d4bc9fa237 Bug 1173255 - Cleanup MediaManager e10s code in prep for deviceId constraint. r=jesup
--HG--
extra : amend_source : 057f17d55cd44a700abab5595c9f4fc95cfd2419
extra : transplant_source : %B7%5C%7D%FA%E9%3F%29%F9%EBM%9E%B5%1A%A6G%29%25%01%0E-
extra : histedit_source : a10d0d5106f5fffb3881604728c1933c90772622%2Cdf022706033cb19f87a8dd58376ab7800d9d2526
2015-06-18 11:46:36 -04:00
Eric Rahm 75c4bebb79 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-03 15:25:57 -07:00
Carsten "Tomcat" Book 5471309381 Backed out 14 changesets (bug 1165515) for linux x64 e10s m2 test failures
Backed out changeset d68dcf2ef372 (bug 1165515)
Backed out changeset 7c3b45a47811 (bug 1165515)
Backed out changeset b668b617bef2 (bug 1165515)
Backed out changeset d0916e1283a2 (bug 1165515)
Backed out changeset ac4dc7489942 (bug 1165515)
Backed out changeset e9632ce8bc65 (bug 1165515)
Backed out changeset c16d215cc7e4 (bug 1165515)
Backed out changeset e4d474f3c51a (bug 1165515)
Backed out changeset d87680bf9f7c (bug 1165515)
Backed out changeset b3c0a45ba99e (bug 1165515)
Backed out changeset 9370fa197674 (bug 1165515)
Backed out changeset 50970d668ca1 (bug 1165515)
Backed out changeset ffa4eb6d24b9 (bug 1165515)
Backed out changeset 5fcf1203cc1d (bug 1165515)

--HG--
extra : rebase_source : 6fb850d063cbabe738f97f0380302153e3eae97a
2015-06-02 13:05:56 +02:00
Eric Rahm a9afd68cef Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 22:17:33 -07:00