Add GVR extension and GvrBufferProcessor.

A GvrBufferProcessor can be passed to the player by overriding SimpleExoPlayer's
buildBufferProcessors method.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148442114
This commit is contained in:
andrewlewis 2017-02-24 02:18:22 -08:00 committed by Oliver Woodman
parent 84def0d048
commit 5985f28e1b
3 changed files with 55 additions and 7 deletions

19
extensions/gvr/README.md Normal file
View File

@ -0,0 +1,19 @@
# ExoPlayer GVR Extension #
## Description ##
The GVR extension wraps the [Google VR SDK for Android][]. It provides a
GvrBufferProcessor, which uses [GvrAudioSurround][] to provide binaural
rendering of surround sound and ambisonic soundfields.
## Instructions ##
If using SimpleExoPlayer, override SimpleExoPlayer.buildBufferProcessors to
return a GvrBufferProcessor.
If constructing renderers directly, pass a GvrBufferProcessor to
MediaCodecAudioRenderer's constructor.
[Google VR SDK for Android]: https://developers.google.com/vr/android/
[GvrAudioSurround]: https://developers.google.com/vr/android/reference/com/google/vr/sdk/audio/GvrAudioSurround

View File

@ -0,0 +1,30 @@
// Copyright (C) 2017 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
apply plugin: 'com.android.library'
android {
compileSdkVersion project.ext.compileSdkVersion
buildToolsVersion project.ext.buildToolsVersion
defaultConfig {
// Required by com.google.vr:sdk-audio.
minSdkVersion 19
targetSdkVersion project.ext.targetSdkVersion
}
}
dependencies {
compile project(':library')
compile 'com.google.vr:sdk-audio:1.20.0'
}

View File

@ -15,20 +15,19 @@ include ':library'
include ':testutils'
include ':demo'
include ':playbacktests'
include ':extension-ffmpeg'
include ':extension-flac'
include ':extension-okhttp'
include ':extension-opus'
include ':extension-vp9'
include ':extension-okhttp'
include ':extension-flac'
include ':extension-ffmpeg'
// Uncomment the following line to use the Cronet Extension.
// include ':extension-cronet'
project(':extension-ffmpeg').projectDir = new File(settingsDir, 'extensions/ffmpeg')
project(':extension-flac').projectDir = new File(settingsDir, 'extensions/flac')
project(':extension-okhttp').projectDir = new File(settingsDir, 'extensions/okhttp')
project(':extension-opus').projectDir = new File(settingsDir, 'extensions/opus')
project(':extension-vp9').projectDir = new File(settingsDir, 'extensions/vp9')
project(':extension-okhttp').projectDir = new File(settingsDir, 'extensions/okhttp')
project(':extension-flac').projectDir = new File(settingsDir, 'extensions/flac')
project(':extension-ffmpeg').projectDir = new File(settingsDir, 'extensions/ffmpeg')
// Uncomment the following line to use the Cronet Extension.
// See extensions/cronet/README.md for details.
// project(':extension-cronet').projectDir = new File(settingsDir, 'extensions/cronet')