Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options.add("--aout=opensles");
- options.add("--audio-time-stretch"); // time stretching
- options.add("-vvv"); // verbosity
- options.add("--http-reconnect");
- options.add("--network-caching=" + 6 * 1000);
- libvlc = new LibVLC(options);
- //libvlc.setOnHardwareAccelerationError(this);
- surfaceHolder.setKeepScreenOn(true);
- // Create media player
- mediaPlayer = new org.videolan.libvlc.MediaPlayer(libvlc);
- mediaPlayer.setEventListener(myPlayerListener);
- // Set up video output
- final IVLCVout mediaPlayerVLCVout = mediaPlayer.getVLCVout();
- mediaPlayerVLCVout.setVideoView(surfaceView);
- //vout.setSubtitlesView(mSurfaceSubtitles);
- mediaPlayerVLCVout.addCallback(this);
- mediaPlayerVLCVout.attachViews();
- Media media = new Media(libvlc, Uri.parse(uri));
- mediaPlayer.setMedia(media);
- mediaPlayer.play();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement