curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: using curl for streaming rtsp/rtp over tcp

From: jeremy--- via curl-library <curl-library_at_cool.haxx.se>
Date: Sun, 20 Jun 2021 19:33:15 +0100

On Sun, 20 Jun 2021, at 15:14, Abhijeet Bhagat via curl-library wrote:

> i am using libcurl to send rtsp commands (over tcp) to a server.
I did a very similar exercise quite a few years ago (but am a bit rusty on the subject)

> i was expecting CURLOPT_WRITEFUNCTION to get repeatedly called with the packet but that isn't happening.
After sending the CURL_RTSPREQ_PLAY, try adding something like

curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
curl_easy_setopt(curl, CURLOPT_INTERLEAVEFUNCTION, rtp_write);
curl_easy_setopt(curl, CURLOPT_INTERLEAVEDATA, &rtp_data);
curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_RECEIVE);
curl_easy_perform(curl);

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2021-06-20