mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Reworked the RTSP debug callback to adapt dynamically any logging mode changes during SETUP.
This commit is contained in:
parent
dd320af7f2
commit
46db1dea11
12
rtsp.c
12
rtsp.c
@ -167,6 +167,18 @@ bool cSatipRtsp::Setup(const char *uriP, int rtpPortP, int rtcpPortP)
|
||||
CURLcode res = CURLE_OK;
|
||||
cString transport = cString::sprintf("RTP/AVP;unicast;client_port=%d-%d", rtpPortP, rtcpPortP);
|
||||
|
||||
// Verbose output
|
||||
if (SatipConfig.IsLoggingMode(cSatipConfig::eLoggingModeDebug2)) {
|
||||
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_VERBOSE, 1L);
|
||||
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGFUNCTION, cSatipRtsp::DebugCallback);
|
||||
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGDATA, this);
|
||||
}
|
||||
else {
|
||||
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_VERBOSE, 0L);
|
||||
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGFUNCTION, NULL);
|
||||
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGDATA, NULL);
|
||||
}
|
||||
|
||||
// Setup media stream
|
||||
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_RTSP_STREAM_URI, uriP);
|
||||
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_RTSP_TRANSPORT, *transport);
|
||||
|
Loading…
Reference in New Issue
Block a user