Bertrand SIMONNET | e6cd738 | 2015-07-01 15:39:44 -0700 | [diff] [blame] | 1 | .\" ************************************************************************** |
| 2 | .\" * _ _ ____ _ |
| 3 | .\" * Project ___| | | | _ \| | |
| 4 | .\" * / __| | | | |_) | | |
| 5 | .\" * | (__| |_| | _ <| |___ |
| 6 | .\" * \___|\___/|_| \_\_____| |
| 7 | .\" * |
| 8 | .\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. |
| 9 | .\" * |
| 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 Deymo | 8f1a214 | 2016-06-28 14:49:26 -0700 | [diff] [blame^] | 12 | .\" * are also available at https://curl.haxx.se/docs/copyright.html. |
Bertrand SIMONNET | e6cd738 | 2015-07-01 15:39:44 -0700 | [diff] [blame] | 13 | .\" * |
| 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 | .\" |
| 23 | .TH CURLOPT_RTSP_REQUEST 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" |
| 24 | .SH NAME |
| 25 | CURLOPT_RTSP_REQUEST \- specify RTSP request |
| 26 | .SH SYNOPSIS |
| 27 | #include <curl/curl.h> |
| 28 | |
| 29 | CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_REQUEST, long request); |
| 30 | .SH DESCRIPTION |
| 31 | Tell libcurl what kind of RTSP request to make. Pass one of the following RTSP |
| 32 | enum values as a long in the \fIrequest\fP argument. Unless noted otherwise, |
| 33 | commands require the Session ID to be initialized. |
| 34 | .IP CURL_RTSPREQ_OPTIONS |
| 35 | Used to retrieve the available methods of the server. The application is |
| 36 | responsible for parsing and obeying the response. \fB(The session ID is not |
| 37 | needed for this method.)\fP |
| 38 | .IP CURL_RTSPREQ_DESCRIBE |
| 39 | Used to get the low level description of a stream. The application should note |
| 40 | what formats it understands in the \fI'Accept:'\fP header. Unless set |
| 41 | manually, libcurl will automatically fill in \fI'Accept: |
| 42 | application/sdp'\fP. Time-condition headers will be added to Describe requests |
| 43 | if the \fICURLOPT_TIMECONDITION(3)\fP option is active. \fB(The session ID is |
| 44 | not needed for this method)\fP |
| 45 | .IP CURL_RTSPREQ_ANNOUNCE |
| 46 | When sent by a client, this method changes the description of the session. For |
| 47 | example, if a client is using the server to record a meeting, the client can |
| 48 | use Announce to inform the server of all the meta-information about the |
| 49 | session. ANNOUNCE acts like a HTTP PUT or POST just like |
| 50 | \fICURL_RTSPREQ_SET_PARAMETER\fP |
| 51 | .IP CURL_RTSPREQ_SETUP |
| 52 | Setup is used to initialize the transport layer for the session. The |
| 53 | application must set the desired Transport options for a session by using the |
| 54 | \fICURLOPT_RTSP_TRANSPORT(3)\fP option prior to calling setup. If no session |
| 55 | ID is currently set with \fICURLOPT_RTSP_SESSION_ID(3)\fP, libcurl will |
| 56 | extract and use the session ID in the response to this request. \fB(The |
| 57 | session ID is not needed for this method).\fP |
| 58 | .IP CURL_RTSPREQ_PLAY |
| 59 | Send a Play command to the server. Use the \fICURLOPT_RANGE(3)\fP option to |
| 60 | modify the playback time (e.g. 'npt=10-15'). |
| 61 | .IP CURL_RTSPREQ_PAUSE |
| 62 | Send a Pause command to the server. Use the \fICURLOPT_RANGE(3)\fP option with |
| 63 | a single value to indicate when the stream should be halted. (e.g. npt='25') |
| 64 | .IP CURL_RTSPREQ_TEARDOWN |
| 65 | This command terminates an RTSP session. Simply closing a connection does not |
| 66 | terminate the RTSP session since it is valid to control an RTSP session over |
| 67 | different connections. |
| 68 | .IP CURL_RTSPREQ_GET_PARAMETER |
| 69 | Retrieve a parameter from the server. By default, libcurl will automatically |
| 70 | include a \fIContent-Type: text/parameters\fP header on all non-empty requests |
| 71 | unless a custom one is set. GET_PARAMETER acts just like a HTTP PUT or POST |
| 72 | (see \fICURL_RTSPREQ_SET_PARAMETER\fP). |
| 73 | Applications wishing to send a heartbeat message (e.g. in the presence of a |
| 74 | server-specified timeout) should send use an empty GET_PARAMETER request. |
| 75 | .IP CURL_RTSPREQ_SET_PARAMETER |
| 76 | Set a parameter on the server. By default, libcurl will automatically include |
| 77 | a \fIContent-Type: text/parameters\fP header unless a custom one is set. The |
| 78 | interaction with SET_PARAMETER is much like a HTTP PUT or POST. An application |
| 79 | may either use \fICURLOPT_UPLOAD(3)\fP with \fICURLOPT_READDATA(3)\fP like a |
| 80 | HTTP PUT, or it may use \fICURLOPT_POSTFIELDS(3)\fP like a HTTP POST. No |
| 81 | chunked transfers are allowed, so the application must set the |
| 82 | \fICURLOPT_INFILESIZE(3)\fP in the former and \fICURLOPT_POSTFIELDSIZE(3)\fP |
| 83 | in the latter. Also, there is no use of multi-part POSTs within RTSP. |
| 84 | .IP CURL_RTSPREQ_RECORD |
| 85 | Used to tell the server to record a session. Use the \fICURLOPT_RANGE(3)\fP |
| 86 | option to modify the record time. |
| 87 | .IP CURL_RTSPREQ_RECEIVE |
| 88 | This is a special request because it does not send any data to the server. The |
| 89 | application may call this function in order to receive interleaved RTP |
| 90 | data. It will return after processing one read buffer of data in order to give |
| 91 | the application a chance to run. |
| 92 | .SH DEFAULT |
| 93 | .SH PROTOCOLS |
| 94 | .SH EXAMPLE |
| 95 | TODO |
| 96 | .SH AVAILABILITY |
| 97 | Added in 7.20.0 |
| 98 | .SH RETURN VALUE |
| 99 | Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. |
| 100 | .SH "SEE ALSO" |
| 101 | .BR CURLOPT_RTSP_SESSION_ID "(3), " CURLOPT_RTSP_STREAM_URI "(3), " |