Package com.wowza.wms.util
Class StreamUtils
- Object
-
- com.wowza.wms.util.StreamUtils
-
public class StreamUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description StreamUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
directOutput(byte[] dataBuffer, int[] headerValues, boolean isAbsTimecode, int src, java.io.OutputStream out, AMFObj wmsObj, byte[] workBuffer, int chunkSize)
Direct output, Internal use.static double
getStreamBitrate(IApplicationInstance appInstance, String streamName)
static double
getStreamBitrate(IMediaStream stream)
Get the approximate bitrate of a media file in bits/per-second.static double
getStreamLength(IApplicationInstance appInstance, String streamName)
Get the duration of a media file in seconds.static double
getStreamLength(IMediaStream stream)
Get the duration of a media file in seconds.static boolean
loadConfigFile(StreamList streamDefs, String fileURL)
Load Strreams.xml, Internal use.static int
packetOutput(java.io.OutputStream out, IMediaStream stream, AMFPacket packet, long timecode, AMFObj wmsObj, byte[] workBuffer, int chunkSize)
Packet output.static int
packetOutput(java.io.OutputStream out, IMediaStream stream, AMFPacket packet, long timecode, AMFObj wmsObj, byte[] workBuffer, int chunkSize, boolean referenceWrite)
Packet output.
-
-
-
Method Detail
-
getStreamLength
public static double getStreamLength(IMediaStream stream)
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
public static double getStreamBitrate(IMediaStream stream)
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
public static double getStreamLength(IApplicationInstance appInstance, String streamName)
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
public static double getStreamBitrate(IApplicationInstance appInstance, String streamName)
-
directOutput
public static int directOutput(byte[] dataBuffer, int[] headerValues, boolean isAbsTimecode, int src, java.io.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(java.io.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(java.io.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
public static boolean loadConfigFile(StreamList streamDefs, String fileURL)
Load Strreams.xml, Internal use.- Parameters:
streamDefs
-fileURL
-
-
-