Own DataSource
Posted: 31 Oct 2019 18:51
Hi everyone!
I would like to play encrypted audio using libVLC
But I did not find how I can make my data source implementation
String, Uri, AssetFileDescriptor and Media(?) are not suitable for this. (Am I wrong?)
ExoPlayer has an interface for this (Link - https://github.com/google/ExoPlayer/blob/f6297f4f51f00c20d5b937d8f636ef215d89730f/library/core/src/main/java/com/google/android/exoplayer2/upstream/DataSource.java )
ijkplayer has an interface for this (Link - https://github.com/bilibili/ijkplayer/blob/cced91e3ae3730f5c63f3605b00d25eafcf5b97b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/misc/IMediaDataSource.java )
Does libVLC have such an interface?
--
Thanks and sorry for my bad english.
I would like to play encrypted audio using libVLC
But I did not find how I can make my data source implementation
Code: Select all
public void play(@NonNull AssetFileDescriptor afd) {
Media media = new Media(this.mLibVLC, afd);
this.play(media);
}
public void play(@NonNull String path) {
Media media = new Media(this.mLibVLC, path);
this.play(media);
}
public void play(@NonNull Uri uri) {
Media media = new Media(this.mLibVLC, uri);
this.play(media);
}
public void play(@NonNull Media media) {
this.setMedia(media);
media.release();
this.play();
}
ExoPlayer has an interface for this (Link - https://github.com/google/ExoPlayer/blob/f6297f4f51f00c20d5b937d8f636ef215d89730f/library/core/src/main/java/com/google/android/exoplayer2/upstream/DataSource.java )
ijkplayer has an interface for this (Link - https://github.com/bilibili/ijkplayer/blob/cced91e3ae3730f5c63f3605b00d25eafcf5b97b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/misc/IMediaDataSource.java )
Does libVLC have such an interface?
--
Thanks and sorry for my bad english.