1CURLOPT_RTSP_STREAM_URI(3) curl_easy_setopt options CURLOPT_RTSP_STREAM_URI(3)
2
3
4

NAME

6       CURLOPT_RTSP_STREAM_URI - RTSP stream URI
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_STREAM_URI, char *URI);
12

DESCRIPTION

14       Set  the  stream URI to operate on by passing a char * . For example, a
15       single  session  may  be   controlling   rtsp://foo/twister/audio   and
16       rtsp://foo/twister/video  and  the application can switch to the appro‐
17       priate stream using this option. If unset, libcurl will default to  op‐
18       erating  on  generic  server options by passing '*' in the place of the
19       RTSP Stream URI. This option  is  distinct  from  CURLOPT_URL(3).  When
20       working with RTSP, the CURLOPT_RTSP_STREAM_URI(3) indicates what URL to
21       send to the server in the request header while the CURLOPT_URL(3) indi‐
22       cates  where  to  make the connection to.  (e.g. the CURLOPT_URL(3) for
23       the above examples might be set to rtsp://foo/twister
24
25       The application does not have to keep the string around  after  setting
26       this option.
27

DEFAULT

29       '*'
30

PROTOCOLS

32       RTSP
33

EXAMPLE

35       CURL *curl = curl_easy_init();
36       if(curl) {
37         char *prev_id; /* saved from before somehow */
38         curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
39         curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI,
40                          "rtsp://foo.example.com/twister/video");
41         ret = curl_easy_perform(curl);
42         curl_easy_cleanup(curl);
43       }
44

AVAILABILITY

46       Added in 7.20.0
47

RETURN VALUE

49       Returns  CURLE_OK  if  the option is supported, CURLE_UNKNOWN_OPTION if
50       not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
51

SEE ALSO

53       CURLOPT_RTSP_REQUEST(3), CURLOPT_RTSP_TRANSPORT(3),
54
55
56
57libcurl 8.0.1                  January 02, 2023     CURLOPT_RTSP_STREAM_URI(3)
Impressum