mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge m-c to inbound. a=merge
CLOSED TREE
This commit is contained in:
commit
9541586c14
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a8319543833b08e986fa3ed590faeb2624bf1683"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="862f0895f3f5a97200601542d99a152a46385a0b"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
@ -122,7 +122,7 @@
|
||||
<project name="platform/system/media" path="system/media" revision="c1332c21c608f4932a6d7e83450411cde53315ef"/>
|
||||
<default remote="caf" revision="LNX.LA.3.5.2.1.1" sync-j="4"/>
|
||||
<!-- Platform common things -->
|
||||
<project name="device-shinano-common" path="device/sony/shinano-common" remote="b2g" revision="24763a010cda411db9e24d8eb3dac2982e12f0de"/>
|
||||
<project name="device-shinano-common" path="device/sony/shinano-common" remote="b2g" revision="df3d2ae4345ca5d32bce717bb7b3dac18a3afa18"/>
|
||||
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="1bb28abbc215f45220620af5cd60a8ac1be93722"/>
|
||||
<project name="device/qcom/common" path="device/qcom/common" revision="2501e5940ba69ece7654ff85611c76ae5bda299c"/>
|
||||
<project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="d620691cad7aee780018e98159ff03bf99840317"/>
|
||||
@ -130,7 +130,6 @@
|
||||
<project name="init_sh" path="external/init_sh" remote="b2g" revision="3bdd26e092db9c47c5beb04b4809a35f8f767b8a"/>
|
||||
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="0a01977f34d6e86fe23d6c0ec75e96ba988bbebb"/>
|
||||
<project name="platform_external_libnfc-pn547" path="external/libnfc-pn547" remote="b2g" revision="5bb999b84b8adc14f6bea004d523ba258dea8188"/>
|
||||
<project name="timekeep" path="external/timekeep" remote="b2g" revision="4cbb0abc00681f116f043584661307b5c4855a31"/>
|
||||
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="5b71e40213f650459e95d35b6f14af7e88d8ab62"/>
|
||||
<project name="platform_frameworks_av" path="frameworks/av" remote="b2g" revision="a920312eb6299b6cc11f7136254c4b0ba7a663be"/>
|
||||
<project name="platform/frameworks/base" path="frameworks/base" revision="da8e6bc53c8bc669da0bb627904d08aa293f2497"/>
|
||||
@ -144,6 +143,7 @@
|
||||
<project name="platform/hardware/qcom/media" path="hardware/qcom/media" revision="a558dc844bf5144fc38603fd8f4df8d9557052a5"/>
|
||||
<project name="platform/hardware/qcom/wlan" path="hardware/qcom/wlan" revision="57ee1320ed7b4a1a1274d8f3f6c177cd6b9becb2"/>
|
||||
<project name="platform/hardware/ril" path="hardware/ril" revision="12b1977cc704b35f2e9db2bb423fa405348bc2f3"/>
|
||||
<project name="timekeep" path="hardware/sony/timekeep" remote="b2g" revision="4cbb0abc00681f116f043584661307b5c4855a31"/>
|
||||
<project name="platform/system/bluetooth" path="system/bluetooth" revision="985bf15264d865fe7b9c5b45f61c451cbaafa43d"/>
|
||||
<project name="platform/system/core" path="system/core" revision="42839aedcf70bf6bc92a3b7ea4a5cc9bf9aef3f9"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="5f4b68c799927b6e078f987b12722c3a6ccd4a45"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a8319543833b08e986fa3ed590faeb2624bf1683"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="862f0895f3f5a97200601542d99a152a46385a0b"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
@ -15,11 +15,11 @@
|
||||
<remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
|
||||
<default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
|
||||
<!-- Gonk specific things and forks -->
|
||||
<project name="platform_build" path="build" remote="b2g" revision="173b3104bfcbd23fc9dccd4b0035fc49aae3d444">
|
||||
<project name="platform_build" path="build" remote="b2g" revision="1b0db93fb6b870b03467aff50d6419771ba0d88c">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="a8319543833b08e986fa3ed590faeb2624bf1683"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="862f0895f3f5a97200601542d99a152a46385a0b"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8bc59310552179f9a8bc6cdd0188e2475df52fb7"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a8319543833b08e986fa3ed590faeb2624bf1683"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="862f0895f3f5a97200601542d99a152a46385a0b"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="5bb657ada461be666c35f419dbe072ed2ce632fc"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a8319543833b08e986fa3ed590faeb2624bf1683"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="862f0895f3f5a97200601542d99a152a46385a0b"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="07c383a786f188904311a37f6062c2cb84c9b61d">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a8319543833b08e986fa3ed590faeb2624bf1683"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="862f0895f3f5a97200601542d99a152a46385a0b"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
@ -15,11 +15,11 @@
|
||||
<remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
|
||||
<default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
|
||||
<!-- Gonk specific things and forks -->
|
||||
<project name="platform_build" path="build" remote="b2g" revision="173b3104bfcbd23fc9dccd4b0035fc49aae3d444">
|
||||
<project name="platform_build" path="build" remote="b2g" revision="1b0db93fb6b870b03467aff50d6419771ba0d88c">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="a8319543833b08e986fa3ed590faeb2624bf1683"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="862f0895f3f5a97200601542d99a152a46385a0b"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8bc59310552179f9a8bc6cdd0188e2475df52fb7"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a8319543833b08e986fa3ed590faeb2624bf1683"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="862f0895f3f5a97200601542d99a152a46385a0b"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"git": {
|
||||
"git_revision": "a8319543833b08e986fa3ed590faeb2624bf1683",
|
||||
"git_revision": "862f0895f3f5a97200601542d99a152a46385a0b",
|
||||
"remote": "https://git.mozilla.org/releases/gaia.git",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "4fc562ca01a3e8e17dd042af9076f1fe7bc8f91d",
|
||||
"revision": "b176b86e412fb3143fa31ced79faa5238d540f93",
|
||||
"repo_path": "integration/gaia-central"
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a8319543833b08e986fa3ed590faeb2624bf1683"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="862f0895f3f5a97200601542d99a152a46385a0b"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="5bb657ada461be666c35f419dbe072ed2ce632fc"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="07c383a786f188904311a37f6062c2cb84c9b61d">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a8319543833b08e986fa3ed590faeb2624bf1683"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="862f0895f3f5a97200601542d99a152a46385a0b"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
@ -498,8 +498,8 @@
|
||||
@RESPATH@/components/CellBroadcastService.manifest
|
||||
@RESPATH@/components/DataCallManager.js
|
||||
@RESPATH@/components/DataCallManager.manifest
|
||||
@BINPATH@/components/IccService.js
|
||||
@BINPATH@/components/IccService.manifest
|
||||
@RESPATH@/components/IccService.js
|
||||
@RESPATH@/components/IccService.manifest
|
||||
@RESPATH@/components/MmsService.js
|
||||
@RESPATH@/components/MmsService.manifest
|
||||
@RESPATH@/components/MobileMessageDatabaseService.js
|
||||
|
@ -36,7 +36,13 @@ AudioSink::AudioSink(MediaQueue<MediaData>& aAudioQueue,
|
||||
, mLastGoodPosition(0)
|
||||
, mInfo(aInfo)
|
||||
, mChannel(aChannel)
|
||||
, mVolume(1.0)
|
||||
, mPlaybackRate(1.0)
|
||||
, mPreservesPitch(false)
|
||||
, mStopAudioThread(false)
|
||||
, mSetVolume(false)
|
||||
, mSetPlaybackRate(false)
|
||||
, mSetPreservesPitch(false)
|
||||
, mPlaying(true)
|
||||
{
|
||||
}
|
||||
@ -127,21 +133,15 @@ AudioSink::HasUnplayedFrames()
|
||||
void
|
||||
AudioSink::Shutdown()
|
||||
{
|
||||
{
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
if (mAudioStream) {
|
||||
mAudioStream->Cancel();
|
||||
}
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
mStopAudioThread = true;
|
||||
if (mAudioStream) {
|
||||
mAudioStream->Cancel();
|
||||
}
|
||||
nsRefPtr<AudioSink> self = this;
|
||||
nsCOMPtr<nsIRunnable> r = NS_NewRunnableFunction([=] () {
|
||||
self->mStopAudioThread = true;
|
||||
if (!self->mAudioLoopScheduled) {
|
||||
self->AudioLoop();
|
||||
}
|
||||
});
|
||||
DispatchTask(r.forget());
|
||||
ScheduleNextLoopCrossThread();
|
||||
|
||||
// Exit the monitor so audio loop can enter the monitor and finish its job.
|
||||
ReentrantMonitorAutoExit exit(GetReentrantMonitor());
|
||||
mThread->Shutdown();
|
||||
mThread = nullptr;
|
||||
if (mAudioStream) {
|
||||
@ -159,66 +159,34 @@ AudioSink::Shutdown()
|
||||
void
|
||||
AudioSink::SetVolume(double aVolume)
|
||||
{
|
||||
AssertNotOnAudioThread();
|
||||
nsRefPtr<AudioSink> self = this;
|
||||
nsCOMPtr<nsIRunnable> r = NS_NewRunnableFunction([=] () {
|
||||
if (self->mState == AUDIOSINK_STATE_PLAYING) {
|
||||
self->mAudioStream->SetVolume(aVolume);
|
||||
}
|
||||
});
|
||||
DispatchTask(r.forget());
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
mVolume = aVolume;
|
||||
mSetVolume = true;
|
||||
}
|
||||
|
||||
void
|
||||
AudioSink::SetPlaybackRate(double aPlaybackRate)
|
||||
{
|
||||
AssertNotOnAudioThread();
|
||||
MOZ_ASSERT(aPlaybackRate != 0, "Don't set the playbackRate to 0 on AudioStream");
|
||||
nsRefPtr<AudioSink> self = this;
|
||||
nsCOMPtr<nsIRunnable> r = NS_NewRunnableFunction([=] () {
|
||||
if (self->mState == AUDIOSINK_STATE_PLAYING) {
|
||||
self->mAudioStream->SetPlaybackRate(aPlaybackRate);
|
||||
}
|
||||
});
|
||||
DispatchTask(r.forget());
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
NS_ASSERTION(mPlaybackRate != 0, "Don't set the playbackRate to 0 on AudioStream");
|
||||
mPlaybackRate = aPlaybackRate;
|
||||
mSetPlaybackRate = true;
|
||||
}
|
||||
|
||||
void
|
||||
AudioSink::SetPreservesPitch(bool aPreservesPitch)
|
||||
{
|
||||
AssertNotOnAudioThread();
|
||||
nsRefPtr<AudioSink> self = this;
|
||||
nsCOMPtr<nsIRunnable> r = NS_NewRunnableFunction([=] () {
|
||||
if (self->mState == AUDIOSINK_STATE_PLAYING) {
|
||||
self->mAudioStream->SetPreservesPitch(aPreservesPitch);
|
||||
}
|
||||
});
|
||||
DispatchTask(r.forget());
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
mPreservesPitch = aPreservesPitch;
|
||||
mSetPreservesPitch = true;
|
||||
}
|
||||
|
||||
void
|
||||
AudioSink::SetPlaying(bool aPlaying)
|
||||
{
|
||||
AssertNotOnAudioThread();
|
||||
nsRefPtr<AudioSink> self = this;
|
||||
nsCOMPtr<nsIRunnable> r = NS_NewRunnableFunction([=] () {
|
||||
if (self->mState != AUDIOSINK_STATE_PLAYING ||
|
||||
self->mPlaying == aPlaying) {
|
||||
return;
|
||||
}
|
||||
self->mPlaying = aPlaying;
|
||||
// pause/resume AudioStream as necessary.
|
||||
if (!aPlaying && !self->mAudioStream->IsPaused()) {
|
||||
self->mAudioStream->Pause();
|
||||
} else if (aPlaying && self->mAudioStream->IsPaused()) {
|
||||
self->mAudioStream->Resume();
|
||||
}
|
||||
// Wake up the audio loop to play next sample.
|
||||
if (aPlaying && !self->mAudioLoopScheduled) {
|
||||
self->AudioLoop();
|
||||
}
|
||||
});
|
||||
DispatchTask(r.forget());
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
mPlaying = aPlaying;
|
||||
ScheduleNextLoopCrossThread();
|
||||
}
|
||||
|
||||
void
|
||||
@ -243,6 +211,7 @@ AudioSink::InitializeAudioStream()
|
||||
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
mAudioStream = audioStream;
|
||||
UpdateStreamSettings();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -250,18 +219,21 @@ AudioSink::InitializeAudioStream()
|
||||
void
|
||||
AudioSink::Drain()
|
||||
{
|
||||
AssertOnAudioThread();
|
||||
MOZ_ASSERT(mPlaying && !mAudioStream->IsPaused());
|
||||
AssertCurrentThreadInMonitor();
|
||||
// If the media was too short to trigger the start of the audio stream,
|
||||
// start it now.
|
||||
mAudioStream->Start();
|
||||
mAudioStream->Drain();
|
||||
{
|
||||
ReentrantMonitorAutoExit exit(GetReentrantMonitor());
|
||||
mAudioStream->Drain();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioSink::Cleanup()
|
||||
{
|
||||
AssertOnAudioThread();
|
||||
AssertCurrentThreadInMonitor();
|
||||
mEndPromise.Resolve(true, __func__);
|
||||
// Since the promise if resolved asynchronously, we don't shutdown
|
||||
// AudioStream here so MDSM::ResyncAudioClock can get the correct
|
||||
@ -277,10 +249,13 @@ AudioSink::ExpectMoreAudioData()
|
||||
bool
|
||||
AudioSink::WaitingForAudioToPlay()
|
||||
{
|
||||
AssertOnAudioThread();
|
||||
// Return true if we're not playing, and we're not shutting down, or we're
|
||||
// playing and we've got no audio to play.
|
||||
AssertCurrentThreadInMonitor();
|
||||
if (!mStopAudioThread && (!mPlaying || ExpectMoreAudioData())) {
|
||||
if (!mPlaying && !mAudioStream->IsPaused()) {
|
||||
mAudioStream->Pause();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -289,13 +264,19 @@ AudioSink::WaitingForAudioToPlay()
|
||||
bool
|
||||
AudioSink::IsPlaybackContinuing()
|
||||
{
|
||||
AssertOnAudioThread();
|
||||
AssertCurrentThreadInMonitor();
|
||||
if (mPlaying && mAudioStream->IsPaused()) {
|
||||
mAudioStream->Resume();
|
||||
}
|
||||
|
||||
// If we're shutting down, captured, or at EOS, break out and exit the audio
|
||||
// thread.
|
||||
if (mStopAudioThread || AudioQueue().AtEndOfStream()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
UpdateStreamSettings();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -320,13 +301,16 @@ AudioSink::AudioLoop()
|
||||
}
|
||||
|
||||
case AUDIOSINK_STATE_PLAYING: {
|
||||
if (WaitingForAudioToPlay()) {
|
||||
// NotifyData() will schedule next loop.
|
||||
break;
|
||||
}
|
||||
if (!IsPlaybackContinuing()) {
|
||||
SetState(AUDIOSINK_STATE_COMPLETE);
|
||||
break;
|
||||
{
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
if (WaitingForAudioToPlay()) {
|
||||
// NotifyData() will schedule next loop.
|
||||
break;
|
||||
}
|
||||
if (!IsPlaybackContinuing()) {
|
||||
SetState(AUDIOSINK_STATE_COMPLETE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!PlayAudio()) {
|
||||
SetState(AUDIOSINK_STATE_COMPLETE);
|
||||
@ -399,7 +383,7 @@ AudioSink::PlayAudio()
|
||||
void
|
||||
AudioSink::FinishAudioLoop()
|
||||
{
|
||||
AssertOnAudioThread();
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
MOZ_ASSERT(mStopAudioThread || AudioQueue().AtEndOfStream());
|
||||
if (!mStopAudioThread && mPlaying) {
|
||||
Drain();
|
||||
@ -451,6 +435,40 @@ AudioSink::PlayFromAudioQueue()
|
||||
return audio->mFrames;
|
||||
}
|
||||
|
||||
void
|
||||
AudioSink::UpdateStreamSettings()
|
||||
{
|
||||
AssertCurrentThreadInMonitor();
|
||||
|
||||
bool setVolume = mSetVolume;
|
||||
bool setPlaybackRate = mSetPlaybackRate;
|
||||
bool setPreservesPitch = mSetPreservesPitch;
|
||||
double volume = mVolume;
|
||||
double playbackRate = mPlaybackRate;
|
||||
bool preservesPitch = mPreservesPitch;
|
||||
|
||||
mSetVolume = false;
|
||||
mSetPlaybackRate = false;
|
||||
mSetPreservesPitch = false;
|
||||
|
||||
{
|
||||
ReentrantMonitorAutoExit exit(GetReentrantMonitor());
|
||||
if (setVolume) {
|
||||
mAudioStream->SetVolume(volume);
|
||||
}
|
||||
|
||||
if (setPlaybackRate &&
|
||||
NS_FAILED(mAudioStream->SetPlaybackRate(playbackRate))) {
|
||||
NS_WARNING("Setting the playback rate failed in AudioSink.");
|
||||
}
|
||||
|
||||
if (setPreservesPitch &&
|
||||
NS_FAILED(mAudioStream->SetPreservesPitch(preservesPitch))) {
|
||||
NS_WARNING("Setting the pitch preservation failed in AudioSink.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioSink::StartAudioStreamPlaybackIfNeeded()
|
||||
{
|
||||
|
@ -114,6 +114,8 @@ private:
|
||||
// audio data to the audio hardware. Called on the audio thread.
|
||||
uint32_t PlayFromAudioQueue();
|
||||
|
||||
void UpdateStreamSettings();
|
||||
|
||||
// If we have already written enough frames to the AudioStream, start the
|
||||
// playback.
|
||||
void StartAudioStreamPlaybackIfNeeded();
|
||||
@ -170,8 +172,16 @@ private:
|
||||
|
||||
dom::AudioChannel mChannel;
|
||||
|
||||
double mVolume;
|
||||
double mPlaybackRate;
|
||||
bool mPreservesPitch;
|
||||
|
||||
bool mStopAudioThread;
|
||||
|
||||
bool mSetVolume;
|
||||
bool mSetPlaybackRate;
|
||||
bool mSetPreservesPitch;
|
||||
|
||||
bool mPlaying;
|
||||
|
||||
MozPromiseHolder<GenericPromise> mEndPromise;
|
||||
|
@ -41,7 +41,7 @@ TelephonyParent::RecvPTelephonyRequestConstructor(PTelephonyRequestParent* aActo
|
||||
nsCOMPtr<nsITelephonyService> service = do_GetService(TELEPHONY_SERVICE_CONTRACTID);
|
||||
|
||||
if (!service) {
|
||||
return NS_SUCCEEDED(actor->NotifyError(NS_LITERAL_STRING("InvalidStateError")));
|
||||
return NS_SUCCEEDED(actor->GetCallback()->NotifyError(NS_LITERAL_STRING("InvalidStateError")));
|
||||
}
|
||||
|
||||
switch (aRequest.type()) {
|
||||
@ -57,79 +57,79 @@ TelephonyParent::RecvPTelephonyRequestConstructor(PTelephonyRequestParent* aActo
|
||||
case IPCTelephonyRequest::TDialRequest: {
|
||||
const DialRequest& request = aRequest.get_DialRequest();
|
||||
service->Dial(request.clientId(), request.number(),
|
||||
request.isEmergency(), actor);
|
||||
request.isEmergency(), actor->GetDialCallback());
|
||||
return true;
|
||||
}
|
||||
|
||||
case IPCTelephonyRequest::TSendUSSDRequest: {
|
||||
const SendUSSDRequest& request = aRequest.get_SendUSSDRequest();
|
||||
service->SendUSSD(request.clientId(), request.ussd(), actor);
|
||||
service->SendUSSD(request.clientId(), request.ussd(), actor->GetCallback());
|
||||
return true;
|
||||
}
|
||||
|
||||
case IPCTelephonyRequest::TCancelUSSDRequest: {
|
||||
const CancelUSSDRequest& request = aRequest.get_CancelUSSDRequest();
|
||||
service->CancelUSSD(request.clientId(), actor);
|
||||
service->CancelUSSD(request.clientId(), actor->GetCallback());
|
||||
return true;
|
||||
}
|
||||
|
||||
case IPCTelephonyRequest::TConferenceCallRequest: {
|
||||
const ConferenceCallRequest& request = aRequest.get_ConferenceCallRequest();
|
||||
service->ConferenceCall(request.clientId(), actor);
|
||||
service->ConferenceCall(request.clientId(), actor->GetCallback());
|
||||
return true;
|
||||
}
|
||||
|
||||
case IPCTelephonyRequest::TSeparateCallRequest: {
|
||||
const SeparateCallRequest& request = aRequest.get_SeparateCallRequest();
|
||||
service->SeparateCall(request.clientId(), request.callIndex(), actor);
|
||||
service->SeparateCall(request.clientId(), request.callIndex(), actor->GetCallback());
|
||||
return true;
|
||||
}
|
||||
|
||||
case IPCTelephonyRequest::THangUpConferenceRequest: {
|
||||
const HangUpConferenceRequest& request = aRequest.get_HangUpConferenceRequest();
|
||||
service->HangUpConference(request.clientId(), actor);
|
||||
service->HangUpConference(request.clientId(), actor->GetCallback());
|
||||
return true;
|
||||
}
|
||||
|
||||
case IPCTelephonyRequest::THoldConferenceRequest: {
|
||||
const HoldConferenceRequest& request = aRequest.get_HoldConferenceRequest();
|
||||
service->HoldConference(request.clientId(), actor);
|
||||
service->HoldConference(request.clientId(), actor->GetCallback());
|
||||
return true;
|
||||
}
|
||||
|
||||
case IPCTelephonyRequest::TResumeConferenceRequest: {
|
||||
const ResumeConferenceRequest& request = aRequest.get_ResumeConferenceRequest();
|
||||
service->ResumeConference(request.clientId(), actor);
|
||||
service->ResumeConference(request.clientId(), actor->GetCallback());
|
||||
return true;
|
||||
}
|
||||
|
||||
case IPCTelephonyRequest::TAnswerCallRequest: {
|
||||
const AnswerCallRequest& request = aRequest.get_AnswerCallRequest();
|
||||
service->AnswerCall(request.clientId(), request.callIndex(), actor);
|
||||
service->AnswerCall(request.clientId(), request.callIndex(), actor->GetCallback());
|
||||
return true;
|
||||
}
|
||||
|
||||
case IPCTelephonyRequest::THangUpCallRequest: {
|
||||
const HangUpCallRequest& request = aRequest.get_HangUpCallRequest();
|
||||
service->HangUpCall(request.clientId(), request.callIndex(), actor);
|
||||
service->HangUpCall(request.clientId(), request.callIndex(), actor->GetCallback());
|
||||
return true;
|
||||
}
|
||||
|
||||
case IPCTelephonyRequest::TRejectCallRequest: {
|
||||
const RejectCallRequest& request = aRequest.get_RejectCallRequest();
|
||||
service->RejectCall(request.clientId(), request.callIndex(), actor);
|
||||
service->RejectCall(request.clientId(), request.callIndex(), actor->GetCallback());
|
||||
return true;
|
||||
}
|
||||
|
||||
case IPCTelephonyRequest::THoldCallRequest: {
|
||||
const HoldCallRequest& request = aRequest.get_HoldCallRequest();
|
||||
service->HoldCall(request.clientId(), request.callIndex(), actor);
|
||||
service->HoldCall(request.clientId(), request.callIndex(), actor->GetCallback());
|
||||
return true;
|
||||
}
|
||||
|
||||
case IPCTelephonyRequest::TResumeCallRequest: {
|
||||
const ResumeCallRequest& request = aRequest.get_ResumeCallRequest();
|
||||
service->ResumeCall(request.clientId(), request.callIndex(), actor);
|
||||
service->ResumeCall(request.clientId(), request.callIndex(), actor->GetCallback());
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ TelephonyParent::RecvPTelephonyRequestConstructor(PTelephonyRequestParent* aActo
|
||||
request.dtmfChars(),
|
||||
request.pauseDuration(),
|
||||
request.toneDuration(),
|
||||
actor);
|
||||
actor->GetCallback());
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -347,12 +347,12 @@ TelephonyParent::SupplementaryServiceNotification(uint32_t aClientId,
|
||||
******************************************************************************/
|
||||
|
||||
NS_IMPL_ISUPPORTS(TelephonyRequestParent,
|
||||
nsITelephonyListener,
|
||||
nsITelephonyCallback,
|
||||
nsITelephonyDialCallback)
|
||||
nsITelephonyListener)
|
||||
|
||||
TelephonyRequestParent::TelephonyRequestParent()
|
||||
: mActorDestroyed(false)
|
||||
: mActorDestroyed(false),
|
||||
mCallback(new Callback(*this)),
|
||||
mDialCallback(new DialCallback(*this))
|
||||
{
|
||||
}
|
||||
|
||||
@ -428,56 +428,74 @@ TelephonyRequestParent::SupplementaryServiceNotification(uint32_t aClientId,
|
||||
MOZ_CRASH("Not a TelephonyParent!");
|
||||
}
|
||||
|
||||
// nsITelephonyDialCallback
|
||||
/*******************************************************************************
|
||||
* TelephonyRequestParent::Callback
|
||||
******************************************************************************/
|
||||
|
||||
NS_IMETHODIMP
|
||||
TelephonyRequestParent::NotifyDialMMI(const nsAString& aServiceCode)
|
||||
NS_IMPL_ISUPPORTS(TelephonyRequestParent::Callback,
|
||||
nsITelephonyCallback)
|
||||
|
||||
nsresult TelephonyRequestParent::Callback::SendResponse(const IPCTelephonyResponse& aResponse)
|
||||
{
|
||||
NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_FAILURE);
|
||||
|
||||
return SendNotifyDialMMI(nsAutoString(aServiceCode)) ? NS_OK : NS_ERROR_FAILURE;
|
||||
return mParent.SendResponse(aResponse);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TelephonyRequestParent::NotifySuccess()
|
||||
TelephonyRequestParent::Callback::NotifySuccess()
|
||||
{
|
||||
return SendResponse(SuccessResponse());
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TelephonyRequestParent::NotifyError(const nsAString& aError)
|
||||
TelephonyRequestParent::Callback::NotifyError(const nsAString& aError)
|
||||
{
|
||||
return SendResponse(ErrorResponse(nsAutoString(aError)));
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* TelephonyRequestParent::DialCallback
|
||||
******************************************************************************/
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED(TelephonyRequestParent::DialCallback,
|
||||
TelephonyRequestParent::Callback,
|
||||
nsITelephonyDialCallback)
|
||||
|
||||
NS_IMETHODIMP
|
||||
TelephonyRequestParent::NotifyDialCallSuccess(uint32_t aClientId,
|
||||
uint32_t aCallIndex,
|
||||
const nsAString& aNumber)
|
||||
TelephonyRequestParent::DialCallback::NotifyDialMMI(const nsAString& aServiceCode)
|
||||
{
|
||||
NS_ENSURE_TRUE(!mParent.mActorDestroyed, NS_ERROR_FAILURE);
|
||||
|
||||
return mParent.SendNotifyDialMMI(nsAutoString(aServiceCode)) ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TelephonyRequestParent::DialCallback::NotifyDialCallSuccess(uint32_t aClientId,
|
||||
uint32_t aCallIndex,
|
||||
const nsAString& aNumber)
|
||||
{
|
||||
return SendResponse(DialResponseCallSuccess(aClientId, aCallIndex,
|
||||
nsAutoString(aNumber)));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TelephonyRequestParent::NotifyDialMMISuccess(const nsAString& aStatusMessage)
|
||||
TelephonyRequestParent::DialCallback::NotifyDialMMISuccess(const nsAString& aStatusMessage)
|
||||
{
|
||||
return SendResponse(DialResponseMMISuccess(nsAutoString(aStatusMessage),
|
||||
AdditionalInformation(mozilla::void_t())));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TelephonyRequestParent::NotifyDialMMISuccessWithInteger(const nsAString& aStatusMessage,
|
||||
uint16_t aAdditionalInformation)
|
||||
TelephonyRequestParent::DialCallback::NotifyDialMMISuccessWithInteger(const nsAString& aStatusMessage,
|
||||
uint16_t aAdditionalInformation)
|
||||
{
|
||||
return SendResponse(DialResponseMMISuccess(nsAutoString(aStatusMessage),
|
||||
AdditionalInformation(aAdditionalInformation)));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TelephonyRequestParent::NotifyDialMMISuccessWithStrings(const nsAString& aStatusMessage,
|
||||
uint32_t aCount,
|
||||
const char16_t** aAdditionalInformation)
|
||||
TelephonyRequestParent::DialCallback::NotifyDialMMISuccessWithStrings(const nsAString& aStatusMessage,
|
||||
uint32_t aCount,
|
||||
const char16_t** aAdditionalInformation)
|
||||
{
|
||||
nsTArray<nsString> additionalInformation;
|
||||
for (uint32_t i = 0; i < aCount; i++) {
|
||||
@ -489,9 +507,9 @@ TelephonyRequestParent::NotifyDialMMISuccessWithStrings(const nsAString& aStatus
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TelephonyRequestParent::NotifyDialMMISuccessWithCallForwardingOptions(const nsAString& aStatusMessage,
|
||||
uint32_t aCount,
|
||||
nsIMobileCallForwardingOptions** aAdditionalInformation)
|
||||
TelephonyRequestParent::DialCallback::NotifyDialMMISuccessWithCallForwardingOptions(const nsAString& aStatusMessage,
|
||||
uint32_t aCount,
|
||||
nsIMobileCallForwardingOptions** aAdditionalInformation)
|
||||
{
|
||||
nsTArray<nsIMobileCallForwardingOptions*> additionalInformation;
|
||||
for (uint32_t i = 0; i < aCount; i++) {
|
||||
@ -503,15 +521,15 @@ TelephonyRequestParent::NotifyDialMMISuccessWithCallForwardingOptions(const nsAS
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TelephonyRequestParent::NotifyDialMMIError(const nsAString& aError)
|
||||
TelephonyRequestParent::DialCallback::NotifyDialMMIError(const nsAString& aError)
|
||||
{
|
||||
return SendResponse(DialResponseMMIError(nsAutoString(aError),
|
||||
AdditionalInformation(mozilla::void_t())));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TelephonyRequestParent::NotifyDialMMIErrorWithInfo(const nsAString& aError,
|
||||
uint16_t aInfo)
|
||||
TelephonyRequestParent::DialCallback::NotifyDialMMIErrorWithInfo(const nsAString& aError,
|
||||
uint16_t aInfo)
|
||||
{
|
||||
return SendResponse(DialResponseMMIError(nsAutoString(aError),
|
||||
AdditionalInformation(aInfo)));
|
||||
|
@ -72,15 +72,42 @@ private:
|
||||
|
||||
class TelephonyRequestParent : public PTelephonyRequestParent
|
||||
, public nsITelephonyListener
|
||||
, public nsITelephonyDialCallback
|
||||
{
|
||||
friend class TelephonyParent;
|
||||
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSITELEPHONYLISTENER
|
||||
NS_DECL_NSITELEPHONYCALLBACK
|
||||
NS_DECL_NSITELEPHONYDIALCALLBACK
|
||||
|
||||
class Callback : public nsITelephonyCallback {
|
||||
friend class TelephonyRequestParent;
|
||||
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSITELEPHONYCALLBACK
|
||||
|
||||
protected:
|
||||
explicit Callback(TelephonyRequestParent& aParent): mParent(aParent) {}
|
||||
virtual ~Callback() {}
|
||||
|
||||
private:
|
||||
nsresult SendResponse(const IPCTelephonyResponse& aResponse);
|
||||
TelephonyRequestParent& mParent;
|
||||
};
|
||||
|
||||
class DialCallback final : public Callback
|
||||
, public nsITelephonyDialCallback {
|
||||
friend class TelephonyRequestParent;
|
||||
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSITELEPHONYDIALCALLBACK
|
||||
NS_FORWARD_NSITELEPHONYCALLBACK(Callback::)
|
||||
|
||||
private:
|
||||
explicit DialCallback(TelephonyRequestParent& aParent): Callback(aParent) {}
|
||||
~DialCallback() {}
|
||||
};
|
||||
|
||||
protected:
|
||||
TelephonyRequestParent();
|
||||
@ -92,8 +119,20 @@ protected:
|
||||
nsresult
|
||||
SendResponse(const IPCTelephonyResponse& aResponse);
|
||||
|
||||
Callback*
|
||||
GetCallback() {
|
||||
return mCallback;
|
||||
}
|
||||
|
||||
DialCallback*
|
||||
GetDialCallback() {
|
||||
return mDialCallback;
|
||||
}
|
||||
|
||||
private:
|
||||
bool mActorDestroyed;
|
||||
nsRefPtr<Callback> mCallback;
|
||||
nsRefPtr<DialCallback> mDialCallback;
|
||||
};
|
||||
|
||||
END_TELEPHONY_NAMESPACE
|
||||
|
@ -495,6 +495,11 @@ class MarionetteTest(TestingMixin, MercurialScript, BlobUploadMixin, TransferMix
|
||||
level = ERROR
|
||||
tbpl_status = TBPL_FAILURE
|
||||
|
||||
qemu = os.path.join(dirs['abs_work_dir'], 'qemu.log')
|
||||
if os.path.isfile(qemu):
|
||||
self.copyfile(qemu, os.path.join(dirs['abs_blob_upload_dir'],
|
||||
'qemu.log'))
|
||||
|
||||
# dump logcat output if there were failures
|
||||
if self.config.get('emulator'):
|
||||
if marionette_parser.failed != "0" or 'T-FAIL' in marionette_parser.tsummary:
|
||||
|
Loading…
Reference in New Issue
Block a user