Package com.wowza.wms.util
Class RTPUtils
- Object
-
- com.wowza.wms.util.RTPUtils
-
public class RTPUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description RTPUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double[]
decodeRangeHeader(String rangeStr)
Decode RTP range header, Internal use.static RTPStream
decodeStreamInfo(IApplicationInstance appInstance, RTPContext context, String streamId, String streamInfo)
Decode SDP info and create RTP streamstatic RTPStream
decodeStreamInfo(IApplicationInstance appInstance, com.wowza.wms.rtp.model.RTPStreamContext rtpStreamContext, RTPContext context, String streamId, String streamInfo)
Decode SDP info and create RTP streamstatic RTPStream
decodeStreamInfo(RTPContext context, String streamId, String streamInfo)
Decode SDP info and create RTP streamstatic 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 boolean
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 streamstatic RTPPushPublishSession
startRTPPull(IApplicationInstance appInstance, String streamName, boolean streamPacketizer, String ipAddress, int streamPort, boolean isRTPWrapped)
Start pushing an RTP streamstatic RTPPushPublishSession
startRTPPull(IApplicationInstance appInstance, String streamName, boolean streamPacketizer, String ipAddress, int audioPort, int videoPort)
Start pushing an RTP streamstatic RTPPushPublishSession
startRTPPull(IApplicationInstance appInstance, String streamName, boolean streamPacketizer, String ipAddress, int audioPort, int videoPort, boolean isRTPWrapped)
Start pushing an RTP streamstatic RTPPushPublishSession
startRTPPull(IApplicationInstance appInstance, String streamName, RTPDestination rtpDestination)
Start pushing an RTP streamstatic void
stopRTPPull(RTPPushPublishSession rtpPushPublishSession)
Stop pushing an RTP streamstatic String
updateSDPDestination(RTPDestination rtpDestination, String sdpData)
Update SDP data information with RTP destination informationstatic void
writeCodecConfig(com.wowza.wms.rtp.model.RTPTrack rtpTrack, int codecId, long adjTimecode, byte[] codecConfig)
static void
writeCodecConfig(com.wowza.wms.rtp.model.RTPTrack rtpTrack, long adjTimecode, byte[] codecConfig)
Write codec config information, Internal use.static void
writeCodecConfig(com.wowza.wms.rtp.model.RTPTrack rtpTrack, long adjTimecode, byte[] codecConfig, int codec)
-
-
-
Method Detail
-
updateSDPDestination
public static String updateSDPDestination(RTPDestination rtpDestination, String sdpData)
Update SDP data information with RTP destination information- Parameters:
rtpDestination
- RTP destinationsdpData
- SDP data- Returns:
- modified SDP data
-
decodeRangeHeader
public static double[] decodeRangeHeader(String rangeStr)
Decode RTP range header, Internal use.- Parameters:
rangeStr
-- Returns:
- range values
-
stopRTPPull
public static void stopRTPPull(RTPPushPublishSession rtpPushPublishSession)
Stop pushing an RTP stream- Parameters:
rtpPushPublishSession
- 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 instancestreamName
- stream namestreamPacketizer
- stream packetizeripAddress
- IP addressstreamPort
- stream portisRTPWrapped
- is RTP wrapped- Returns:
- RTP push session
-
startRTPPull
public static RTPPushPublishSession startRTPPull(IApplicationInstance appInstance, String streamName, boolean streamPacketizer, String ipAddress, int streamPort)
Start pushing an RTP stream- Parameters:
appInstance
- application instancestreamName
- stream namestreamPacketizer
- stream packetizeripAddress
- IP addressstreamPort
- stream port- 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 instancestreamName
- stream namestreamPacketizer
- stream packetizeripAddress
- IP addressaudioPort
- audio portvideoPort
- 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 instancestreamName
- stream namestreamPacketizer
- stream packetizeripAddress
- IP addressaudioPort
- audio portvideoPort
- video portisRTPWrapped
- 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 instancestreamName
- stream namertpDestination
- RTP destination- Returns:
- RTP push session
-
writeCodecConfig
public static void writeCodecConfig(com.wowza.wms.rtp.model.RTPTrack rtpTrack, int codecId, long adjTimecode, byte[] codecConfig)
-
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 trackadjTimecode
- timecode (milliseconds)codecConfig
- codec config
-
writeCodecConfig
public static void writeCodecConfig(com.wowza.wms.rtp.model.RTPTrack rtpTrack, long adjTimecode, byte[] codecConfig, int codec)
-
loadConfigFile
public static boolean loadConfigFile(RTPContext rtpContext, String fileURL)
Load config file, Internal use.- Parameters:
rtpContext
-fileURL
-
-
decodeStreamInfo
public static RTPStream decodeStreamInfo(RTPContext context, String streamId, String streamInfo)
Decode SDP info and create RTP stream- Parameters:
context
- RTP contextstreamId
- stream idstreamInfo
- SDP data- Returns:
- RTP stream
-
decodeStreamInfo
public static RTPStream decodeStreamInfo(IApplicationInstance appInstance, RTPContext context, String streamId, String streamInfo)
Decode SDP info and create RTP stream- Parameters:
appInstance
- app instancecontext
- rtp contextstreamId
- stream idstreamInfo
- stream info (SDP data)- Returns:
- rtp stream
-
decodeStreamInfo
public static RTPStream decodeStreamInfo(IApplicationInstance appInstance, com.wowza.wms.rtp.model.RTPStreamContext rtpStreamContext, RTPContext context, String streamId, String streamInfo)
Decode SDP info and create RTP stream- Parameters:
appInstance
- app instancertpStreamContext
- rtp stream contextcontext
- rtp contextstreamId
- stream idstreamInfo
- stream info (SDP data)- Returns:
- rtp stream
-
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
-
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
-
-