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

30       '*'
31

PROTOCOLS

33       RTSP
34

EXAMPLE

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

AVAILABILITY

47       Added in 7.20.0
48

RETURN VALUE

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

SEE ALSO

54       CURLOPT_RTSP_REQUEST(3), CURLOPT_RTSP_TRANSPORT(3),
55
56
57
58libcurl 7.71.1                   July 16, 2019      CURLOPT_RTSP_STREAM_URI(3)
Impressum