Class MPEGDashUtils
Object
com.wowza.wms.httpstreamer.mpegdashstreaming.util.MPEGDashUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
audioCodecIdToString
(int codecId, com.wowza.wms.media.model.MediaCodecInfoAudio codecInfoAudio) static String
codecInfoAudioToCodecsStr
(com.wowza.wms.media.model.MediaCodecInfoAudio codecInfoAudio) static String
codecInfoAudioToCodecsStr
(com.wowza.wms.media.model.MediaCodecInfoAudio codecInfoAudio, int codecStrFormatId) static String
codecInfoVideoToCodecsStr
(com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo, int codecStrFormatId) static String
codecInfoVideoToCodecsStr
(com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo, int codecStrFormatId, boolean forceH264BaselineProfile) static String
dimensionsToAspectRatioString
(int width, int height) static void
encryptSubSample
(byte[] buffer, ICencEncryptor encryptor, int offset, PacketFragmentList delimitedNALUnits, int nalUnitLen, int blockSize, int minClear, int nalSize, com.wowza.wms.drm.cenc.CencSampleAuxiliaryData.CencSubSample subSample) static int
filenameToManifestId
(String filename) static int
filenameToProfile
(String filename) static String
fixupAudioCodecString
(String audioCodecStr, int codecId, com.wowza.wms.media.model.MediaCodecInfoAudio codecInfoAudio) static String
fixupVideoCodecString
(String videoCodecStr, int codecId, com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo) static String
frameRateToFrString
(double frameRate) static com.wowza.wms.drm.cenc.CencSampleAuxiliaryData
generateVideoSAD
(ICencEncryptor encryptor, byte[] buffer, int offset, int size, PacketFragmentList delimitedNALUnits, int videoCodec, int nalUnitLen) static CencInfo
getCencInfo
(IApplicationInstance appInstance, String streamName, IHTTPStreamerSession httpStreamerSession, IHTTPStreamerMPEGDashIndex index, long segmentId, CencInfo cencInfo) static CencInfo
getCencInfo
(IApplicationInstance appInstance, String streamName, ILiveStreamPacketizer liveStreamPacketizer, long segmentId, CencInfo cencInfo) static void
getCompatibleBrandsAudio
(List<String> brandsList, boolean isInit, int audioCodec) static void
getCompatibleBrandsVideo
(List<String> brandsList, boolean isInit, int videoCodec) static byte[]
getH264AVCCBytes
(byte[] codecConfig) static byte[]
getH265CodecHVCCBytes
(byte[] codecConfig) static String
static String
static int
getVideoCodecNalType
(int videoCodec, byte[] buffer, int offset, int nalUnitLen) static int
manifestIdStrToId
(String value) static String
millisToDurationStr
(long millis) static long
msecToSec
(long time) static long
msecToTimescaled
(long time, long timescale) static void
parseH264CodecConfig
(byte[] codecConfig, com.wowza.wms.media.mp4.fragment.MP4FragmentWriterMedia videoHolder) static void
parseH265CodecConfig
(byte[] codecConfig, com.wowza.wms.media.mp4.fragment.MP4FragmentWriterMedia videoHolder) static int
parseNalUnitLengthForCodec
(int videoCodec, byte[] codecConfig) static int
profileStrToId
(String value) static double
roughAspectRatioValue
(int width, int height) static String
segmentFormatToFileExt
(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat) static String
segmentTypeIdToStr
(int id) static int
segmentTypeStrToId
(String value) static boolean
shouldEncryptNALUnit
(int codec, int nalUnitType) Returns whether a NAL Unit should be encrypted or not based on Codec and NAL Unit type.static long
timescaledToMsec
(long time, long timescale) static String
videoCodecIdToString
(int codecId, com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo)
-
Constructor Details
-
MPEGDashUtils
public MPEGDashUtils()
-
-
Method Details
-
getCencInfo
public static CencInfo getCencInfo(IApplicationInstance appInstance, String streamName, IHTTPStreamerSession httpStreamerSession, IHTTPStreamerMPEGDashIndex index, long segmentId, CencInfo cencInfo) -
getCencInfo
public static CencInfo getCencInfo(IApplicationInstance appInstance, String streamName, ILiveStreamPacketizer liveStreamPacketizer, long segmentId, CencInfo cencInfo) -
fixupVideoCodecString
-
fixupAudioCodecString
-
videoCodecIdToString
public static String videoCodecIdToString(int codecId, com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo) -
audioCodecIdToString
public static String audioCodecIdToString(int codecId, com.wowza.wms.media.model.MediaCodecInfoAudio codecInfoAudio) -
millisToDurationStr
-
codecInfoAudioToCodecsStr
public static String codecInfoAudioToCodecsStr(com.wowza.wms.media.model.MediaCodecInfoAudio codecInfoAudio) -
codecInfoAudioToCodecsStr
public static String codecInfoAudioToCodecsStr(com.wowza.wms.media.model.MediaCodecInfoAudio codecInfoAudio, int codecStrFormatId) -
codecInfoVideoToCodecsStr
public static String codecInfoVideoToCodecsStr(com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo, int codecStrFormatId) -
codecInfoVideoToCodecsStr
public static String codecInfoVideoToCodecsStr(com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo, int codecStrFormatId, boolean forceH264BaselineProfile) -
filenameToManifestId
-
segmentTypeIdToStr
-
segmentTypeStrToId
-
manifestIdStrToId
-
profileStrToId
-
filenameToProfile
-
roughAspectRatioValue
public static double roughAspectRatioValue(int width, int height) -
dimensionsToAspectRatioString
-
frameRateToFrString
-
timescaledToMsec
public static long timescaledToMsec(long time, long timescale) -
msecToSec
public static long msecToSec(long time) -
msecToTimescaled
public static long msecToTimescaled(long time, long timescale) -
getMajorBrandAudio
-
getMajorBrandVideo
-
getCompatibleBrandsAudio
-
getCompatibleBrandsVideo
-
segmentFormatToFileExt
public static String segmentFormatToFileExt(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat) -
shouldEncryptNALUnit
public static boolean shouldEncryptNALUnit(int codec, int nalUnitType) Returns whether a NAL Unit should be encrypted or not based on Codec and NAL Unit type.- Parameters:
codec
-nalUnitType
-- Returns:
-
generateVideoSAD
public static com.wowza.wms.drm.cenc.CencSampleAuxiliaryData generateVideoSAD(ICencEncryptor encryptor, byte[] buffer, int offset, int size, PacketFragmentList delimitedNALUnits, int videoCodec, int nalUnitLen) -
encryptSubSample
public static void encryptSubSample(byte[] buffer, ICencEncryptor encryptor, int offset, PacketFragmentList delimitedNALUnits, int nalUnitLen, int blockSize, int minClear, int nalSize, com.wowza.wms.drm.cenc.CencSampleAuxiliaryData.CencSubSample subSample) -
getH264AVCCBytes
public static byte[] getH264AVCCBytes(byte[] codecConfig) -
parseH264CodecConfig
public static void parseH264CodecConfig(byte[] codecConfig, com.wowza.wms.media.mp4.fragment.MP4FragmentWriterMedia videoHolder) -
getH265CodecHVCCBytes
public static byte[] getH265CodecHVCCBytes(byte[] codecConfig) -
parseH265CodecConfig
public static void parseH265CodecConfig(byte[] codecConfig, com.wowza.wms.media.mp4.fragment.MP4FragmentWriterMedia videoHolder) -
parseNalUnitLengthForCodec
public static int parseNalUnitLengthForCodec(int videoCodec, byte[] codecConfig) -
getVideoCodecNalType
public static int getVideoCodecNalType(int videoCodec, byte[] buffer, int offset, int nalUnitLen)
-