getStreamUri2 method
This operation requests a Uri that can be used to initiate a live media1
stream using RTSP as the control protocol. The returned URI shall remain
valid indefinitely even if the profile is changed. The
validUntilConnect
, validUntilReboot
and timeout
Parameter shall be set
accordingly (validUntilConnect=false, validUntilReboot=false,
timeout=PT0S).
The correct syntax for the StreamSetup element for these media1 stream setups defined in 5.1.1 of the streaming specification are as follows:
- RTP unicast over UDP: StreamType = "RTP-Unicast", TransportProtocol = "UDP"
- RTP over RTSP over HTTP over TCP: StreamType = "RTP-Unicast", TransportProtocol = "HTTP"
- RTP over RTSP over TCP: StreamType = "RTP-Unicast", TransportProtocol = "RTSP"
If a multicast stream is requested at least one of videoEncoderConfiguration, audioEncoderConfiguration and metadataConfiguration shall have a valid multicast setting.
For full compatibility with other ONVIF services a device should not generate Uris longer than 128 octets.
Implementation
Future<String> getStreamUri2(
String profileToken, {
String protocol = 'RTSP',
}) async =>
_mediaSupportLevel == MediaSupportLevel.one
? throw NotSupportedException()
: media2.getStreamUri(profileToken);