Package com.kurento.kmf.media

Examples of com.kurento.kmf.media.PlayerEndpoint.connect()


    mixerPort1 = mixer.newHubPort().build();
    mixerPort2 = mixer.newHubPort().build();
    mixerPort3 = mixer.newHubPort().build();

    player2.connect(bn);
    player1.connect(mixerPort1);
    bn.connect(mixerPort2);

    playersList = new ArrayList<PlayerConnection>();
View Full Code Here


      throws Exception {
    if (contentCommand.getType().equalsIgnoreCase("newplayer")) {
      PlayerEndpoint player = mediaPipeline.newPlayerEndpoint(
          VideoURLs.map.get("small-mp4")).build();
      HubPort mixerPort = mixer.newHubPort().build();
      player.connect(mixerPort);
      player.play();
      PlayerConnection conection = new PlayerConnection(player, mixerPort);
      playersList.add(conection);
    } else if (contentCommand.getType().equalsIgnoreCase("deleteplayer")) {
      PlayerConnection connection = playersList.get(0);
View Full Code Here

    HttpGetEndpoint httpEP = mp.newHttpGetEndpoint().terminateOnEOS()
        .build();
    playerRed.connect(hubPort1);
    playerGreen.connect(hubPort2);
    playerBlue.connect(hubPort3);
    playerWhite.connect(hubPort4);

    hubPort5.connect(httpEP);

    // Test execution
    try (BrowserClient browser = new BrowserClient.Builder()
View Full Code Here

    contentSession.releaseOnTerminate(mp);
    PlayerEndpoint playerEndpoint = mp.newPlayerEndpoint("").build();
    contentSession.setAttribute("player", playerEndpoint);
    HttpGetEndpoint httpEP = mp.newHttpGetEndpoint().terminateOnEOS()
        .build();
    playerEndpoint.connect(httpEP);
    contentSession.start(httpEP);
  }

  @Override
  public void onContentStarted(HttpPlayerSession contentSession)
View Full Code Here

      MediaPipeline mp = session.getMediaPipelineFactory().create();
      session.releaseOnTerminate(mp);
      PlayerEndpoint playerEP = mp.newPlayerEndpoint(
          "http://files.kurento.org/video/sintel.webm").build();
      WebRtcEndpoint webRtcEndpoint = mp.newWebRtcEndpoint().build();
      playerEP.connect(webRtcEndpoint);
      playerEP.play();
      session.start(webRtcEndpoint);

      terminateLatch = new CountDownLatch(1);
    }
View Full Code Here

    // Media Pipeline #2
    PlayerEndpoint playerEP = mp.newPlayerEndpoint(
        FILE_SCHEMA + getDefaultFileForRecording()).build();
    HttpGetEndpoint httpEP = mp.newHttpGetEndpoint().terminateOnEOS()
        .build();
    playerEP.connect(httpEP);

    // Test execution #2. Play the recorded video
    try (BrowserClient browser = new BrowserClient.Builder()
        .browser(browserType).client(Client.PLAYER).build()) {
      browser.setURL(httpEP.getUrl());
View Full Code Here

    PlayerEndpoint playerEndpoint = mp.newPlayerEndpoint(
        VideoURLs.map.get("webm")).build();
    contentSession.setAttribute("player", playerEndpoint);
    HttpGetEndpoint httpEP = mp.newHttpGetEndpoint().terminateOnEOS()
        .build();
    playerEndpoint.connect(httpEP);
    contentSession.start(httpEP);
  }

  @Override
  public void onContentStarted(HttpPlayerSession contentSession)
View Full Code Here

    Dispatcher dispatcher = mp.newDispatcher().build();
    HubPort hubPort1 = dispatcher.newHubPort().build();
    HubPort hubPort2 = dispatcher.newHubPort().build();

    playerEP.connect(hubPort1);
    hubPort2.connect(webRtcEP);

    dispatcher.connect(hubPort1, hubPort2);
    playerEP.play();
View Full Code Here

    MediaPipeline mp = pipelineFactory.create();
    PlayerEndpoint playerEP = mp.newPlayerEndpoint(
        "http://files.kurento.org/video/small.webm").build();
    HttpGetEndpoint httpEP = mp.newHttpGetEndpoint().terminateOnEOS()
        .build();
    playerEP.connect(httpEP);
    playerEP.play();

    // Test execution
    HttpClient client = HttpClientBuilder.create().build();
    HttpGet httpGet = new HttpGet(httpEP.getUrl());
View Full Code Here

    PlayerEndpoint player = pipeline.newPlayerEndpoint(
        "http://files.kurento.org/video/small.webm").build();

    HttpGetEndpoint httpGetEndpoint = pipeline.newHttpGetEndpoint().build();

    player.connect(httpGetEndpoint);

    String url = httpGetEndpoint.getUrl();

    player.release();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.