Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. options.add("--aout=opensles");
  2. options.add("--audio-time-stretch"); // time stretching
  3. options.add("-vvv"); // verbosity
  4. options.add("--http-reconnect");
  5. options.add("--network-caching=" + 6 * 1000);
  6. libvlc = new LibVLC(options);
  7. //libvlc.setOnHardwareAccelerationError(this);
  8. surfaceHolder.setKeepScreenOn(true);
  9.  
  10. // Create media player
  11. mediaPlayer = new org.videolan.libvlc.MediaPlayer(libvlc);
  12. mediaPlayer.setEventListener(myPlayerListener);
  13.  
  14. // Set up video output
  15. final IVLCVout mediaPlayerVLCVout = mediaPlayer.getVLCVout();
  16. mediaPlayerVLCVout.setVideoView(surfaceView);
  17. //vout.setSubtitlesView(mSurfaceSubtitles);
  18. mediaPlayerVLCVout.addCallback(this);
  19. mediaPlayerVLCVout.attachViews();
  20.  
  21.  
  22. Media media = new Media(libvlc, Uri.parse(uri));
  23. mediaPlayer.setMedia(media);
  24. mediaPlayer.play();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement