Commit Graph

16 Commits

Author SHA1 Message Date
Alex Chronopoulos
59234c63dd Bug 1533612 - Change to unsigned int to avoid integer overflow. r=jya
mProcessedQueueLength is int32_t (wrapped around an Atomic) but it is updated from the method FramesToUsecs() which returns int64_t (wrapped around a CheckedInt) thus it is changed to unsigned int to avoid integer overflow.

Differential Revision: https://phabricator.services.mozilla.com/D22949

--HG--
extra : moz-landing-system : lando
2019-03-14 04:11:39 +00:00
Jean-Yves Avenard
cf0ff88211 Bug 1512456 - P1. Don't use GenericPromise with MediaSink. r=alwu
The VideoSink shares the AudioSink's own EndedPromise to notify its user that it has ended. As such, the MozPromise used must be non-exclusive.
Using the GenericPromise for such purpose only hid that requirement.

We also remove the MediaSink from the media namespace, and clarify the naming of some arguments and class members to accurately describe what they do.

Differential Revision: https://phabricator.services.mozilla.com/D14024

--HG--
extra : moz-landing-system : lando
2018-12-11 10:44:51 +00:00
Sylvestre Ledru
804b8b8883 Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

Differential Revision: https://phabricator.services.mozilla.com/D12251

--HG--
extra : moz-landing-system : lando
2018-11-19 13:25:37 +00:00
Alex Chronopoulos
2c94f04194 Bug 934425 - Set device info in MediaSink and switch sink device. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D5871

--HG--
extra : moz-landing-system : lando
2018-10-12 08:44:35 +00:00
JW Wang
80e976e596 Bug 1412212. P3 - also dump debug info of AudioSink. r=JamesCheng
MozReview-Commit-ID: AnvlXrhdoI5

--HG--
extra : rebase_source : b4d979dba64ea02e85cac0d9613915441dbadd90
2017-10-27 15:36:24 +08:00
Matthew Gregan
f4d992a821 Bug 1388229 - Remove B2G-only audio stream type handling. r=kamidphish 2017-08-10 13:00:07 +12:00
JW Wang
621abf8866 Bug 1351586 - AudioSink constructor should take a const reference instead of value of TimeUnit. r=kaku
MozReview-Commit-ID: F95iIsVealk

--HG--
extra : rebase_source : 35eec737a2f4a8f94020536a337e90ccb7e82542
extra : source : fbd5a87403a3a80ff50685988289589bbf6c913c
2017-04-12 16:43:05 +08:00
JW Wang
2860ecd0e5 Bug 1350814 - Replace use of int64_t for microseconds by TimeUnit in AudioSink. r=kikuo
MozReview-Commit-ID: 3diOpJu7g8i

--HG--
extra : rebase_source : 16d7050cd29ea774fce7e76a16ae9100c766b9f8
extra : source : cf6946ba307d04b00e02e353b4724655929eaa69
2017-03-27 11:37:17 +08:00
JW Wang
5a77a04dac Bug 1349485. P5 - make AudioSink a non-ref-counting type. r=kikuo
MozReview-Commit-ID: EJmSTwkSdX6

--HG--
extra : rebase_source : 0972500aeb439d5d09cb111feb619cc22c751b9d
2017-03-22 15:13:10 +08:00
JW Wang
db128cb2b7 Bug 1349485. P4 - rename DecodedAudioDataSink.* to AudioSink.*. r=kikuo
MozReview-Commit-ID: KYbJwTpUiHZ

--HG--
rename : dom/media/mediasink/DecodedAudioDataSink.cpp => dom/media/mediasink/AudioSink.cpp
rename : dom/media/mediasink/DecodedAudioDataSink.h => dom/media/mediasink/AudioSink.h
extra : rebase_source : 414effaad950578dead21401f7e868d4a09a1099
2017-03-22 15:03:38 +08:00
JW Wang
8a2e4094ff Bug 1349485. P2 - remove dom/media/mediasink/AudioSink.h. r=kikuo
MozReview-Commit-ID: A9YlwfrJTxB

--HG--
extra : rebase_source : 178398ba02f5f1acbfcc734ef027f135e3d633a6
2017-03-22 14:49:46 +08:00
JW Wang
713d7a054f Bug 1349145. P3 - use concrete types in MDSM and its friends. Also remove unnecessary casts. r=kaku
MozReview-Commit-ID: C2MZb01XtTC

--HG--
extra : rebase_source : e16735e9f865feb85170abf07996479e3bba026f
2017-03-22 11:59:54 +08:00
JW Wang
ae5faca646 Bug 948267. Part 2 - implement AudioStream::DataSource for DecodedAudioDataSink and remove its audio thread. r=kinetik. 2016-01-12 21:48:25 +08: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
JW Wang
613a5755ba Bug 1198568 - Fix build error in non-unified build for DecodedAudioDataSink.cpp. r=kinetik. 2015-08-26 10:30:56 +08:00
Kilik Kuo
0581340a0a Bug 1188268 - Make AudioSink a base class, create DecodedAudioDataSink to act as original AudioSink, and move sink-related files to dom/media/mediasink. r=jwwang, r=cpearce
--HG--
rename : dom/media/AudioSink.cpp => dom/media/mediasink/DecodedAudioDataSink.cpp
rename : dom/media/AudioSink.h => dom/media/mediasink/DecodedAudioDataSink.h
2015-08-18 11:55:01 +08:00