libVLC on Android: can't see video.
Posted: 16 Sep 2014 20:59
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:
my SurfaceHolder Callback:
playing a Video:
thanks.
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);
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();
}
};
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);