CURLOPT_RTSP_STREAM_URI.3 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. .\" generated by cd2nroff 0.1 from CURLOPT_RTSP_STREAM_URI.md
  2. .TH CURLOPT_RTSP_STREAM_URI 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_RTSP_STREAM_URI \- RTSP stream URI
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_STREAM_URI, char *URI);
  9. .fi
  10. .SH DESCRIPTION
  11. Set the stream \fIURI\fP to operate on by passing a char * . For example, a single
  12. session may be controlling \fIrtsp://foo/twister/audio\fP and
  13. \fIrtsp://foo/twister/video\fP and the application can switch to the appropriate
  14. stream using this option. If unset, libcurl defaults to operating on generic
  15. server options by passing \(aq*\(aq in the place of the RTSP Stream URI. This option
  16. is distinct from \fICURLOPT_URL(3)\fP. When working with RTSP, the
  17. \fICURLOPT_RTSP_STREAM_URI(3)\fP indicates what URL to send to the server in the
  18. request header while the \fICURLOPT_URL(3)\fP indicates where to make the connection
  19. to. (e.g. the \fICURLOPT_URL(3)\fP for the above examples might be set to
  20. \fIrtsp://foo/twister\fP
  21. The application does not have to keep the string around after setting this
  22. option.
  23. .SH DEFAULT
  24. \&"*"
  25. .SH PROTOCOLS
  26. This functionality affects rtsp only
  27. .SH EXAMPLE
  28. .nf
  29. int main(void)
  30. {
  31. CURL *curl = curl_easy_init();
  32. if(curl) {
  33. CURLcode res;
  34. curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
  35. curl_easy_setopt(curl, CURLOPT_RTSP_STREAM_URI,
  36. "rtsp://foo.example.com/twister/video");
  37. res = curl_easy_perform(curl);
  38. curl_easy_cleanup(curl);
  39. }
  40. }
  41. .fi
  42. .SH AVAILABILITY
  43. Added in curl 7.20.0
  44. .SH RETURN VALUE
  45. Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
  46. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
  47. .SH SEE ALSO
  48. .BR CURLOPT_RTSP_REQUEST (3),
  49. .BR CURLOPT_RTSP_TRANSPORT (3)