Package com.kurento.kmf.media

Examples of com.kurento.kmf.media.MediaPipeline


        Color.RED);
  }

  public void doTest(Browser browserType, String videoPath, String audioUrl,
      Color color) throws InterruptedException {
    MediaPipeline mp = pipelineFactory.create();
    WebRtcEndpoint webRtcEndpoint = mp.newWebRtcEndpoint().build();
    webRtcEndpoint.connect(webRtcEndpoint);

    BrowserClient.Builder builder = new BrowserClient.Builder().browser(
        browserType).client(Client.WEBRTC);
    if (videoPath != null) {
View Full Code Here


      throws Exception {
    EventListener.clearEventList();
    EventListener.addEvent();

    MediaPipelineFactory mpf = contentSession.getMediaPipelineFactory();
    MediaPipeline mp = mpf.create();
    contentSession.releaseOnTerminate(mp);
    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);
  }
View Full Code Here

    doTest(Browser.FIREFOX);
  }

  public void doTest(Browser browserType) throws Exception {
    // Media Pipeline
    MediaPipeline mp = pipelineFactory.create();

    PlayerEndpoint playerEP = mp.newPlayerEndpoint(
        "http://files.kurento.org/video/30sec/red.webm").build();
    WebRtcEndpoint webRtcEP = mp.newWebRtcEndpoint().build();

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

    playerEP.connect(hubPort1);
    hubPort2.connect(webRtcEP);
View Full Code Here

public class MediaApiPlayerNoBrowserTest extends MediaApiTest {

  @Test
  public void testPlayer() throws Exception {
    // Media Pipeline
    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
View Full Code Here

  @Override
  public void onContentRequest(final HttpPlayerSession session)
      throws Exception {

    MediaPipelineFactory mpf = session.getMediaPipelineFactory();
    MediaPipeline mp = mpf.create();

    PlayerEndpoint player = mp.newPlayerEndpoint(
        "http://files.kurento.org/video/barcodes.webm").build();
    session.setAttribute("player", player);

    ZBarFilter zBarFilter = mp.newZBarFilter().build();
    player.connect(zBarFilter);
    HttpGetEndpoint httpEP = mp.newHttpGetEndpoint().terminateOnEOS()
        .build();
    zBarFilter.connect(httpEP);
    session.start(httpEP);
    session.setAttribute("eventValue", "");
    zBarFilter
View Full Code Here

public class PlayerJsonJackVader extends HttpPlayerHandler {

  @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();
    JackVaderFilter filter = mp.newJackVaderFilter().build();
    playerEndpoint.connect(filter);
    session.setAttribute("player", playerEndpoint);
    HttpGetEndpoint httpEP = mp.newHttpGetEndpoint().terminateOnEOS()
        .build();
    filter.connect(httpEP);
    session.start(httpEP);
  }
View Full Code Here

  @Override
  public void onContentRequest(HttpPlayerSession contentSession)
      throws Exception {
    // Media Pipeline
    MediaPipeline mp = contentSession.getMediaPipelineFactory().create();
    contentSession.releaseOnTerminate(mp);

    // Media Elements: Player Endpoint, Filter, HTTP Endpoint
    PlayerEndpoint playerEndpoint = mp.newPlayerEndpoint(
        "http://files.kurento.org/video/fiwarecut.webm").build();
    contentSession.setAttribute("player", playerEndpoint);
    JackVaderFilter filter = mp.newJackVaderFilter().build();
    HttpGetEndpoint httpEndpoint = mp.newHttpGetEndpoint().terminateOnEOS()
        .build();

    // Connections
    filter.connect(httpEndpoint);
    playerEndpoint.connect(filter);
View Full Code Here

      IOException, URISyntaxException {

    MediaPipelineFactory kurento = KmfMediaApi
        .createMediaPipelineFactoryFromSystemProps();

    MediaPipeline pipeline = kurento.create();

    PlayerEndpoint player = pipeline.newPlayerEndpoint(
        "http://files.kurento.org/video/fiwarecut.mp4").build();
    // player.addEndOfStreamListener(new
    // MediaEventListener<EndOfStreamEvent>() {
    //
    // @Override
    // public void onEvent(EndOfStreamEvent event) {
    // System.out.println("Finish");
    // System.exit(0);
    // }
    // });

    FaceOverlayFilter filter = pipeline.newFaceOverlayFilter().build();
    filter.setOverlayedImage(
        "http://files.kurento.org/imgs/mario-wings.png", -0.35F, -1.2F,
        1.6F, 1.6F);

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

    // RecorderEndpoint recorder = pipeline.newRecorderEndpoint(
    // "file:///home/mica/Data/Kurento/tmp/video.mp4").build();

    player.connect(filter);
View Full Code Here

  @Override
  public void onContentRequest(HttpPlayerSession contentSession)
      throws Exception {
    // Media Pipeline
    MediaPipeline mp = contentSession.getMediaPipelineFactory().create();
    contentSession.releaseOnTerminate(mp);

    // Media Elements: Player Endpoint, HTTP Endpoint
    PlayerEndpoint playerEndpoint = mp.newPlayerEndpoint(
        "http://media.w3.org/2010/05/sintel/trailer.webm").build();
    contentSession.setAttribute("player", playerEndpoint);
    HttpGetEndpoint httpEndpoint = mp.newHttpGetEndpoint().terminateOnEOS()
        .build();

    // Connections
    playerEndpoint.connect(httpEndpoint);
View Full Code Here

  @Override
  public void onContentRequest(WebRtcContentSession contentSession)
      throws Exception {
    // Media Pipeline
    MediaPipeline mp = contentSession.getMediaPipelineFactory().create();
    contentSession.releaseOnTerminate(mp);

    // Media Elements: WebRTC Endpoint, Recorder Endpoint
    WebRtcEndpoint webRtcEndpoint = mp.newWebRtcEndpoint().build();
    RecorderEndpoint recorderEndpoint = mp.newRecorderEndpoint(
        "file:///tmp/recording").build();
    contentSession.setAttribute("recorder", recorderEndpoint);

    // Connections
    webRtcEndpoint.connect(webRtcEndpoint);
View Full Code Here

TOP

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

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.