Skip to content

Commit ce17f61

Browse files
committed
Add decoder module
PiperOrigin-RevId: 404810682
1 parent bffe2f7 commit ce17f61

26 files changed

+115
-0
lines changed

‎core_settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ project(modulePrefix + 'library-transformer').projectDir = new File(rootDir, 'li
4242
include modulePrefix + 'library-ui'
4343
project(modulePrefix + 'library-ui').projectDir = new File(rootDir, 'library/ui')
4444

45+
include modulePrefix + 'library-decoder'
46+
project(modulePrefix + 'library-decoder').projectDir = new File(rootDir, 'library/decoder')
4547
include modulePrefix + 'extension-av1'
4648
project(modulePrefix + 'extension-av1').projectDir = new File(rootDir, 'extensions/av1')
4749
include modulePrefix + 'extension-ffmpeg'

‎extensions/av1/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ if (project.file('src/main/jni/libgav1').exists()) {
4444
}
4545

4646
dependencies {
47+
implementation project(modulePrefix + 'library-decoder')
48+
// TODO(b/203752526): Remove this dependency.
4749
implementation project(modulePrefix + 'library-core')
4850
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
4951
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion

‎extensions/ffmpeg/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ if (project.file('src/main/jni/ffmpeg').exists()) {
2121
}
2222

2323
dependencies {
24+
implementation project(modulePrefix + 'library-decoder')
25+
// TODO(b/203752526): Remove this dependency.
2426
implementation project(modulePrefix + 'library-core')
2527
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
2628
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion

‎extensions/flac/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ android {
2424
}
2525

2626
dependencies {
27+
implementation project(modulePrefix + 'library-decoder')
28+
// TODO(b/203752526): Remove this dependency.
2729
implementation project(modulePrefix + 'library-core')
2830
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
2931
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion

‎extensions/opus/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ android {
2424
}
2525

2626
dependencies {
27+
implementation project(modulePrefix + 'library-decoder')
28+
// TODO(b/203752526): Remove this dependency.
2729
implementation project(modulePrefix + 'library-core')
2830
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
2931
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion

‎extensions/vp9/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ android {
2424
}
2525

2626
dependencies {
27+
implementation project(modulePrefix + 'library-decoder')
28+
// TODO(b/203752526): Remove this dependency.
2729
implementation project(modulePrefix + 'library-core')
2830
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
2931
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion

‎library/all/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle"
1515

1616
dependencies {
17+
api project(modulePrefix + 'library-common')
18+
api project(modulePrefix + 'library-decoder')
19+
api project(modulePrefix + 'library-extractor')
1720
api project(modulePrefix + 'library-core')
1821
api project(modulePrefix + 'library-dash')
1922
api project(modulePrefix + 'library-hls')

‎library/core/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ android {
3636

3737
dependencies {
3838
api project(modulePrefix + 'library-common')
39+
// TODO(b/203754886): Revisit which modules are exported as API dependencies.
40+
api project(modulePrefix + 'library-decoder')
3941
api project(modulePrefix + 'library-extractor')
4042
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
4143
implementation 'androidx.core:core:' + androidxCoreVersion

‎library/decoder/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Decoder module
2+
3+
Provides a decoder abstraction. Application code will not normally need to
4+
depend on this module directly.
5+
6+
## Links
7+
8+
* [Javadoc][]: Classes matching `com.google.android.exoplayer2.decoder.*` belong to this
9+
module.
10+
11+
[Javadoc]: https://exoplayer.dev/doc/reference/index.html

‎library/decoder/build.gradle

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Copyright (C) 2021 The Android Open Source Project
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle"
15+
16+
android {
17+
defaultConfig {
18+
multiDexEnabled true
19+
}
20+
21+
buildTypes {
22+
debug {
23+
testCoverageEnabled = true
24+
}
25+
}
26+
}
27+
28+
dependencies {
29+
implementation project(modulePrefix + 'library-common')
30+
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
31+
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
32+
testImplementation 'androidx.test:core:' + androidxTestCoreVersion
33+
testImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion
34+
testImplementation 'com.google.truth:truth:' + truthVersion
35+
testImplementation 'org.robolectric:robolectric:' + robolectricVersion
36+
}
37+
38+
ext {
39+
javadocTitle = 'Decoder module'
40+
}
41+
apply from: '../../javadoc_library.gradle'
42+
43+
ext {
44+
releaseArtifactId = 'exoplayer-decoder'
45+
releaseDescription = 'The ExoPlayer library decoder module.'
46+
}
47+
apply from: '../../publish.gradle'

0 commit comments

Comments
 (0)