rtsp: expose rtsp_send_cmd_with_content_async

Add the ff_ prefix and move the declaration to the header, so it can
be used in other places like rtspdec in a future commit.
This commit is contained in:
Marvin Scholz
2025-08-26 23:31:57 +02:00
parent 633dcf71e8
commit 368ecdd3a4
2 changed files with 22 additions and 3 deletions

View File

@@ -1385,7 +1385,7 @@ start:
*
* @return zero if success, nonzero otherwise
*/
static int rtsp_send_cmd_with_content_async(AVFormatContext *s,
int ff_rtsp_send_cmd_with_content_async(AVFormatContext *s,
const char *method, const char *url,
const char *headers,
const unsigned char *send_content,
@@ -1445,7 +1445,7 @@ static int rtsp_send_cmd_with_content_async(AVFormatContext *s,
int ff_rtsp_send_cmd_async(AVFormatContext *s, const char *method,
const char *url, const char *headers)
{
return rtsp_send_cmd_with_content_async(s, method, url, headers, NULL, 0);
return ff_rtsp_send_cmd_with_content_async(s, method, url, headers, NULL, 0);
}
int ff_rtsp_send_cmd(AVFormatContext *s, const char *method, const char *url,
@@ -1470,7 +1470,7 @@ int ff_rtsp_send_cmd_with_content(AVFormatContext *s,
retry:
cur_auth_type = rt->auth_state.auth_type;
if ((ret = rtsp_send_cmd_with_content_async(s, method, url, header,
if ((ret = ff_rtsp_send_cmd_with_content_async(s, method, url, header,
send_content,
send_content_length)) < 0)
return ret;

View File

@@ -508,6 +508,25 @@ void ff_rtsp_parse_line(AVFormatContext *s,
int ff_rtsp_send_cmd_async(AVFormatContext *s, const char *method,
const char *url, const char *headers);
/**
* Send a command to the RTSP server without waiting 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 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_async(AVFormatContext *s,
const char *method, const char *url,
const char *headers,
const unsigned char *send_content,
int send_content_length);
/**
* Send a command to the RTSP server and wait for the reply.
*