diff --git a/library/all/build.gradle b/library/all/build.gradle
index 0b7753a9be..93a0c03da8 100644
--- a/library/all/build.gradle
+++ b/library/all/build.gradle
@@ -28,6 +28,7 @@ android {
dependencies {
compile project(':library-core')
compile project(':library-ui')
+ compile project(':library-smoothstreaming')
}
android.libraryVariants.all { variant ->
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java b/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java
index 083569416c..f7dbea851a 100644
--- a/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java
+++ b/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java
@@ -23,9 +23,6 @@ import com.google.android.exoplayer2.source.MediaSource;
import com.google.android.exoplayer2.source.MergingMediaSource;
import com.google.android.exoplayer2.source.SingleSampleMediaSource;
import com.google.android.exoplayer2.source.TrackGroupArray;
-import com.google.android.exoplayer2.source.dash.DashMediaSource;
-import com.google.android.exoplayer2.source.hls.HlsMediaSource;
-import com.google.android.exoplayer2.source.smoothstreaming.SsMediaSource;
import com.google.android.exoplayer2.text.TextRenderer;
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
import com.google.android.exoplayer2.trackselection.TrackSelectionArray;
@@ -47,12 +44,11 @@ import com.google.android.exoplayer2.video.MediaCodecVideoRenderer;
*
* - A {@link MediaSource} that defines the media to be played, loads the media, and from
* which the loaded media can be read. A MediaSource is injected via {@link #prepare} at the start
- * of playback. The library provides default implementations for regular media files
- * ({@link ExtractorMediaSource}), DASH ({@link DashMediaSource}), SmoothStreaming
- * ({@link SsMediaSource}) and HLS ({@link HlsMediaSource}), implementations for merging
- * ({@link MergingMediaSource}) and concatenating ({@link ConcatenatingMediaSource}) other
- * MediaSources, and an implementation for loading single samples
- * ({@link SingleSampleMediaSource}) most often used for side-loaded subtitle and closed
+ * of playback. The library modules provide default implementations for regular media files
+ * ({@link ExtractorMediaSource}), DASH (DashMediaSource), SmoothStreaming (SsMediaSource) and HLS
+ * (HlsMediaSource), implementations for merging ({@link MergingMediaSource}) and concatenating
+ * ({@link ConcatenatingMediaSource}) other MediaSources, and an implementation for loading single
+ * samples ({@link SingleSampleMediaSource}) most often used for side-loaded subtitle and closed
* caption files.
* - {@link Renderer}s that render individual components of the media. The library
* provides default implementations for common media types ({@link MediaCodecVideoRenderer},
diff --git a/library/smoothstreaming/build.gradle b/library/smoothstreaming/build.gradle
new file mode 100644
index 0000000000..bcec8f5319
--- /dev/null
+++ b/library/smoothstreaming/build.gradle
@@ -0,0 +1,44 @@
+// 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 {
+ minSdkVersion project.ext.minSdkVersion
+ targetSdkVersion project.ext.targetSdkVersion
+ }
+
+ sourceSets {
+ androidTest {
+ java.srcDirs += "../../testutils/src/main/java/"
+ }
+ }
+}
+
+dependencies {
+ compile project(':library-core')
+ compile 'com.android.support:support-annotations:25.2.0'
+ androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
+ androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
+ androidTestCompile 'org.mockito:mockito-core:1.9.5'
+}
+
+ext {
+ releaseArtifact = 'exoplayer-smoothstreaming'
+ releaseDescription = 'The ExoPlayer library SmoothStreaming module.'
+}
+apply from: '../../publish.gradle'
diff --git a/library/smoothstreaming/src/androidTest/AndroidManifest.xml b/library/smoothstreaming/src/androidTest/AndroidManifest.xml
new file mode 100644
index 0000000000..9f62e26867
--- /dev/null
+++ b/library/smoothstreaming/src/androidTest/AndroidManifest.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/library/core/src/androidTest/assets/smoothstreaming/sample_ismc_1 b/library/smoothstreaming/src/androidTest/assets/sample_ismc_1
similarity index 100%
rename from library/core/src/androidTest/assets/smoothstreaming/sample_ismc_1
rename to library/smoothstreaming/src/androidTest/assets/sample_ismc_1
diff --git a/library/core/src/androidTest/assets/smoothstreaming/sample_ismc_2 b/library/smoothstreaming/src/androidTest/assets/sample_ismc_2
similarity index 100%
rename from library/core/src/androidTest/assets/smoothstreaming/sample_ismc_2
rename to library/smoothstreaming/src/androidTest/assets/sample_ismc_2
diff --git a/library/core/src/androidTest/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParserTest.java b/library/smoothstreaming/src/androidTest/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParserTest.java
similarity index 90%
rename from library/core/src/androidTest/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParserTest.java
rename to library/smoothstreaming/src/androidTest/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParserTest.java
index 8116755a0a..4663f014ff 100644
--- a/library/core/src/androidTest/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParserTest.java
+++ b/library/smoothstreaming/src/androidTest/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParserTest.java
@@ -25,8 +25,8 @@ import java.io.IOException;
*/
public final class SsManifestParserTest extends InstrumentationTestCase {
- private static final String SAMPLE_ISMC_1 = "smoothstreaming/sample_ismc_1";
- private static final String SAMPLE_ISMC_2 = "smoothstreaming/sample_ismc_2";
+ private static final String SAMPLE_ISMC_1 = "sample_ismc_1";
+ private static final String SAMPLE_ISMC_2 = "sample_ismc_2";
/**
* Simple test to ensure the sample manifests parse without any exceptions being thrown.
diff --git a/library/smoothstreaming/src/main/AndroidManifest.xml b/library/smoothstreaming/src/main/AndroidManifest.xml
new file mode 100644
index 0000000000..49b47f0916
--- /dev/null
+++ b/library/smoothstreaming/src/main/AndroidManifest.xml
@@ -0,0 +1,17 @@
+
+
+
+
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/DefaultSsChunkSource.java b/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/DefaultSsChunkSource.java
similarity index 100%
rename from library/core/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/DefaultSsChunkSource.java
rename to library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/DefaultSsChunkSource.java
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsChunkSource.java b/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsChunkSource.java
similarity index 100%
rename from library/core/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsChunkSource.java
rename to library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsChunkSource.java
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaPeriod.java b/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaPeriod.java
similarity index 100%
rename from library/core/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaPeriod.java
rename to library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaPeriod.java
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java b/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java
similarity index 100%
rename from library/core/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java
rename to library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifest.java b/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifest.java
similarity index 100%
rename from library/core/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifest.java
rename to library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifest.java
diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParser.java b/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParser.java
similarity index 100%
rename from library/core/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParser.java
rename to library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParser.java
diff --git a/settings.gradle b/settings.gradle
index 4961921068..f76909864e 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -13,6 +13,7 @@
// limitations under the License.
include ':library'
include ':library-core'
+include ':library-smoothstreaming'
include ':library-ui'
include ':testutils'
include ':demo'
@@ -28,6 +29,7 @@ include ':extension-vp9'
project(':library').projectDir = new File(settingsDir, 'library/all')
project(':library-core').projectDir = new File(settingsDir, 'library/core')
+project(':library-smoothstreaming').projectDir = new File(settingsDir, 'library/smoothstreaming')
project(':library-ui').projectDir = new File(settingsDir, 'library/ui')
project(':extension-ffmpeg').projectDir = new File(settingsDir, 'extensions/ffmpeg')
project(':extension-flac').projectDir = new File(settingsDir, 'extensions/flac')