+/**
+ * Send a command to the RTSP server and wait for the reply.
+ *
+ * @param s RTSP (de)muxer context
+ * @param method the method for the request
+ * @param url the target url for the request
+ * @param headers extra header lines to include in the request
+ * @param reply pointer where the RTSP message header will be stored
+ * @param content_ptr pointer where the RTSP message body, if any, will
+ * be stored (length is in reply)
+ * @param send_content if non-null, the data to send as request body content
+ * @param send_content_length the length of the send_content data, or 0 if
+ * send_content is null
+ *
+ * @return zero if success, nonzero otherwise
+ */
+int ff_rtsp_send_cmd_with_content(AVFormatContext *s,
+ const char *method, const char *url,
+ const char *headers,
+ RTSPMessageHeader *reply,
+ unsigned char **content_ptr,
+ const unsigned char *send_content,
+ int send_content_length);
+
+/**
+ * Send a command to the RTSP server and wait for the reply.
+ *
+ * @see rtsp_send_cmd_with_content
+ */
+int ff_rtsp_send_cmd(AVFormatContext *s, const char *method,
+ const char *url, const char *headers,
+ RTSPMessageHeader *reply, unsigned char **content_ptr);
+
+/**
+ * Read a RTSP message from the server, or prepare to read data
+ * packets if we're reading data interleaved over the TCP/RTSP
+ * connection as well.
+ *
+ * @param s RTSP (de)muxer context
+ * @param reply pointer where the RTSP message header will be stored
+ * @param content_ptr pointer where the RTSP message body, if any, will
+ * be stored (length is in reply)
+ * @param return_on_interleaved_data whether the function may return if we
+ * encounter a data marker ('$'), which precedes data
+ * packets over interleaved TCP/RTSP connections. If this
+ * is set, this function will return 1 after encountering
+ * a '$'. If it is not set, the function will skip any
+ * data packets (if they are encountered), until a reply
+ * has been fully parsed. If no more data is available
+ * without parsing a reply, it will return an error.
+ * @param method the RTSP method this is a reply to. This affects how
+ * some response headers are acted upon. May be NULL.
+ *
+ * @return 1 if a data packets is ready to be received, -1 on error,
+ * and 0 on success.
+ */
+int ff_rtsp_read_reply(AVFormatContext *s, RTSPMessageHeader *reply,
+ unsigned char **content_ptr,
+ int return_on_interleaved_data, const char *method);
+
+/**
+ * Skip a RTP/TCP interleaved packet.
+ */
+void ff_rtsp_skip_packet(AVFormatContext *s);
+
+/**
+ * Connect to the RTSP server and set up the individual media streams.
+ * This can be used for both muxers and demuxers.
+ *
+ * @param s RTSP (de)muxer context
+ *
+ * @return 0 on success, < 0 on error. Cleans up all allocations done
+ * within the function on error.
+ */
+int ff_rtsp_connect(AVFormatContext *s);