1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_RTSP_TRANSPORT 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_RTSP_REQUEST (3) 9 - CURLOPT_RTSP_SESSION_ID (3) 10Protocol: 11 - RTSP 12Added-in: 7.20.0 13--- 14 15# NAME 16 17CURLOPT_RTSP_TRANSPORT - RTSP Transport: header 18 19# SYNOPSIS 20 21~~~c 22#include <curl/curl.h> 23 24CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_TRANSPORT, 25 char *transport); 26~~~ 27 28# DESCRIPTION 29 30Pass a char pointer to tell libcurl what to pass for the Transport: header for 31this RTSP session. This is mainly a convenience method to avoid needing to set 32a custom Transport: header for every SETUP request. The application must set a 33Transport: header before issuing a SETUP request. 34 35The application does not have to keep the string around after setting this 36option. 37 38# DEFAULT 39 40NULL 41 42# %PROTOCOLS% 43 44# EXAMPLE 45 46~~~c 47int main(void) 48{ 49 CURL *curl = curl_easy_init(); 50 if(curl) { 51 CURLcode res; 52 curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/"); 53 curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP); 54 curl_easy_setopt(curl, CURLOPT_RTSP_TRANSPORT, 55 "RTP/AVP;unicast;client_port=4588-4589"); 56 res = curl_easy_perform(curl); 57 curl_easy_cleanup(curl); 58 } 59} 60~~~ 61 62# %AVAILABILITY% 63 64# RETURN VALUE 65 66Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or 67CURLE_OUT_OF_MEMORY if there was insufficient heap space. 68