Package uk.co.caprica.vlcj.medialist

Examples of uk.co.caprica.vlcj.medialist.MediaList


        List<MediaMeta> metas = player.getMediaPlayer().getSubItemMediaMeta();
        for(MediaMeta meta : metas) {
            System.out.println("meta: " + meta);
        }
        // Dump the media list
        MediaList mediaList = player.getMediaPlayer().subItemsMediaList();
        List<MediaListItem> items = mediaList.items();
        for(MediaListItem item : items) {
            System.out.println(item);
        }
    }
View Full Code Here


    public MediaDirsTest() throws Exception {
        MediaPlayerFactory mediaPlayerFactory = new MediaPlayerFactory();

        MediaDiscoverer videoMediaDiscoverer = mediaPlayerFactory.newMediaDiscoverer("video_dir");
        Thread.sleep(500); // FIXME not acceptable
        MediaList videoFileList = videoMediaDiscoverer.getMediaList();
//        videoFileList.addMediaListEventListener(this);
        List<MediaListItem> videoFiles = videoFileList.items();
        System.out.println("Video Files:");
        dumpItems(videoFiles, 1);

        System.out.println();

        MediaDiscoverer audioMediaDiscoverer = mediaPlayerFactory.newMediaDiscoverer("audio_dir");
        Thread.sleep(500); // FIXME not acceptable
        MediaList audioFileList = audioMediaDiscoverer.getMediaList();
//        audioFileList.addMediaListEventListener(this);
        List<MediaListItem> audioFiles = audioFileList.items();
        System.out.println("Audio Files:");
        dumpItems(audioFiles, 1);

        System.out.println();

        MediaDiscoverer pictureMediaDiscoverer = mediaPlayerFactory.newMediaDiscoverer("picture_dir");
        Thread.sleep(500); // FIXME not acceptable
        MediaList pictureFileList = pictureMediaDiscoverer.getMediaList();
//        pictureFileList.addMediaListEventListener(this);
        List<MediaListItem> pictureFiles = pictureFileList.items();
        System.out.println("Picture Files:");
        dumpItems(pictureFiles, 1);

        System.out.println("DONE!");
View Full Code Here

    private void refresh() {
        for(String name : NAMES) {
            System.out.println("Testing '" + name + "'");
            MediaDiscoverer discoverer = discoverers.get(name);
            MediaList mediaList = discoverer.getMediaList();
            List<MediaListItem> items = mediaList.items();
            dumpItems(items, 1);
            System.out.println();
        }
    }
View Full Code Here

    public static void main(String[] args) {
        MediaPlayerFactory mediaPlayerFactory = new MediaPlayerFactory();

        MediaDiscoverer audioMediaDiscoverer = mediaPlayerFactory.newAudioMediaDiscoverer();
        MediaList audioDeviceList = audioMediaDiscoverer.getMediaList();
        List<MediaListItem> audioDevices = audioDeviceList.items();
        System.out.println("Audio Devices:");
        dumpItems(audioDevices, 1);

        System.out.println();

        MediaDiscoverer videoMediaDiscoverer = mediaPlayerFactory.newVideoMediaDiscoverer();
        MediaList videoDeviceList = videoMediaDiscoverer.getMediaList();
        List<MediaListItem> videoDevices = videoDeviceList.items();
        System.out.println("Video Devices:");
        dumpItems(videoDevices, 1);
    }
View Full Code Here

*/
public class StaticImageTest extends VlcjTest {

    public static void main(String[] args) throws Exception {
        MediaPlayerFactory factory = new MediaPlayerFactory();
        MediaList playlist = factory.newMediaList();
        playlist.addMedia("/home/mark/1.jpg", "image-duration=5"); // Play picture for 5 seconds
        playlist.addMedia("/home/mark/2.jpg", "image-duration=5");
        MediaListPlayer player = factory.newMediaListPlayer();
        player.setMediaList(playlist);
        player.setMode(MediaListPlayerMode.LOOP);
        player.play();
        Thread.currentThread().join();
View Full Code Here

            public void nextItem(MediaListPlayer mediaListPlayer, libvlc_media_t item, String itemMrl) {
                System.out.println("nextItem()");
            }
        });

        MediaList mediaList = mediaPlayerFactory.newMediaList();
        mediaList.addMedia("/home/movies/one.mp4");
        mediaList.addMedia("/home/movies/two.mp4");
        mediaList.addMedia("/home/movies/three.mp4");

        mediaListPlayer.setMediaList(mediaList);
        mediaListPlayer.setMode(MediaListPlayerMode.LOOP);

        mediaListPlayer.play();
View Full Code Here

        f.setContentPane(cp);
        f.setSize(800, 600);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setVisible(true);

        MediaList mediaList = mediaPlayerFactory.newMediaList();
        mediaList.addMedia("/movies/1.mp4");
        mediaList.addMedia("/movies/2.mp4");
        mediaList.addMedia("/movies/3.mp4");

        mediaListPlayer.setMediaList(mediaList);
        mediaListPlayer.setMode(MediaListPlayerMode.LOOP);

        mediaListPlayer.play();
View Full Code Here

     *
     * @return media list instance
     */
    public MediaList newMediaList() {
        Logger.debug("newMediaList()");
        return new MediaList(libvlc, instance);
    }
View Full Code Here

    }

    @Override
    public MediaList subItemsMediaList() {
        Logger.debug("subItemsMediaList()");
        MediaList result;
        if(mediaInstance != null) {
            libvlc_media_list_t mediaListInstance = libvlc.libvlc_media_subitems(mediaInstance);
            result = new MediaList(libvlc, instance, mediaListInstance);
            libvlc.libvlc_media_list_release(mediaListInstance);
        }
        else {
            result = null;
        }
View Full Code Here

     *
     * @return media list
     */
    public final MediaList getMediaList() {
        libvlc_media_list_t mediaListInstance = libvlc.libvlc_media_discoverer_media_list(mediaDiscovererInstance);
        MediaList mediaList = new MediaList(libvlc, instance, mediaListInstance);
        libvlc.libvlc_media_list_release(mediaListInstance);
        return mediaList;
    }
View Full Code Here

TOP

Related Classes of uk.co.caprica.vlcj.medialist.MediaList

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.