Examples of RtpDescriptionPacketExtension


Examples of net.java.sip.communicator.impl.protocol.jabber.extensions.jingle.RtpDescriptionPacketExtension

  }

  private ContentPacketExtension createContentPacketExtention(SendersEnum senders, String name, MediaDevice dev, MediaFormat fmt, int payloadId ) {
    this.senders = senders;
    ContentPacketExtension content = new ContentPacketExtension();
    RtpDescriptionPacketExtension description = new RtpDescriptionPacketExtension();

    // fill in the basic content:
    content.setCreator(creator);
    content.setName(name);
    if (senders != null && senders != SendersEnum.both)
      content.setSenders(senders);

    // RTP description
    content.addChildExtension(description);

    // now fill in the RTP description
    if (fmt == null) {
      List<MediaFormat> formats = dev.getSupportedFormats();
      description.setMedia(formats.get(0).getMediaType().toString());
      for (MediaFormat mf : formats)
        description.addPayloadType(formatToPayloadType(mf, dynamicPayloadTypes, payloadId));
    } else {
      description.setMedia(fmt.getMediaType().toString());
      description.addPayloadType(formatToPayloadType(fmt, dynamicPayloadTypes, payloadId));
    }

    return content;
  }
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.