如果他们使用版本1.0.6一切顺利,但我们targetSdkVersion 23收到erroare。 在版本sdk v 3.0.0源代码不起作用。有一个简单的样本,VLC sdk v3?
来自1.0.6的代码是可行的,而3.0.0中的代码不起作用:
mSurfaceView = (SurfaceView) findViewById(R.id.player_surface);
mSurfaceHolder = mSurfaceView.getHolder();
mSurfaceFrame = (FrameLayout) findViewById(R.id.player_surface_frame);
mMediaUrl = getIntent().getExtras().getString("videoUrl");
try {
mLibVLC = new LibVLC();
mLibVLC.setAout(mLibVLC.AOUT_AUDIOTRACK);
mLibVLC.setVout(mLibVLC.VOUT_ANDROID_SURFACE);
mLibVLC.setHardwareAcceleration(LibVLC.HW_ACCELERATION_FULL);
mLibVLC.setSubtitlesEncoding("");
mLibVLC.setTimeStretching(false);
mLibVLC.setFrameSkip(true);
mLibVLC.setChroma("RV16");
mLibVLC.setVerboseMode(true);
mLibVLC.setAout(-1);
mLibVLC.setDeblocking(0);
mLibVLC.setNetworkCaching(0);
mLibVLC.init(getApplicationContext());
} catch (LibVlcException e){
Log.e(TAG, e.toString());
}
mSurface = mSurfaceHolder.getSurface();
mLibVLC.attachSurface(mSurface, VideoVLCActivity.this);
mLibVLC.playMRL(mMediaUrl);