I am working on a Android project and I want to creat a media player using the LibVLC. To creat a media player with this lib I need to instantiate a LibVLC object. But when I try to do that the instantiation will failed and the app will close automatically.
Here is where I creat a LibVLC object :
public class MediaPlayerActivity extends Activity {
private static final String TAG = "MediaPlayerDemo";
private int mVideoWidth;
private int mVideoHeight;
private MediaPlayer mMediaPlayer;
private SurfaceView mPreview;
private SurfaceHolder holder;
private String path;
private Bundle extras;
private static final String MEDIA = "media";
private boolean mIsVideoSizeKnown = false;
private boolean mIsVideoReadyToBePlayed = false;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.row);
LibVLC lib = new LibVLC();
// path = (String) getIntent().getSerializableExtra("path");
}
}
I am using the LibVLC get on the master branch. So I don't understand why it failed.
Try to check if some of the requirements here are missing Hopefully it will assist you .
https://bitbucket.org/edwardcw/libvlc-android-sample