Skip to content

Commit

Permalink
Add decoder module
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 404810682
  • Loading branch information
ojw28 committed Oct 21, 2021
1 parent bffe2f7 commit ce17f61
Show file tree
Hide file tree
Showing 26 changed files with 115 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core_settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ project(modulePrefix + 'library-transformer').projectDir = new File(rootDir, 'li
include modulePrefix + 'library-ui'
project(modulePrefix + 'library-ui').projectDir = new File(rootDir, 'library/ui')

include modulePrefix + 'library-decoder'
project(modulePrefix + 'library-decoder').projectDir = new File(rootDir, 'library/decoder')
include modulePrefix + 'extension-av1'
project(modulePrefix + 'extension-av1').projectDir = new File(rootDir, 'extensions/av1')
include modulePrefix + 'extension-ffmpeg'
Expand Down
2 changes: 2 additions & 0 deletions extensions/av1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ if (project.file('src/main/jni/libgav1').exists()) {
}

dependencies {
implementation project(modulePrefix + 'library-decoder')
// TODO(b/203752526): Remove this dependency.
implementation project(modulePrefix + 'library-core')
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
Expand Down
2 changes: 2 additions & 0 deletions extensions/ffmpeg/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ if (project.file('src/main/jni/ffmpeg').exists()) {
}

dependencies {
implementation project(modulePrefix + 'library-decoder')
// TODO(b/203752526): Remove this dependency.
implementation project(modulePrefix + 'library-core')
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
Expand Down
2 changes: 2 additions & 0 deletions extensions/flac/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ android {
}

dependencies {
implementation project(modulePrefix + 'library-decoder')
// TODO(b/203752526): Remove this dependency.
implementation project(modulePrefix + 'library-core')
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
Expand Down
2 changes: 2 additions & 0 deletions extensions/opus/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ android {
}

dependencies {
implementation project(modulePrefix + 'library-decoder')
// TODO(b/203752526): Remove this dependency.
implementation project(modulePrefix + 'library-core')
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
Expand Down
2 changes: 2 additions & 0 deletions extensions/vp9/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ android {
}

dependencies {
implementation project(modulePrefix + 'library-decoder')
// TODO(b/203752526): Remove this dependency.
implementation project(modulePrefix + 'library-core')
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
Expand Down
3 changes: 3 additions & 0 deletions library/all/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle"

dependencies {
api project(modulePrefix + 'library-common')
api project(modulePrefix + 'library-decoder')
api project(modulePrefix + 'library-extractor')
api project(modulePrefix + 'library-core')
api project(modulePrefix + 'library-dash')
api project(modulePrefix + 'library-hls')
Expand Down
2 changes: 2 additions & 0 deletions library/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ android {

dependencies {
api project(modulePrefix + 'library-common')
// TODO(b/203754886): Revisit which modules are exported as API dependencies.
api project(modulePrefix + 'library-decoder')
api project(modulePrefix + 'library-extractor')
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
implementation 'androidx.core:core:' + androidxCoreVersion
Expand Down
11 changes: 11 additions & 0 deletions library/decoder/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Decoder module

Provides a decoder abstraction. Application code will not normally need to
depend on this module directly.

## Links

* [Javadoc][]: Classes matching `com.google.android.exoplayer2.decoder.*` belong to this
module.

[Javadoc]: https://exoplayer.dev/doc/reference/index.html
47 changes: 47 additions & 0 deletions library/decoder/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Copyright (C) 2021 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 from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle"

android {
defaultConfig {
multiDexEnabled true
}

buildTypes {
debug {
testCoverageEnabled = true
}
}
}

dependencies {
implementation project(modulePrefix + 'library-common')
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
testImplementation 'androidx.test:core:' + androidxTestCoreVersion
testImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion
testImplementation 'com.google.truth:truth:' + truthVersion
testImplementation 'org.robolectric:robolectric:' + robolectricVersion
}

ext {
javadocTitle = 'Decoder module'
}
apply from: '../../javadoc_library.gradle'

ext {
releaseArtifactId = 'exoplayer-decoder'
releaseDescription = 'The ExoPlayer library decoder module.'
}
apply from: '../../publish.gradle'
19 changes: 19 additions & 0 deletions library/decoder/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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.
-->

<manifest package="com.google.android.exoplayer2.decoder">
<uses-sdk/>
</manifest>
19 changes: 19 additions & 0 deletions library/decoder/src/test/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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.
-->

<manifest package="com.google.android.exoplayer2.decoder">
<uses-sdk/>
</manifest>
2 changes: 2 additions & 0 deletions library/extractor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ android {
dependencies {
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
implementation project(modulePrefix + 'library-common')
// TODO(b/203752187): Remove this dependency.
implementation project(modulePrefix + 'library-decoder')
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
compileOnly 'org.checkerframework:checker-compat-qual:' + checkerframeworkCompatVersion
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
Expand Down

0 comments on commit ce17f61

Please sign in to comment.