Package uk.co.caprica.vlcj.player

Examples of uk.co.caprica.vlcj.player.MediaPlayerEventAdapter


        MediaPlayer mediaPlayer = factory.newHeadlessMediaPlayer();

        final CountDownLatch inPositionLatch = new CountDownLatch(1);
        final CountDownLatch snapshotTakenLatch = new CountDownLatch(1);

        mediaPlayer.addMediaPlayerEventListener(new MediaPlayerEventAdapter() {

            @Override
            public void positionChanged(MediaPlayer mediaPlayer, float newPosition) {
                if(newPosition >= VLC_THUMBNAIL_POSITION * 0.9f) { /* 90% margin */
                    inPositionLatch.countDown();
View Full Code Here


            System.exit(1);
        }

        MediaPlayerFactory factory = new MediaPlayerFactory();
        MediaPlayer mediaPlayer = factory.newEmbeddedMediaPlayer();
        mediaPlayer.addMediaPlayerEventListener(new MediaPlayerEventAdapter() {
            @Override
            public void snapshotTaken(MediaPlayer mediaPlayer, String filename) {
                System.out.println("snapshotTaken(filename=" + filename + ")");
            }
        });
View Full Code Here

        }

        final MediaPlayerFactory factory = new MediaPlayerFactory();
        final MediaPlayer mediaPlayer = factory.newHeadlessMediaPlayer();

        mediaPlayer.addMediaPlayerEventListener(new MediaPlayerEventAdapter() {
            @Override
            public void finished(MediaPlayer mediaPlayer) {
                int subItemCount = mediaPlayer.subItemCount();
                System.out.println("subItemCount=" + subItemCount);
View Full Code Here

            public void log(libvlc_log_level_e level, String module, String file, Integer line, String name, String header, Integer id, String message) {
                System.out.printf("[%-20s] (%-20s) %7s: %s\n", module, name, level, message);
            }
        });

        mediaPlayerComponent.getMediaPlayer().addMediaPlayerEventListener(new MediaPlayerEventAdapter() {
            @Override
            public void finished(MediaPlayer mediaPlayer) {
                latch.countDown();
            }
View Full Code Here

    /**
     * Create a new test.
     */
    private AudioMediaPlayerComponentTest() {
        audioMediaPlayerComponent = new AudioMediaPlayerComponent();
        audioMediaPlayerComponent.getMediaPlayer().addMediaPlayerEventListener(new MediaPlayerEventAdapter() {
            @Override
            public void stopped(MediaPlayer mediaPlayer) {
                System.exit(0);
            }

View Full Code Here

        mediaPlayer = factory.newEmbeddedMediaPlayer();
        mediaPlayer.setVideoSurface(factory.newVideoSurface(vs));

        mediaPlayer.setPlaySubItems(true); // <--- This is very important for YouTube media

        mediaPlayer.addMediaPlayerEventListener(new MediaPlayerEventAdapter() {
            @Override
            public void buffering(MediaPlayer mediaPlayer, float newCache) {
                System.out.println("Buffering " + newCache);
            }
View Full Code Here

        }

        final AudioMediaPlayerComponent player = new AudioMediaPlayerComponent();
        player.getMediaPlayer().prepareMedia(args[0]);

        player.getMediaPlayer().addMediaPlayerEventListener(new MediaPlayerEventAdapter() {

            @Override
            public void finished(MediaPlayer mediaPlayer) {
                System.out.println("finished");
                dump(player);
View Full Code Here

        }

        MediaPlayerFactory factory = new MediaPlayerFactory();
        MediaPlayer mediaPlayer = factory.newHeadlessMediaPlayer();

        mediaPlayer.addMediaPlayerEventListener(new MediaPlayerEventAdapter() {
            @Override
            public void videoOutput(MediaPlayer mediaPlayer, int newCount) {
                System.out.println("     Track Information: " + mediaPlayer.getTrackInfo());
                System.out.println("    Title Descriptions: " + mediaPlayer.getTitleDescriptions());
                System.out.println("    Video Descriptions: " + mediaPlayer.getVideoDescriptions());
View Full Code Here

        completionLatch = new CountDownLatch(1);

        // Create the media player
        mediaPlayerFactory = new MediaPlayerFactory();
        mediaPlayer = mediaPlayerFactory.newHeadlessMediaPlayer();
        mediaPlayer.addMediaPlayerEventListener(new MediaPlayerEventAdapter() {
            @Override
            public void finished(MediaPlayer mediaPlayer) {
                System.out.println("Rip completed successfully");
                completionLatch.countDown();
            }
View Full Code Here

            updateUIState();
        }
    }

    private void registerListeners() {
        mediaPlayer.addMediaPlayerEventListener(new MediaPlayerEventAdapter() {
            @Override
            public void playing(MediaPlayer mediaPlayer) {
//                updateVolume(mediaPlayer.getVolume());
            }
        });
View Full Code Here

TOP

Related Classes of uk.co.caprica.vlcj.player.MediaPlayerEventAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.