[vlc] android, issue while subclassing surfaceview with libvlc

ben brouits at free.fr
Thu Oct 31 17:21:10 CET 2013


Le 02/10/2013 16:22, ben a écrit :
> Le 28/09/2013 17:33, Jean-Baptiste Kempf a écrit :
>>> Oh, no. Only the sources of vlc-android helped me until now. is
>>> there actually a libVLC sdk ? for now, i just used vlc-android's
>>> libvlcjni.so and borrowed some classes from LibVLC seen in
>>> vlc-android. but i must have been wrong if there is an sdk somewhere
>>> else... any link ? googling did not help.
>>
>> It is a bit new, and untested, which is the issue...
>>
>> See make .sdk.
>>
>
> Thanks.
> Well now i got LibVLC working nice (video+audio) on an armeabi-v7a with
> an android 4.2.2. I actually don't understand why it works now :-p a few
> cosmetics added in my SurfaceView subclass made it fall into working :-)
>
> However, with armeabi (and NO_FPU=1) on an older hardware and android
> 2.3.7, only the audio is working. the screen remains empty. Log lines:
> W/VLC ( 1774): swscale filter: can't get output picture
> W/VLC ( 1774): swscale filter: can't get output picture
> ...
>
> I'm going to digg in the issue, and may put the java file online if
> anybody is interested of such a class (subclassing SurfaceView).
>
> Anyway, i'm happy it could run fine on a recent hardware+android.
>
> Thanks for this nice piece of software.

Okay, i found the issue:

mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);

is a bad idea in some pre-3 android version, this leads to an always 
invalid surface: holder.getSurface().isValid() is always false in the 
surfaceChanged() callback.

Well, removing this line now, video works, but although displaying, it 
is so slow/freezing that it is unusable. I tried also a vanilla VLC on 
old phones (with NO_FPU=1) and the result is the same almost frozen 
video, while Android's MediaPlayer displays the same video flawlessly.
Has this issue been considered already in armeabi no_fpu phones ?
Thanks,
- Ben



More information about the vlc mailing list