-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(android): allow to disable selected functionalities (#3681)
* feat(android): add possibility do disable some of functionalities * create dump classes * remove dump files when functionalities are enabled * add docs * enable all functionalities in example * throw error when trying to use disabled functionality * update docs
- Loading branch information
1 parent
2285eba
commit 64e3191
Showing
16 changed files
with
352 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
android/src/main/java/androidx/media3/exoplayer/dash/DashMediaSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package androidx.media3.exoplayer.dash; | ||
|
||
import androidx.media3.common.MediaItem; | ||
import androidx.media3.datasource.DataSource; | ||
import androidx.media3.exoplayer.drm.DrmSessionManagerProvider; | ||
import androidx.media3.exoplayer.source.MediaSource; | ||
import androidx.media3.exoplayer.upstream.LoadErrorHandlingPolicy; | ||
|
||
public class DashMediaSource { | ||
public static class Factory implements MediaSource.Factory { | ||
|
||
public Factory(DefaultDashChunkSource.Factory factory, DataSource.Factory factory1) { | ||
} | ||
|
||
@Override | ||
public MediaSource.Factory setDrmSessionManagerProvider(DrmSessionManagerProvider drmSessionManagerProvider) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public MediaSource.Factory setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy loadErrorHandlingPolicy) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public int[] getSupportedTypes() { | ||
return new int[0]; | ||
} | ||
|
||
@Override | ||
public MediaSource createMediaSource(MediaItem mediaItem) { | ||
return null; | ||
} | ||
} | ||
} | ||
|
12 changes: 12 additions & 0 deletions
12
android/src/main/java/androidx/media3/exoplayer/dash/DashUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package androidx.media3.exoplayer.dash; | ||
|
||
import android.net.Uri; | ||
|
||
import androidx.media3.datasource.DataSource; | ||
import androidx.media3.exoplayer.dash.manifest.DashManifest; | ||
|
||
public class DashUtil { | ||
public static DashManifest loadManifest(DataSource ds, Uri uri) { | ||
return null; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
android/src/main/java/androidx/media3/exoplayer/dash/DefaultDashChunkSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package androidx.media3.exoplayer.dash; | ||
|
||
import androidx.media3.datasource.DataSource; | ||
|
||
public class DefaultDashChunkSource { | ||
public static final class Factory { | ||
public Factory(DataSource.Factory mediaDataSourceFactory) { | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
android/src/main/java/androidx/media3/exoplayer/dash/manifest/AdaptationSet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package androidx.media3.exoplayer.dash.manifest; | ||
|
||
import androidx.collection.CircularArray; | ||
import androidx.media3.common.C; | ||
|
||
public class AdaptationSet { | ||
public int type = 0; | ||
public CircularArray<Representation> representations; | ||
|
||
public AdaptationSet() { | ||
representations = null; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
android/src/main/java/androidx/media3/exoplayer/dash/manifest/DashManifest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package androidx.media3.exoplayer.dash.manifest; | ||
|
||
public class DashManifest { | ||
public DashManifest() { | ||
|
||
} | ||
|
||
public int getPeriodCount() { | ||
return 0; | ||
} | ||
|
||
public Period getPeriod(int index) { | ||
return null; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
android/src/main/java/androidx/media3/exoplayer/dash/manifest/Period.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package androidx.media3.exoplayer.dash.manifest; | ||
|
||
import androidx.collection.CircularArray; | ||
|
||
public class Period { | ||
public CircularArray<AdaptationSet> adaptationSets; | ||
} |
12 changes: 12 additions & 0 deletions
12
android/src/main/java/androidx/media3/exoplayer/dash/manifest/Representation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package androidx.media3.exoplayer.dash.manifest; | ||
|
||
import androidx.media3.common.Format; | ||
|
||
public class Representation { | ||
public Format format; | ||
public long presentationTimeOffsetUs; | ||
|
||
public Representation() { | ||
format = null; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
android/src/main/java/androidx/media3/exoplayer/hls/HlsMediaSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package androidx.media3.exoplayer.hls; | ||
|
||
import androidx.media3.common.MediaItem; | ||
import androidx.media3.datasource.DataSource; | ||
import androidx.media3.exoplayer.drm.DrmSessionManagerProvider; | ||
import androidx.media3.exoplayer.source.MediaSource; | ||
import androidx.media3.exoplayer.upstream.LoadErrorHandlingPolicy; | ||
|
||
public class HlsMediaSource { | ||
public static class Factory implements MediaSource.Factory { | ||
public Factory(DataSource.Factory mediaDataSourceFactory) { | ||
} | ||
|
||
@Override | ||
public MediaSource.Factory setDrmSessionManagerProvider(DrmSessionManagerProvider drmSessionManagerProvider) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public MediaSource.Factory setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy loadErrorHandlingPolicy) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public int[] getSupportedTypes() { | ||
return new int[0]; | ||
} | ||
|
||
@Override | ||
public MediaSource createMediaSource(MediaItem mediaItem) { | ||
return null; | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
android/src/main/java/androidx/media3/exoplayer/rtsp/RtspMediaSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package androidx.media3.exoplayer.rtsp; | ||
|
||
import androidx.media3.common.MediaItem; | ||
import androidx.media3.exoplayer.drm.DrmSessionManagerProvider; | ||
import androidx.media3.exoplayer.source.MediaSource; | ||
import androidx.media3.exoplayer.upstream.LoadErrorHandlingPolicy; | ||
|
||
public class RtspMediaSource { | ||
public RtspMediaSource() { | ||
|
||
} | ||
|
||
public static class Factory implements MediaSource.Factory { | ||
@Override | ||
public MediaSource.Factory setDrmSessionManagerProvider(DrmSessionManagerProvider drmSessionManagerProvider) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public MediaSource.Factory setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy loadErrorHandlingPolicy) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public int[] getSupportedTypes() { | ||
return new int[0]; | ||
} | ||
|
||
@Override | ||
public MediaSource createMediaSource(MediaItem mediaItem) { | ||
return null; | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
android/src/main/java/androidx/media3/exoplayer/smoothstreaming/DefaultSsChunkSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package androidx.media3.exoplayer.smoothstreaming; | ||
|
||
import androidx.media3.common.MediaItem; | ||
import androidx.media3.datasource.DataSource; | ||
import androidx.media3.exoplayer.drm.DrmSessionManagerProvider; | ||
import androidx.media3.exoplayer.source.MediaSource; | ||
import androidx.media3.exoplayer.upstream.LoadErrorHandlingPolicy; | ||
|
||
public class DefaultSsChunkSource { | ||
public static class Factory implements MediaSource.Factory { | ||
public Factory(DataSource.Factory mediaDataSourceFactory) { | ||
} | ||
|
||
@Override | ||
public MediaSource.Factory setDrmSessionManagerProvider(DrmSessionManagerProvider drmSessionManagerProvider) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public MediaSource.Factory setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy loadErrorHandlingPolicy) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public int[] getSupportedTypes() { | ||
return new int[0]; | ||
} | ||
|
||
@Override | ||
public MediaSource createMediaSource(MediaItem mediaItem) { | ||
return null; | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
android/src/main/java/androidx/media3/exoplayer/smoothstreaming/SsMediaSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package androidx.media3.exoplayer.smoothstreaming; | ||
|
||
import androidx.media3.common.MediaItem; | ||
import androidx.media3.datasource.DataSource; | ||
import androidx.media3.exoplayer.drm.DrmSessionManagerProvider; | ||
import androidx.media3.exoplayer.source.MediaSource; | ||
import androidx.media3.exoplayer.upstream.LoadErrorHandlingPolicy; | ||
|
||
public class SsMediaSource { | ||
public static class Factory implements MediaSource.Factory { | ||
public Factory(DefaultSsChunkSource.Factory factory, DataSource.Factory factory1) { | ||
} | ||
|
||
@Override | ||
public MediaSource.Factory setDrmSessionManagerProvider(DrmSessionManagerProvider drmSessionManagerProvider) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public MediaSource.Factory setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy loadErrorHandlingPolicy) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public int[] getSupportedTypes() { | ||
return new int[0]; | ||
} | ||
|
||
@Override | ||
public MediaSource createMediaSource(MediaItem mediaItem) { | ||
return null; | ||
} | ||
} | ||
} |
Oops, something went wrong.