[Android] LibVLC android commit 7733732: no vout on mpeg4/m2ts

ben brouits at free.fr
Fri Jun 19 15:50:48 CEST 2015


Le 16/03/2015 17:32, ben a écrit :
> Le 04/03/2015 17:45, ben a écrit :
>>
>> After new tests, freshly cloned git repo, and a simple Activity that
>> reads a local video from its assets, i still get the same issue and a
>> blank screen. The relevant logs are:
>>
>> D/VLC﹕ [64227c04] core window: looking for vout window module matching
>> "any": 1 candidates
>> D/VLC﹕ [64227c04] core window: no vout window modules matched
>> D/VLC﹕ [62b1dc04] core video output: Opening vout display wrapper
>> D/VLC﹕ [62baf2f4] core vout display: looking for vout display module
>> matching "androidsurface": 4 candidates
>> E/VLC﹕ [62baf2f4] android_surface vout display: Could not initialize
>> libandroid.so/libui.so/libgui.so/libsurfaceflinger_client.so!
>> D/VLC﹕ [62baf2f4] core vout display: no vout display modules matched
>> E/VLC﹕ [62b1dc04] core video output: video output creation failed
>> D/VLC﹕ [62b8c09c] core spu text: removing module "freetype"
>> D/VLC﹕ [62b9dcfc] core scale: removing module "yuvp"
>> D/VLC﹕ [62b997b4] core scale: removing module "swscale"
>> E/VLC﹕ [62b25eb4] core decoder: failed to create video output
>> W/VLC﹕ [62b25eb4] mediacodec decoder: NewPicture failed
>> I/EVENT﹕ MediaPlayerVout
>>
>> I confess i have no further idea to try to fix that, but i will re-read
>> again the VidePlayerActivity of VLC to understad why my simple Activity
>> fails displaying the video.
>>
>> Thanks for any suggestion.
>> - Ben
> [...]

Okay, months later... it works now. In case of other people have the
same issue, the fix is simple: one must call libVLC.init(ctx) _after_
all libVLC configuration stuff. Otherwise, the configuration is not 
taken into account (such as libVLC.setVout(LibVLC.VOUT_ANDROID_WINDOW).

in other words, do:

if(LibVlcUtil.isGingerbreadOrLater())
                 libVLC.setVout(LibVLC.VOUT_ANDROID_WINDOW);
             else
                 libVLC.setVout(LibVLC.VOUT_ANDROID_SURFACE);
libVLC.init(ctx);
...

but don't:

libVLC.init(ctx);
if (LibVLCUtil.isGingerbreadOrLater())
	...

Cheers,
- Ben


More information about the Android mailing list