mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1105452 - Need to use new Audio system APIs for audio offload playback. r=roc, r=jld, r=ggrisco
Resolve the build failure caused by API changes There are some changes in Audio APIs in Android version 21. Modifying the code to use the new APIs. Change-Id: I24fdeb20f8f957d05fb6c0c317de0a6f0769c347 Resolve seccomp violation caused by syscall 256 Modify the filter to allow syscall 256 (set_tid_address). Change-Id: I49461770c4c5e70bf68462d34321381b0b7ead0a
This commit is contained in:
parent
a3489c7de6
commit
32debb7f9a
@ -77,8 +77,13 @@ AudioOffloadPlayer::AudioOffloadPlayer(MediaOmxCommonDecoder* aObserver) :
|
||||
#endif
|
||||
|
||||
CHECK(aObserver);
|
||||
#if ANDROID_VERSION >= 21
|
||||
mSessionId = AudioSystem::newAudioUniqueId();
|
||||
AudioSystem::acquireAudioSessionId(mSessionId, -1);
|
||||
#else
|
||||
mSessionId = AudioSystem::newAudioSessionId();
|
||||
AudioSystem::acquireAudioSessionId(mSessionId);
|
||||
#endif
|
||||
mAudioSink = new AudioOutput(mSessionId,
|
||||
IPCThreadState::self()->getCallingUid());
|
||||
}
|
||||
@ -86,7 +91,11 @@ AudioOffloadPlayer::AudioOffloadPlayer(MediaOmxCommonDecoder* aObserver) :
|
||||
AudioOffloadPlayer::~AudioOffloadPlayer()
|
||||
{
|
||||
Reset();
|
||||
#if ANDROID_VERSION >= 21
|
||||
AudioSystem::releaseAudioSessionId(mSessionId, -1);
|
||||
#else
|
||||
AudioSystem::releaseAudioSessionId(mSessionId);
|
||||
#endif
|
||||
}
|
||||
|
||||
void AudioOffloadPlayer::SetSource(const sp<MediaSource> &aSource)
|
||||
|
@ -244,6 +244,7 @@ SandboxFilterImplContent::Build() {
|
||||
Allow(SYSCALL(sched_setparam));
|
||||
Allow(SYSCALL(sigaltstack));
|
||||
Allow(SYSCALL(pipe));
|
||||
Allow(SYSCALL(set_tid_address));
|
||||
|
||||
/* Always last and always OK calls */
|
||||
/* Architecture-specific very infrequently used syscalls */
|
||||
|
Loading…
Reference in New Issue
Block a user