From eb8ec87a5cbf26998ee17d9d6b1d4979ee0c28f6 Mon Sep 17 00:00:00 2001 From: sheenachhabra Date: Fri, 12 May 2023 15:35:37 +0100 Subject: [PATCH] Add container module This module will contain functionalities common to extractor and muxer. PiperOrigin-RevId: 531501602 --- core_settings.gradle | 3 ++ libraries/container/README.md | 25 ++++++++++ libraries/container/build.gradle | 50 +++++++++++++++++++ .../src/androidTest/AndroidManifest.xml | 34 +++++++++++++ .../container/src/main/AndroidManifest.xml | 19 +++++++ .../media3/container/package-info.java | 19 +++++++ .../container/src/test/AndroidManifest.xml | 19 +++++++ 7 files changed, 169 insertions(+) create mode 100644 libraries/container/README.md create mode 100644 libraries/container/build.gradle create mode 100644 libraries/container/src/androidTest/AndroidManifest.xml create mode 100644 libraries/container/src/main/AndroidManifest.xml create mode 100644 libraries/container/src/main/java/androidx/media3/container/package-info.java create mode 100644 libraries/container/src/test/AndroidManifest.xml diff --git a/core_settings.gradle b/core_settings.gradle index 0f0b1a4a2d..e2935c9110 100644 --- a/core_settings.gradle +++ b/core_settings.gradle @@ -26,6 +26,9 @@ rootProject.name = gradle.ext.androidxMediaProjectName include modulePrefix + 'lib-common' project(modulePrefix + 'lib-common').projectDir = new File(rootDir, 'libraries/common') +include modulePrefix + 'lib-container' +project(modulePrefix + 'lib-container').projectDir = new File(rootDir, 'libraries/container') + include modulePrefix + 'lib-session' project(modulePrefix + 'lib-session').projectDir = new File(rootDir, 'libraries/session') diff --git a/libraries/container/README.md b/libraries/container/README.md new file mode 100644 index 0000000000..0789dec444 --- /dev/null +++ b/libraries/container/README.md @@ -0,0 +1,25 @@ +# Container module + +Provides functionality for media containers. + +## Getting the module + +The easiest way to get the module is to add it as a gradle dependency: + +```gradle +implementation 'androidx.media3:media3-container:1.X.X' +``` + +where `1.X.X` is the version, which must match the version of the other media +modules being used. + +Alternatively, you can clone this GitHub project and depend on the module +locally. Instructions for doing this can be found in the [top level README][]. + +[top level README]: ../../README.md + +## Links + +* [Javadoc][] + +[Javadoc]: https://developer.android.com/reference/androidx/media3/container/package-summary diff --git a/libraries/container/build.gradle b/libraries/container/build.gradle new file mode 100644 index 0000000000..c6f77dad95 --- /dev/null +++ b/libraries/container/build.gradle @@ -0,0 +1,50 @@ +// Copyright 2023 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.androidxMediaSettingsDir/common_library_config.gradle" +android { + + defaultConfig { + // The following argument makes the Android Test Orchestrator run its + // "pm clear" command after each test invocation. This command ensures + // that the app's state is completely cleared between tests. + testInstrumentationRunnerArguments clearPackageData: 'true' + } + + buildTypes { + debug { + testCoverageEnabled = true + } + } + + sourceSets { + androidTest.assets.srcDir '../test_data/src/test/assets/' + test.assets.srcDir '../test_data/src/test/assets/' + } +} + +ext { + javadocTitle = 'Container module' +} + +dependencies { + implementation project(modulePrefix + 'lib-common') +} +apply from: '../../javadoc_library.gradle' + +ext { + releaseArtifactId = 'media3-container' + releaseName = 'Media3 Container module' +} +apply from: '../../publish.gradle' diff --git a/libraries/container/src/androidTest/AndroidManifest.xml b/libraries/container/src/androidTest/AndroidManifest.xml new file mode 100644 index 0000000000..f6d9eef2e0 --- /dev/null +++ b/libraries/container/src/androidTest/AndroidManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/libraries/container/src/main/AndroidManifest.xml b/libraries/container/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..3b012e26f7 --- /dev/null +++ b/libraries/container/src/main/AndroidManifest.xml @@ -0,0 +1,19 @@ + + + + + + diff --git a/libraries/container/src/main/java/androidx/media3/container/package-info.java b/libraries/container/src/main/java/androidx/media3/container/package-info.java new file mode 100644 index 0000000000..2f988f9c8a --- /dev/null +++ b/libraries/container/src/main/java/androidx/media3/container/package-info.java @@ -0,0 +1,19 @@ +/* + * Copyright 2023 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. + */ +@NonNullApi +package androidx.media3.container; + +import androidx.media3.common.util.NonNullApi; diff --git a/libraries/container/src/test/AndroidManifest.xml b/libraries/container/src/test/AndroidManifest.xml new file mode 100644 index 0000000000..e812c9d4a0 --- /dev/null +++ b/libraries/container/src/test/AndroidManifest.xml @@ -0,0 +1,19 @@ + + + + + +