Medialibrary stub
Compare changes
There are no changes yet
No changes between version 2 and version 2
This is a work in progress for the medialibrary stub.
VLC-Android can run with the stub, even though there are some things to fix still
The goal is the be able to run automated tests on a device / emulated environment that does not have medias.
For that the medialibrary needed to be abstracted to be, at request, replaced by a media datasource with fake medias, and not break the app.
This has been tested by running vlc-android with the stub.
Again, this is not completely stable yet. I wanted to publish it, so that it could begin being reviewed, and so that @shivanshs9 could start working with it.
This abstracts the medialibrary, and all media classes that relied on the native medialibrary.
To choose at run time which implementation to use, there is a ServiceLocator that calls the appropriate implementations' constructor.
Hence instead of calling Folder(...) now you should use ServiceLocator.getAFolder(...) which will return the correct instance.
To set the service locator to return the stub instead of the native medialibrary classes, use:
ServiceLocator.setLocatorMode(ServiceLocator.LocatorMode.TESTS)
No changes between version 2 and version 2
VideoLAN code repository instance