Package com.kurento.kmf.media

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


    } else {
      MediaPipeline mp = firstWebRtcEndpoint.getMediaPipeline();

      WebRtcEndpoint newWebRtcEndpoint = mp.newWebRtcEndpoint().build();
      contentSession.releaseOnTerminate(newWebRtcEndpoint);
      newWebRtcEndpoint.connect(firstWebRtcEndpoint);
      firstWebRtcEndpoint.connect(newWebRtcEndpoint);

      if (contentId != null && contentId.equalsIgnoreCase("record")) {
        RecorderEndpoint recorderEndPoint = mp.newRecorderEndpoint(
            "file:///tmp/peer").build();
View Full Code Here


      if (contentId != null && contentId.equalsIgnoreCase("record")) {
        RecorderEndpoint recorderEndPoint = mp.newRecorderEndpoint(
            "file:///tmp/peer").build();
        contentSession.setAttribute("recorder", recorderEndPoint);
        newWebRtcEndpoint.connect(recorderEndPoint);
      }

      contentSession.start(newWebRtcEndpoint);
    }
  }
View Full Code Here

      throws Exception {
    MediaPipeline mp = contentSession.getMediaPipelineFactory().create();
    contentSession.releaseOnTerminate(mp);
    filter = mp.newJackVaderFilter().build();
    WebRtcEndpoint webRtcEndpoint = mp.newWebRtcEndpoint().build();
    webRtcEndpoint.connect(filter);
    filter.connect(webRtcEndpoint);
    contentSession.start(webRtcEndpoint);
  }

  @Override
View Full Code Here

      session.terminate(403, "User " + name + " is already in the room. "
          + "Please select another name and try again.");
    } else {
      WebRtcEndpoint endpoint = mp.newWebRtcEndpoint().build();
      HubPort hubPort = dispatcher.newHubPort().build();
      endpoint.connect(hubPort);
      hubPort.connect(endpoint);
      DispatcherParticipant participant = new DispatcherParticipant(
          session.getSessionId(), name, endpoint, session, hubPort);
      session.start(participant.endpoint);
      session.setAttribute("participant", participant);
View Full Code Here

    MediaPipeline mp = contentSession.getMediaPipelineFactory().create();
    contentSession.releaseOnTerminate(mp);
    filter = mp.newFaceOverlayFilter().build();
    filter.setOverlayedImage(imageUrl, -0.35F, -1.2F, 1.6F, 1.6F);
    WebRtcEndpoint webRtcEndpoint = mp.newWebRtcEndpoint().build();
    webRtcEndpoint.connect(filter);
    filter.connect(webRtcEndpoint);
    contentSession.start(webRtcEndpoint);
  }

  @Override
View Full Code Here

                -0.35F, -1.2F, 1.6F, 1.6F);
          }
        });

    // Connections
    webRtcEndpoint.connect(pointerDetectorFilter);
    pointerDetectorFilter.connect(faceOverlayFilter);
    faceOverlayFilter.connect(webRtcEndpoint);

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

    // Media Elements: WebRTC Endpoint
    WebRtcEndpoint webRtcEndpoint = mp.newWebRtcEndpoint().build();

    // Connections
    webRtcEndpoint.connect(webRtcEndpoint);

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

    WebRtcEndpoint webRtcEndpoint = mp.newWebRtcEndpoint().build();
    FaceOverlayFilter faceOverlayFilter = mp.newFaceOverlayFilter().build();
    faceOverlayFilter.setOverlayedImage(
        "http://files.kurento.org/imgs/mario-wings.png", -0.35F, -1.2F,
        1.6F, 1.6F);
    webRtcEndpoint.connect(faceOverlayFilter);
    faceOverlayFilter.connect(webRtcEndpoint);

    // SDP Answer
    String sdpAnswer = webRtcEndpoint.processOffer(sdpOffer);
    JsonObject scParams = new JsonObject();
View Full Code Here

      MediaPipeline mp = firstWebRtcEndpoint.getMediaPipeline();

      // Next WebRTC endpoints connected to the first one
      WebRtcEndpoint newWebRtcEndpoint = mp.newWebRtcEndpoint().build();
      contentSession.releaseOnTerminate(newWebRtcEndpoint);
      newWebRtcEndpoint.connect(firstWebRtcEndpoint);
      firstWebRtcEndpoint.connect(newWebRtcEndpoint);

      contentSession.start(newWebRtcEndpoint);
    }
  }
View Full Code Here

  @Override
  public void onContentRequest(WebRtcContentSession session) throws Exception {
    MediaPipeline mp = session.getMediaPipelineFactory().create();
    session.releaseOnTerminate(mp);
    WebRtcEndpoint webRtcEndpoint = mp.newWebRtcEndpoint().build();
    webRtcEndpoint.connect(webRtcEndpoint);
    session.start(webRtcEndpoint);
  }

}
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.