Package uk.co.caprica.vlcj.player.manager

Examples of uk.co.caprica.vlcj.player.manager.MediaManager


    public static void main(String[] args) throws Exception {
        // The host and port options are REQUIRED for video-on-demand
        MediaPlayerFactory factory = new MediaPlayerFactory("--rtsp-host=127.0.0.1", "--rtsp-port=5004");

        MediaManager manager = factory.newMediaManager();

        String vodMux = "mp2t";
//        String mux = "ts";

        // Client MRL: rtsp://@127.0.0.1:5004/Movie1
        manager.addVideoOnDemand("Movie1", "/movies/Movie1.iso", true, vodMux);

        // Client MRL: rtsp://@127.0.0.1:5004/Movie2
        manager.addVideoOnDemand("Movie2", "/movies/Movie2.iso", true, vodMux);

        System.out.println("Movie1: " + manager.show("Movie1"));
        System.out.println("Movie2: " + manager.show("Movie2"));

        Thread.currentThread().join();
    }
View Full Code Here


public class BroadcastTest extends VlcjTest {

    public static void main(String[] args) throws Exception {
        MediaPlayerFactory factory = new MediaPlayerFactory();

        MediaManager manager = factory.newMediaManager();

        // First set up all of the broadcasts...

        // Client MRL: rtp://@230.0.0.1:5004
        manager.addBroadcast("Movie1", "/movies/Movie1.iso", "#rtp{dst=230.0.0.1,port=5004,mux=ts", true, false);

        // Client MRL: rtp://@230.0.0.1:5005
        manager.addBroadcast("Movie2", "/movies/Movie2.iso", "#rtp{dst=230.0.0.1,port=5005,mux=ts", true, false);

        // Next play all of the broadcasts
        manager.play("Movie1");
        manager.play("Movie2");

        // Dump out some information about the media (these methods return JSON)
        System.out.println("Movie1: " + manager.show("Movie1"));
        System.out.println("Movie2: " + manager.show("Movie2"));

        // Wait forever
        Thread.currentThread().join();
    }
View Full Code Here

TOP

Related Classes of uk.co.caprica.vlcj.player.manager.MediaManager

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.