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