blob: ee7f052af30de407609b50a1d227e85b384f2ba8 [file] [log] [blame]
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -07001.\" **************************************************************************
2.\" * _ _ ____ _
3.\" * Project ___| | | | _ \| |
4.\" * / __| | | | |_) | |
5.\" * | (__| |_| | _ <| |___
6.\" * \___|\___/|_| \_\_____|
7.\" *
Elliott Hughes82be86d2017-09-20 17:00:17 -07008.\" * Copyright (C) 1998 - 2014, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -07009.\" *
10.\" * This software is licensed as described in the file COPYING, which
11.\" * you should have received as part of this distribution. The terms
Alex Deymo8f1a2142016-06-28 14:49:26 -070012.\" * are also available at https://curl.haxx.se/docs/copyright.html.
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070013.\" *
14.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15.\" * copies of the Software, and permit persons to whom the Software is
16.\" * furnished to do so, under the terms of the COPYING file.
17.\" *
18.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19.\" * KIND, either express or implied.
20.\" *
21.\" **************************************************************************
22.\"
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070023.TH CURLOPT_RTSP_REQUEST 3 "April 17, 2018" "libcurl 7.60.0" "curl_easy_setopt options"
Elliott Hughes82be86d2017-09-20 17:00:17 -070024
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070025.SH NAME
26CURLOPT_RTSP_REQUEST \- specify RTSP request
27.SH SYNOPSIS
28#include <curl/curl.h>
29
30CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_REQUEST, long request);
31.SH DESCRIPTION
32Tell libcurl what kind of RTSP request to make. Pass one of the following RTSP
33enum values as a long in the \fIrequest\fP argument. Unless noted otherwise,
34commands require the Session ID to be initialized.
35.IP CURL_RTSPREQ_OPTIONS
36Used to retrieve the available methods of the server. The application is
37responsible for parsing and obeying the response. \fB(The session ID is not
38needed for this method.)\fP
39.IP CURL_RTSPREQ_DESCRIBE
40Used to get the low level description of a stream. The application should note
41what formats it understands in the \fI'Accept:'\fP header. Unless set
42manually, libcurl will automatically fill in \fI'Accept:
43application/sdp'\fP. Time-condition headers will be added to Describe requests
44if the \fICURLOPT_TIMECONDITION(3)\fP option is active. \fB(The session ID is
45not needed for this method)\fP
46.IP CURL_RTSPREQ_ANNOUNCE
47When sent by a client, this method changes the description of the session. For
48example, if a client is using the server to record a meeting, the client can
49use Announce to inform the server of all the meta-information about the
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070050session. ANNOUNCE acts like an HTTP PUT or POST just like
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070051\fICURL_RTSPREQ_SET_PARAMETER\fP
52.IP CURL_RTSPREQ_SETUP
53Setup is used to initialize the transport layer for the session. The
54application must set the desired Transport options for a session by using the
55\fICURLOPT_RTSP_TRANSPORT(3)\fP option prior to calling setup. If no session
56ID is currently set with \fICURLOPT_RTSP_SESSION_ID(3)\fP, libcurl will
57extract and use the session ID in the response to this request. \fB(The
58session ID is not needed for this method).\fP
59.IP CURL_RTSPREQ_PLAY
60Send a Play command to the server. Use the \fICURLOPT_RANGE(3)\fP option to
61modify the playback time (e.g. 'npt=10-15').
62.IP CURL_RTSPREQ_PAUSE
63Send a Pause command to the server. Use the \fICURLOPT_RANGE(3)\fP option with
64a single value to indicate when the stream should be halted. (e.g. npt='25')
65.IP CURL_RTSPREQ_TEARDOWN
66This command terminates an RTSP session. Simply closing a connection does not
67terminate the RTSP session since it is valid to control an RTSP session over
68different connections.
69.IP CURL_RTSPREQ_GET_PARAMETER
70Retrieve a parameter from the server. By default, libcurl will automatically
71include a \fIContent-Type: text/parameters\fP header on all non-empty requests
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070072unless a custom one is set. GET_PARAMETER acts just like an HTTP PUT or POST
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070073(see \fICURL_RTSPREQ_SET_PARAMETER\fP).
74Applications wishing to send a heartbeat message (e.g. in the presence of a
75server-specified timeout) should send use an empty GET_PARAMETER request.
76.IP CURL_RTSPREQ_SET_PARAMETER
77Set a parameter on the server. By default, libcurl will automatically include
78a \fIContent-Type: text/parameters\fP header unless a custom one is set. The
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070079interaction with SET_PARAMETER is much like an HTTP PUT or POST. An application
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070080may either use \fICURLOPT_UPLOAD(3)\fP with \fICURLOPT_READDATA(3)\fP like a
Elliott Hughes1ef06ba2018-05-30 15:43:58 -070081HTTP PUT, or it may use \fICURLOPT_POSTFIELDS(3)\fP like an HTTP POST. No
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070082chunked transfers are allowed, so the application must set the
83\fICURLOPT_INFILESIZE(3)\fP in the former and \fICURLOPT_POSTFIELDSIZE(3)\fP
84in the latter. Also, there is no use of multi-part POSTs within RTSP.
85.IP CURL_RTSPREQ_RECORD
86Used to tell the server to record a session. Use the \fICURLOPT_RANGE(3)\fP
87option to modify the record time.
88.IP CURL_RTSPREQ_RECEIVE
89This is a special request because it does not send any data to the server. The
90application may call this function in order to receive interleaved RTP
91data. It will return after processing one read buffer of data in order to give
92the application a chance to run.
93.SH DEFAULT
94.SH PROTOCOLS
Elliott Hughes82be86d2017-09-20 17:00:17 -070095RTSP
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -070096.SH EXAMPLE
Elliott Hughes82be86d2017-09-20 17:00:17 -070097.nf
98CURL *curl = curl_easy_init();
99if(curl) {
100 curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
101 /* ask for options! */
102 curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_OPTIONS);
103 ret = curl_easy_perform(curl);
104 curl_easy_cleanup(curl);
105}
106.fi
Bertrand SIMONNETe6cd7382015-07-01 15:39:44 -0700107.SH AVAILABILITY
108Added in 7.20.0
109.SH RETURN VALUE
110Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
111.SH "SEE ALSO"
112.BR CURLOPT_RTSP_SESSION_ID "(3), " CURLOPT_RTSP_STREAM_URI "(3), "