com.wowza.wms.util
Class RTPUtils

Object
  extended by com.wowza.wms.util.RTPUtils

public class RTPUtils
extends Object


Constructor Summary
RTPUtils()
           
 
Method Summary
static double[] decodeRangeHeader(String rangeStr)
          Decode RTP range header, Internal use.
static RTPStream decodeStreamInfo(RTPContext context, String streamId, String streamInfo)
          Decode SDP info and create RTP stream
static byte[] formatH264CodecConfig(byte[] sps, java.util.List<byte[]> ppss, byte[] profileLevel)
          Format codec config info, Internal use.
static byte[] formatH264CodecConfigPacket(byte[] sps, java.util.List<byte[]> ppss, byte[] profileLevel)
          Format codec config info, Internal use.
static void loadConfigFile(RTPContext rtpContext, String fileURL)
          Load config file, Internal use.
static RTPPushPublishSession startRTPPull(IApplicationInstance appInstance, String streamName, boolean streamPacketizer, String ipAddress, int streamPort)
          Start pushing an RTP stream
static RTPPushPublishSession startRTPPull(IApplicationInstance appInstance, String streamName, boolean streamPacketizer, String ipAddress, int streamPort, boolean isRTPWrapped)
          Start pushing an RTP stream
static RTPPushPublishSession startRTPPull(IApplicationInstance appInstance, String streamName, boolean streamPacketizer, String ipAddress, int audioPort, int videoPort)
          Start pushing an RTP stream
static RTPPushPublishSession startRTPPull(IApplicationInstance appInstance, String streamName, boolean streamPacketizer, String ipAddress, int audioPort, int videoPort, boolean isRTPWrapped)
          Start pushing an RTP stream
static RTPPushPublishSession startRTPPull(IApplicationInstance appInstance, String streamName, RTPDestination rtpDestination)
          Start pushing an RTP stream
static void stopRTPPull(RTPPushPublishSession rtpPushPublishSession)
          Stop pushing an RTP stream
static String updateSDPDestination(RTPDestination rtpDestination, String sdpData)
          Update SDP data information with RTP destination information
static void writeCodecConfig(com.wowza.wms.rtp.model.RTPTrack rtpTrack, long adjTimecode, byte[] codecConfig)
          Write codec config information, Internal use.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RTPUtils

public RTPUtils()
Method Detail

decodeRangeHeader

public static double[] decodeRangeHeader(String rangeStr)
Decode RTP range header, Internal use.

Parameters:
rangeStr -
Returns:
range values

decodeStreamInfo

public static RTPStream decodeStreamInfo(RTPContext context,
                                         String streamId,
                                         String streamInfo)
Decode SDP info and create RTP stream

Parameters:
context - RTP context
streamId - stream id
streamInfo - SDP data
Returns:
RTP stream

formatH264CodecConfig

public static byte[] formatH264CodecConfig(byte[] sps,
                                           java.util.List<byte[]> ppss,
                                           byte[] profileLevel)
Format codec config info, Internal use.

Parameters:
sps -
ppss -
profileLevel -
Returns:
bytes

formatH264CodecConfigPacket

public static byte[] formatH264CodecConfigPacket(byte[] sps,
                                                 java.util.List<byte[]> ppss,
                                                 byte[] profileLevel)
Format codec config info, Internal use.

Parameters:
sps -
ppss -
profileLevel -
Returns:
bytes

loadConfigFile

public static void loadConfigFile(RTPContext rtpContext,
                                  String fileURL)
Load config file, Internal use.

Parameters:
rtpContext -
fileURL -

startRTPPull

public static RTPPushPublishSession startRTPPull(IApplicationInstance appInstance,
                                                 String streamName,
                                                 boolean streamPacketizer,
                                                 String ipAddress,
                                                 int streamPort)
Start pushing an RTP stream

Parameters:
appInstance - application instance
streamName - stream name
streamPacketizer - stream packetizer
ipAddress - IP address
streamPort - stream port
Returns:
RTP push session

startRTPPull

public static RTPPushPublishSession startRTPPull(IApplicationInstance appInstance,
                                                 String streamName,
                                                 boolean streamPacketizer,
                                                 String ipAddress,
                                                 int streamPort,
                                                 boolean isRTPWrapped)
Start pushing an RTP stream

Parameters:
appInstance - application instance
streamName - stream name
streamPacketizer - stream packetizer
ipAddress - IP address
streamPort - stream port
isRTPWrapped - is RTP wrapped
Returns:
RTP push session

startRTPPull

public static RTPPushPublishSession startRTPPull(IApplicationInstance appInstance,
                                                 String streamName,
                                                 boolean streamPacketizer,
                                                 String ipAddress,
                                                 int audioPort,
                                                 int videoPort)
Start pushing an RTP stream

Parameters:
appInstance - application instance
streamName - stream name
streamPacketizer - stream packetizer
ipAddress - IP address
audioPort - audio port
videoPort - video port
Returns:
RTP push session

startRTPPull

public static RTPPushPublishSession startRTPPull(IApplicationInstance appInstance,
                                                 String streamName,
                                                 boolean streamPacketizer,
                                                 String ipAddress,
                                                 int audioPort,
                                                 int videoPort,
                                                 boolean isRTPWrapped)
Start pushing an RTP stream

Parameters:
appInstance - application instance
streamName - stream name
streamPacketizer - stream packetizer
ipAddress - IP address
audioPort - audio port
videoPort - video port
isRTPWrapped - is RTP wrapped
Returns:
RTP push session

startRTPPull

public static RTPPushPublishSession startRTPPull(IApplicationInstance appInstance,
                                                 String streamName,
                                                 RTPDestination rtpDestination)
Start pushing an RTP stream

Parameters:
appInstance - application instance
streamName - stream name
rtpDestination - RTP destination
Returns:
RTP push session

stopRTPPull

public static void stopRTPPull(RTPPushPublishSession rtpPushPublishSession)
Stop pushing an RTP stream

Parameters:
rtpPushPublishSession - RTP push session

updateSDPDestination

public static String updateSDPDestination(RTPDestination rtpDestination,
                                          String sdpData)
Update SDP data information with RTP destination information

Parameters:
rtpDestination - RTP destination
sdpData - SDP data
Returns:
modified SDP data

writeCodecConfig

public static void writeCodecConfig(com.wowza.wms.rtp.model.RTPTrack rtpTrack,
                                    long adjTimecode,
                                    byte[] codecConfig)
Write codec config information, Internal use.

Parameters:
rtpTrack - RTP track
adjTimecode - timecode (milliseconds)
codecConfig - codec config