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

NAME

6       CURLOPT_RTSP_STREAM_URI - set RTSP stream URI
7

SYNOPSIS

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

DESCRIPTION

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

DEFAULT

PROTOCOLS

31       RTSP
32

EXAMPLE

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

AVAILABILITY

45       Added in 7.20.0
46

RETURN VALUE

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

SEE ALSO

52       CURLOPT_RTSP_REQUEST(3), CURLOPT_RTSP_TRANSPORT(3),
53
54
55
56libcurl 7.61.1                   May 31, 2017       CURLOPT_RTSP_STREAM_URI(3)
Impressum