mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
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:
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user