Page 1 of 1

Own DataSource

Posted: 31 Oct 2019 18:51
by someusername
Hi everyone!
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(); }
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.

Re: Own DataSource

Posted: 01 Nov 2019 07:20
by RĂ©mi Denis-Courmont
LibVLC has one in the official documentation. I don't know if/how it works with your bindings.

Re: Own DataSource

Posted: 05 Nov 2019 10:45
by someusername
It seems that the developers did not provide such an interface. :(