Examples of MediaPipeline


Examples of com.kurento.kmf.media.MediaPipeline

  public void onContentRequest(final HttpPlayerSession contentSession)
      throws Exception {
    // 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
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.