I'm trying to make a rtsp client using curl and in ANNOUNCE response I'm not able to get body with the SPD.
I'm doing this setup.
curl_easy_setopt(ch, CURLOPT_URL, fullURL);
curl_easy_setopt(ch, CURLOPT_RTSP_STREAM_URI, fullURL);
curl_easy_setopt(ch, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_ANNOUNCE);
curl_easy_setopt(ch,CURLOPT_POSTFIELDS,sdp);
curl_easy_setopt(ch, CURLOPT_WRITEDATA, &body);
curl_easy_setopt(ch, CURLOPT_WRITEFUNCTION, write_cb);
I have a breakpoint in the write_cb function and it does not stop. If I add this option: curl_easy_setopt(ch, CURLOPT_HEADER, 1L); the function stops, but only get the header information.
Thanks in advance.
Ok, that is the answer.
RTSP has no body in the answer of ANNOUNCE, but in my case with EUROCAE, have body in ANNOUNCE answer.
For manage this situation I have modified curl library, in lib/rtsp.c and define ANNOUNCE as message with body. After that my problem was solved.
Thanks.