mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Added a multicast mode for the RTSP setup.
This commit is contained in:
parent
f884b23f7c
commit
29eaf994f8
15
rtsp.c
15
rtsp.c
@ -15,6 +15,7 @@
|
||||
|
||||
cSatipRtsp::cSatipRtsp(cSatipTunerIf &tunerP)
|
||||
: tunerM(tunerP),
|
||||
modeM(cmUnicast),
|
||||
handleM(NULL),
|
||||
headerListM(NULL)
|
||||
{
|
||||
@ -191,10 +192,22 @@ bool cSatipRtsp::Setup(const char *uriP, int rtpPortP, int rtcpPortP)
|
||||
bool result = false;
|
||||
|
||||
if (handleM && !isempty(uriP)) {
|
||||
cString transport;
|
||||
long rc = 0;
|
||||
cTimeMs processing(0);
|
||||
CURLcode res = CURLE_OK;
|
||||
cString transport = cString::sprintf("RTP/AVP;unicast;client_port=%d-%d", rtpPortP, rtcpPortP);
|
||||
|
||||
switch (modeM) {
|
||||
case cmMulticast:
|
||||
// RTP/AVP;multicast;destination=<IP multicast address>;port=<RTP port>-<RTCP port>;ttl=<ttl>
|
||||
transport = cString::sprintf("RTP/AVP;multicast;port=%d-%d", rtpPortP, rtcpPortP);
|
||||
break;
|
||||
default:
|
||||
case cmUnicast:
|
||||
// RTP/AVP;unicast;client_port=<client RTP port>-<client RTCP port>
|
||||
transport = cString::sprintf("RTP/AVP;unicast;client_port=%d-%d", rtpPortP, rtcpPortP);
|
||||
break;
|
||||
}
|
||||
|
||||
// Setup media stream
|
||||
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_RTSP_STREAM_URI, uriP);
|
||||
|
Loading…
Reference in New Issue
Block a user