Package com.wowza.wms.util
Class StreamUtils
Object
com.wowza.wms.util.StreamUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intdirectOutput(byte[] dataBuffer, int[] headerValues, boolean isAbsTimecode, int src, OutputStream out, AMFObj wmsObj, byte[] workBuffer, int chunkSize) Direct output, Internal use.static doublegetStreamBitrate(IApplicationInstance appInstance, String streamName) static doublegetStreamBitrate(IMediaStream stream) Get the approximate bitrate of a media file in bits/per-second.static doublegetStreamLength(IApplicationInstance appInstance, String streamName) Get the duration of a media file in seconds.static doublegetStreamLength(IMediaStream stream) Get the duration of a media file in seconds.static booleanloadConfigFile(StreamList streamDefs, String fileURL) Load Strreams.xml, Internal use.static intpacketOutput(OutputStream out, IMediaStream stream, AMFPacket packet, long timecode, AMFObj wmsObj, byte[] workBuffer, int chunkSize) Packet output.static intpacketOutput(OutputStream out, IMediaStream stream, AMFPacket packet, long timecode, AMFObj wmsObj, byte[] workBuffer, int chunkSize, boolean referenceWrite) Packet output.
-
Constructor Details
-
StreamUtils
public StreamUtils()
-
-
Method Details
-
getStreamLength
Get the duration of a media file in seconds. This will work correctly with all RandomAccessReaders and caching technology- Parameters:
stream- stream- Returns:
- duration in seconds
-
getStreamBitrate
Get the approximate bitrate of a media file in bits/per-second. This will work correctly with all RandomAccessReaders and caching technology.- Parameters:
stream- stream- Returns:
- bitrate in bits/per-second
-
getStreamLength
Get the duration of a media file in seconds. This will work correctly with all RandomAccessReaders and caching technology- Parameters:
appInstance- application instancestreamName- stream name- Returns:
- duration in seconds
-
getStreamBitrate
-
directOutput
public static int directOutput(byte[] dataBuffer, int[] headerValues, boolean isAbsTimecode, int src, OutputStream out, AMFObj wmsObj, byte[] workBuffer, int chunkSize) Direct output, Internal use.- Parameters:
dataBuffer-headerValues-isAbsTimecode-src-out-wmsObj-workBuffer-chunkSize-- Returns:
- c
-
packetOutput
public static int packetOutput(OutputStream out, IMediaStream stream, AMFPacket packet, long timecode, AMFObj wmsObj, byte[] workBuffer, int chunkSize) Packet output. Internal use.- Parameters:
out-stream-packet-timecode-wmsObj-workBuffer-chunkSize-- Returns:
- bytes
-
packetOutput
public static int packetOutput(OutputStream out, IMediaStream stream, AMFPacket packet, long timecode, AMFObj wmsObj, byte[] workBuffer, int chunkSize, boolean referenceWrite) Packet output. Internal use.- Parameters:
out-stream-packet-timecode-wmsObj-workBuffer-chunkSize-referenceWrite-- Returns:
- bytes
-
loadConfigFile
Load Strreams.xml, Internal use.- Parameters:
streamDefs-fileURL-
-