Package com.kurento.kmf.media

Examples of com.kurento.kmf.media.RtpEndpoint


  public void onContentRequest(RtpContentSession session) throws Exception {
    MediaPipelineFactory mpf = session.getMediaPipelineFactory();
    MediaPipeline mp = mpf.create();
    session.releaseOnTerminate(mp);
    JackVaderFilter filter = mp.newJackVaderFilter().build();
    RtpEndpoint rtpEP = mp.newRtpEndpoint().build();
    filter.connect(rtpEP);
    session.start(rtpEP);
    sharedJackVaderReference = filter;
  }
View Full Code Here


  }

  @Test
  public void testSourceSinks() throws KurentoException, InterruptedException {

    RtpEndpoint rtp = pipeline.newRtpEndpoint().build();

    AsyncResultManager<List<MediaSource>> asyncMediaSource = new AsyncResultManager<>(
        "rtp.getMediaSrcs() invocation");
    rtp.getMediaSrcs(asyncMediaSource.getContinuation());
    asyncMediaSource.waitForResult();

    AsyncResultManager<List<MediaSink>> asyncMediaSink = new AsyncResultManager<>(
        "rtp.getMediaSinks() invocation");
    rtp.getMediaSinks(asyncMediaSink.getContinuation());
    asyncMediaSink.waitForResult();

    AsyncResultManager<List<MediaSource>> asyncMediaSourceAudio = new AsyncResultManager<>(
        "rtp.getMediaSrcs(AUDIO) invocation");
    rtp.getMediaSrcs(AUDIO, asyncMediaSourceAudio.getContinuation());
    asyncMediaSourceAudio.waitForResult();

    AsyncResultManager<List<MediaSink>> asyncMediaSinkAudio = new AsyncResultManager<>(
        "rtp.getMediaSinks(AUDIO) invocation");
    rtp.getMediaSinks(AUDIO, asyncMediaSinkAudio.getContinuation());
    asyncMediaSinkAudio.waitForResult();

    rtp.release();
  }
View Full Code Here

  public void onContentRequest(RtpContentSession session) throws Exception {
    MediaPipelineFactory mpf = session.getMediaPipelineFactory();
    MediaPipeline mp = mpf.create();
    session.releaseOnTerminate(mp);
    JackVaderFilter filter = mp.newJackVaderFilter().build();
    RtpEndpoint rtpEndpoint = mp.newRtpEndpoint().build();
    rtpEndpoint.connect(filter);
    rtpEndpoint.connect(rtpEndpoint);
    session.start(rtpEndpoint);
    sharedFilterReference = filter;
  }
View Full Code Here

  public void onContentRequest(RtpContentSession session) throws Exception {
    MediaPipelineFactory mpf = session.getMediaPipelineFactory();
    MediaPipeline mp = mpf.create();
    session.releaseOnTerminate(mp);
    ZBarFilter filter = mp.newZBarFilter().build();
    RtpEndpoint rtpEndpoint = mp.newRtpEndpoint().build();
    rtpEndpoint.connect(filter);
    rtpEndpoint.connect(rtpEndpoint);
    session.start(rtpEndpoint);
    sharedFilterReference = filter;
  }
View Full Code Here

      throws InterruptedException {

    PlayerEndpoint player = pipeline.newPlayerEndpoint(URL_BARCODES)
        .build();

    RtpEndpoint rtpEndpoint = pipeline.newRtpEndpoint().build();

    String requestSdp = "v=0\r\n"
        + "o=- 12345 12345 IN IP4 95.125.31.136\r\n" + "s=-\r\n"
        + "c=IN IP4 95.125.31.136\r\n" + "t=0 0\r\n"
        + "m=video 52126 RTP/AVP 96 97 98\r\n"
        + "a=rtpmap:96 H264/90000\r\n"
        + "a=rtpmap:97 MP4V-ES/90000\r\n"
        + "a=rtpmap:98 H263-1998/90000\r\n" + "a=recvonly\r\n"
        + "b=AS:384\r\n";

    rtpEndpoint.processOffer(requestSdp);
    player.connect(rtpEndpoint, MediaType.VIDEO);
    player.play();

    // just a little bit of time before destroying
    Thread.sleep(2000);
View Full Code Here

  public void testStream() throws InterruptedException {

    AsyncResultManager<RtpEndpoint> async = new AsyncResultManager<>(
        "RtpEndpoint creation");
    pipeline.newRtpEndpoint().buildAsync(async.getContinuation());
    RtpEndpoint rtp = async.waitForResult();

    AsyncResultManager<String> asyncGenerateOffer = new AsyncResultManager<>(
        "rtp.generateOffer() invocation");
    rtp.generateOffer(asyncGenerateOffer.getContinuation());
    asyncGenerateOffer.waitForResult();

    AsyncResultManager<String> asyncProcessOffer = new AsyncResultManager<>(
        "rtp.generateOffer() invocation");
    rtp.processOffer("processOffer test",
        asyncProcessOffer.getContinuation());
    asyncProcessOffer.waitForResult();

    AsyncResultManager<String> asyncProcessAnswer = new AsyncResultManager<>(
        "rtp.processAnswer() invocation");
    rtp.processAnswer("processAnswer test",
        asyncProcessAnswer.getContinuation());
    asyncProcessAnswer.waitForResult();

    AsyncResultManager<String> asyncGetLocalSessionDescriptor = new AsyncResultManager<>(
        "rtp.getLocalSessionDescriptor() invocation");
    rtp.getLocalSessionDescriptor(asyncGetLocalSessionDescriptor
        .getContinuation());
    asyncGetLocalSessionDescriptor.waitForResult();

    AsyncResultManager<String> asyncGetRemoteSessionDescriptor = new AsyncResultManager<>(
        "rtp.getRemoteSessionDescriptor() invocation");

    rtp.getRemoteSessionDescriptor(asyncGetRemoteSessionDescriptor
        .getContinuation());
    asyncGetRemoteSessionDescriptor.waitForResult();
  }
View Full Code Here

TOP

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

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.