Package com.kurento.kmf.media

Examples of com.kurento.kmf.media.PlayerEndpoint


    // contentSession.start("http://files.kurento.org/video/sintel.webm");

    MediaPipelineFactory mpf = contentSession.getMediaPipelineFactory();
    final MediaPipeline mp = mpf.create();
    contentSession.releaseOnTerminate(mp);
    PlayerEndpoint playerEndpoint = mp.newPlayerEndpoint(
        "http://files.kurento.org/video/sintel.webm").build();
    HttpGetEndpoint httpEndpoint = mp.newHttpGetEndpoint().terminateOnEOS()
        .build();
    playerEndpoint.connect(httpEndpoint);
    contentSession.setAttribute("player", playerEndpoint);
    contentSession.start(httpEndpoint);

    playerEndpoint
        .addEndOfStreamListener(new MediaEventListener<EndOfStreamEvent>() {
          @Override
          public void onEvent(EndOfStreamEvent event) {
            PlayerEndpoint newPlayerEndpoint = mp
                .newPlayerEndpoint(
                    "http://media.w3.org/2010/05/sintel/trailer.webm")
                .build();
            newPlayerEndpoint.play();
            // contentSession
            // .setAttribute("player", newPlayerEndpoint);
            // contentSession.start(newPlayerEndpoint);
          }
        });
View Full Code Here


  }

  @Override
  public void onContentStarted(HttpPlayerSession session) {
    PlayerEndpoint playerEndpoint = (PlayerEndpoint) session
        .getAttribute("player");
    playerEndpoint.play();
  }
View Full Code Here

  @Override
  public void onContentStarted(HttpPlayerSession contentSession)
      throws Exception {
    if (contentSession.getAttribute("player") != null) {
      PlayerEndpoint playerendPoint = (PlayerEndpoint) contentSession
          .getAttribute("player");
      playerendPoint.play();
    }
    super.onContentStarted(contentSession);
  }
View Full Code Here

  @Override
  public void onContentRequest(HttpPlayerSession session) throws Exception {
    MediaPipelineFactory mpf = session.getMediaPipelineFactory();
    MediaPipeline mp = mpf.create();
    session.releaseOnTerminate(mp);
    PlayerEndpoint playerEndpoint = mp.newPlayerEndpoint(
        "http://files.kurento.org/video/fiwarecut.webm").build();
    session.setAttribute("player", playerEndpoint);
    HttpGetEndpoint httpEndpoint = mp.newHttpGetEndpoint().terminateOnEOS()
        .build();
    playerEndpoint.connect(httpEndpoint);
    session.start(httpEndpoint);
  }
View Full Code Here

    session.start(httpEndpoint);
  }

  @Override
  public void onContentStarted(HttpPlayerSession session) {
    PlayerEndpoint PlayerEndpoint = (PlayerEndpoint) session
        .getAttribute("player");
    PlayerEndpoint.play();
  }
View Full Code Here

  @Override
  public void onContentStarted(HttpPlayerSession contentSession)
      throws Exception {
    if (contentSession.getAttribute("player") != null) {
      PlayerEndpoint playerendPoint = (PlayerEndpoint) contentSession
          .getAttribute("player");
      playerendPoint.play();
    }
    super.onContentStarted(contentSession);
  }
View Full Code Here

  @Override
  public void onContentStarted(HttpPlayerSession contentSession)
      throws Exception {
    if (contentSession.getAttribute("player") != null) {
      PlayerEndpoint playerEndpoint = (PlayerEndpoint) contentSession
          .getAttribute("player");
      playerEndpoint.play();
    }
    super.onContentStarted(contentSession);
  }
View Full Code Here

  @Override
  public void onContentStarted(HttpPlayerSession contentSession)
      throws Exception {
    if (contentSession.getAttribute("player") != null) {
      PlayerEndpoint playerEndpoint = (PlayerEndpoint) contentSession
          .getAttribute("player");
      playerEndpoint.play();
    }
    super.onContentStarted(contentSession);
  }
View Full Code Here

      if (contentId != null && contentId.equalsIgnoreCase("jack")) {
        // Jack Vader Filter
        MediaPipelineFactory mpf = session.getMediaPipelineFactory();
        MediaPipeline mp = mpf.create();
        session.releaseOnTerminate(mp);
        PlayerEndpoint playerEndPoint = mp.newPlayerEndpoint(url)
            .build();
        JackVaderFilter filter = mp.newJackVaderFilter().build();
        playerEndPoint.connect(filter);
        HttpGetEndpoint httpEndpoint = mp.newHttpGetEndpoint()
            .terminateOnEOS().build();
        filter.connect(httpEndpoint);
        session.setAttribute("player", playerEndPoint);
        session.start(httpEndpoint);
      } else if (contentId != null && contentId.equalsIgnoreCase("zbar")) {
        // ZBar Filter
        MediaPipelineFactory mpf = session.getMediaPipelineFactory();
        MediaPipeline mp = mpf.create();
        PlayerEndpoint player = mp.newPlayerEndpoint(url).build();
        session.setAttribute("player", player);
        ZBarFilter zBarFilter = mp.newZBarFilter().build();
        player.connect(zBarFilter);
        HttpGetEndpoint httpEndpoint = mp.newHttpGetEndpoint()
            .terminateOnEOS().build();
        zBarFilter.connect(httpEndpoint);
        session.start(httpEndpoint);
        session.setAttribute("eventValue", "");
View Full Code Here

    // Media Pipeline
    MediaPipeline mp = contentSession.getMediaPipelineFactory().create();
    contentSession.releaseOnTerminate(mp);

    // Media Elements: Player Endpoint, HTTP Endpoint
    PlayerEndpoint playerEndpoint = mp.newPlayerEndpoint(
        "file:///tmp/recording").build();
    contentSession.setAttribute("player", playerEndpoint);
    HttpGetEndpoint httpEndpoint = mp.newHttpGetEndpoint().terminateOnEOS()
        .build();

    // Connections
    playerEndpoint.connect(httpEndpoint);

    // Start content session
    contentSession.start(httpEndpoint);
  }
View Full Code Here

TOP

Related Classes of com.kurento.kmf.media.PlayerEndpoint

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.