1CURLOPT_RTSP_TRANSPORT(3) curl_easy_setopt options CURLOPT_RTSP_TRANSPORT(3)
2
3
4
6 CURLOPT_RTSP_TRANSPORT - set RTSP Transport: header
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_TRANSPORT,
12 char *transport);
13
15 Pass a char * to tell libcurl what to pass for the Transport: header
16 for this RTSP session. This is mainly a convenience method to avoid
17 needing to set a custom Transport: header for every SETUP request. The
18 application must set a Transport: header before issuing a SETUP
19 request.
20
21 The application does not have to keep the string around after setting
22 this option.
23
25 NULL
26
28 RTSP
29
31 CURL *curl = curl_easy_init();
32 if(curl) {
33 curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
34 curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP);
35 curl_easy_setopt(curl, CURLOPT_RTSP_TRANSPORT,
36 "RTP/AVP;unicast;client_port=4588-4589");
37 ret = curl_easy_perform(curl);
38 curl_easy_cleanup(curl);
39 }
40
42 Added in 7.20.0
43
45 Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if
46 not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
47
49 CURLOPT_RTSP_REQUEST(3), CURLOPT_RTSP_SESSION_ID(3),
50
51
52
53libcurl 7.64.0 May 31, 2017 CURLOPT_RTSP_TRANSPORT(3)