libVLC on Android: can't see video.

VLC for Android and Chrome OS specific usage questions
nirhal
New Cone
New Cone
Posts: 4
Joined: 16 Sep 2014 20:50

libVLC on Android: can't see video.

Postby nirhal » 16 Sep 2014 21:02

Hi,
I'm trying to use the libVLC for playing a video file.
i have working audio but i can't see picture on the SurfaceView.
LogCat says: yuv_rgb_neon filter: can't get output picture.
also I've notice that the original VLC app doesn't load the yuv_rgb_neon filter, but my app does load it.
what is this filter? how can I disable this filter?

my Code:

Code: Select all

try { mLibVLC = VLCInstance.getLibVlcInstance(); } catch (LibVlcException e) { // faild return; } VLCInstance.updateLibVlcSettings(null); // aout = 1; vout = 0; deblocking = -1; hardwareAcceleration = 2; final SurfaceView mSurface = (SurfaceView) findViewById(R.id.player_surface); SurfaceHolder mSurfaceHolder = mSurface.getHolder(); mSurfaceHolder.setFormat(PixelFormat.RGBX_8888); mSurfaceHolder.addCallback(mSurfaceCallback); //mLibVLC.setHardwareAcceleration(LibVLC.HW_ACCELERATION_FULL); mLibVLC.eventVideoPlayerActivityCreated(true);
my SurfaceHolder Callback:

Code: Select all

private final SurfaceHolder.Callback mSurfaceCallback = new Callback() { @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { if(mLibVLC != null) mLibVLC.attachSurface(holder.getSurface(), MainActivity.this); } @Override public void surfaceCreated(SurfaceHolder holder) { } @Override public void surfaceDestroyed(SurfaceHolder holder) { if(mLibVLC != null) mLibVLC.detachSurface(); } };
playing a Video:

Code: Select all

mLibVLC.setMediaList(); String mLocation = "file:///storage/extSdCard/a.mp4"; mLibVLC.getMediaList().add(new Media(mLibVLC, mLocation)); int savedIndexPosition = mLibVLC.getMediaList().size() - 1; mLibVLC.playIndex(savedIndexPosition); mLibVLC.play(); mSurface.setKeepScreenOn(true);
thanks. :D

nirhal
New Cone
New Cone
Posts: 4
Joined: 16 Sep 2014 20:50

Re: libVLC on Android: can't see video.

Postby nirhal » 16 Sep 2014 21:31

Got it.
i needed to call "updateLibVlcSettings" before calling "init" on the libVLC instance.

edwardw
Big Cone-huna
Big Cone-huna
Posts: 2346
Joined: 24 Jun 2012 23:36
VLC version: 3.0.0-git

Re: libVLC on Android: can't see video.

Postby edwardw » 11 Oct 2014 21:07

Cool.


Return to “VLC for Android and Chrome OS”

Who is online

Users browsing this forum: No registered users and 13 guests