SrtMediaDescriptor

Creates a SRT connection descriptor from an descriptor.

If the descriptor is already a SrtMediaDescriptor, it will be returned as is. If the descriptor is an UriMediaDescriptor, it will be converted to a SrtMediaDescriptor with default TSServiceInfo. Otherwise, an InvalidParameterException will be thrown.


fun SrtMediaDescriptor(uriString: String, serviceInfo: TSServiceInfo = createDefaultTsServiceInfo()): SrtMediaDescriptor

Creates a SRT connection descriptor from an String

Parameters

uriString

the srt server uri

serviceInfo

the TS service information


fun SrtMediaDescriptor(uri: Uri, serviceInfo: TSServiceInfo = createDefaultTsServiceInfo()): SrtMediaDescriptor

Creates a SRT connection descriptor from an Uri

Parameters

uri

the srt server uri

serviceInfo

the TS service information


fun SrtMediaDescriptor(host: String, port: Int, streamId: String? = null, passPhrase: String? = null, latency: Int? = null, connectionTimeout: Int? = null, serviceInfo: TSServiceInfo = createDefaultTsServiceInfo()): SrtMediaDescriptor

Creates a SRT connection descriptor from parameters

Parameters

host

the server ip or hostname

port

the server port

streamId

the SRT stream ID

passPhrase

the SRT passphrase

latency

the SRT latency in ms

connectionTimeout

the SRT connection timeout in ms

serviceInfo

the TS service information