Package-level declarations

Types

Link copied to clipboard
class Epoll

This class is currently the only method for using multiple sockets in one thread with having the blocking operation moved to epoll waiting so that it can block on multiple sockets at once. Once it has been called, you must release Srt context with Srt.cleanUp when application leaves.

Link copied to clipboard
class EpollEvent(val socket: SrtSocket, val events: List<EpollOpt>)

This class represents SRT socket and their events.

Link copied to clipboard
data class MsgCtrl(val flags: Int = 0, val ttl: Int = -1, val inOrder: Boolean = false, val boundary: Boundary = io.github.thibaultbee.srtdroid.core.enums.Boundary.SUBSEQUENT, val srcTime: Long = 0, val pktSeq: Int = -1, val no: Int = -1)

This class represents extra parameters for SrtSocket.send and SrtSocket.recv

Link copied to clipboard
object SrtError

This class contains API to manage errors. Once it has been called, you must release Srt context with Srt.cleanUp when application leaves.

Link copied to clipboard

This class represents a SRT socket. To avoid creating an unresponsive UI, don't perform SRT network operations on the main thread. Once it has been called, you must release Srt context with Srt.cleanUp when application leaves.

Link copied to clipboard
class SrtUri

An URI like class with specific SRT parameter for streamId.

Link copied to clipboard
data class SrtUrl(val hostname: String, val port: Int, val connectTimeoutInMs: Int? = null, val flightFlagSize: Int? = 25600, val inputBandwidth: Long? = 0, val iptos: Int? = 184, val ipttl: Int? = 64, val latencyInMs: Int? = null, val listenTimeoutInMs: Int? = null, val maxBandwidth: Long? = 0, val mode: SrtUrl.Mode? = Mode.CALLER, val maxSegmentSize: Int? = 1500, val nakReport: Boolean? = true, val overheadBandwidth: Int? = 25, val passphrase: String? = null, val enforcedEncryption: Boolean? = true, val kmRefreshRate: Int? = null, val kmPreannounce: Int? = null, val senderDropDelayInMs: Int? = null, val payloadSize: Int? = null, val peerLatencyInMs: Int? = null, val pbKeyLength: Int? = 0, val receiverLatencyInMs: Int? = null, val receiveUDPBufferSize: Int? = null, val sendUDPBufferSize: Int? = null, val timeoutInMs: Int? = null, val enableTooLatePacketDrop: Boolean? = null, val sendBufferSize: Int? = null, val recvBufferSize: Int? = null, val lossMaxTTL: Int? = null, val minVersion: Int? = null, val streamId: String? = null, val smoother: Transtype? = null, val enableMessageApi: Boolean? = false, val transtype: Transtype? = null, val lingerInS: Int? = null, val enableTimestampBasedPacketDelivery: Boolean? = null)

SrtUrl is a data class that represents an SRT URL as defined by FFmpeg.

Link copied to clipboard
data class Stats(val msTimeStamp: Long, val pktSentTotal: Long, val pktRecvTotal: Long, val pktSndLossTotal: Int, val pktRcvLossTotal: Int, val pktRetransTotal: Int, val pktSentACKTotal: Int, val pktRecvACKTotal: Int, val pktSentNAKTotal: Int, val pktRecvNAKTotal: Int, val usSndDurationTotal: Long, val pktSndDropTotal: Int, val pktRcvDropTotal: Int, val pktRcvUndecryptTotal: Int, val byteSentTotal: Long, val byteRecvTotal: Long, val byteRcvLossTotal: Long, val byteRetransTotal: Long, val byteSndDropTotal: Long, val byteRcvDropTotal: Long, val byteRcvUndecryptTotal: Long, val pktSent: Long, val pktRecv: Long, val pktSndLoss: Int, val pktRcvLoss: Int, val pktRetrans: Int, val pktRcvRetrans: Int, val pktSentACK: Int, val pktRecvACK: Int, val pktSentNAK: Int, val pktRecvNAK: Int, val mbpsSendRate: Double, val mbpsRecvRate: Double, val usSndDuration: Long, val pktReorderDistance: Int, val pktRcvAvgBelatedTime: Double, val pktRcvBelated: Long, val pktSndDrop: Int, val pktRcvDrop: Int, val pktRcvUndecrypt: Int, val byteSent: Long, val byteRecv: Long, val byteRcvLoss: Long, val byteRetrans: Long, val byteSndDrop: Long, val byteRcvDrop: Long, val byteRcvUndecrypt: Long, val usPktSndPeriod: Double, val pktFlowWindow: Int, val pktCongestionWindow: Int, val pktFlightSize: Int, val msRTT: Double, val mbpsBandwidth: Double, val byteAvailSndBuf: Int, val byteAvailRcvBuf: Int, val mbpsMaxBW: Double, val byteMSS: Int, val pktSndBuf: Int, val byteSndBuf: Int, val msSndBuf: Int, val msSndTsbPdDelay: Int, val pktRcvBuf: Int, val byteRcvBuf: Int, val msRcvBuf: Int, val msRcvTsbPdDelay: Int, val pktSndFilterExtraTotal: Int, val pktRcvFilterExtraTotal: Int, val pktRcvFilterSupplyTotal: Int, val pktRcvFilterLossTotal: Int, val pktSndFilterExtra: Int, val pktRcvFilterExtra: Int, val pktRcvFilterSupply: Int, val pktRcvFilterLoss: Int, val pktReorderTolerance: Int, val pktSentUniqueTotal: Long, val pktRecvUniqueTotal: Long, val byteSentUniqueTotal: Long, val byteRecvUniqueTotal: Long, val pktSentUnique: Long, val pktRecvUnique: Long, val byteSentUnique: Long, val byteRecvUnique: Long)

This class represents SRT statistics

Link copied to clipboard
object Time

This class contains time utils. Once it has been called, you must release Srt context with Srt.cleanUp when application leaves.

Functions

Link copied to clipboard
fun SrtUrl(uri: Uri): SrtUrl

Extracts SrtUrl from a FFmpeg format Uri.

fun SrtUrl(url: String): SrtUrl

Extracts SrtUrl from a FFmpeg format String: srt://hostname:port?options