avio: do not export avpriv_io_{move,delete}

They are private and not used by anything outside of lavf. There is no
reason for them to be exported.
This commit is contained in:
Anton Khirnov 2020-01-10 12:18:29 +01:00
parent f27e3ccf06
commit 9d4c018497
5 changed files with 24 additions and 24 deletions

View File

@ -487,7 +487,7 @@ int avio_check(const char *url, int flags)
return ret;
}
int avpriv_io_move(const char *url_src, const char *url_dst)
int ffurl_move(const char *url_src, const char *url_dst)
{
URLContext *h_src, *h_dst;
int ret = ffurl_alloc(&h_src, url_src, AVIO_FLAG_READ_WRITE, NULL);
@ -509,7 +509,7 @@ int avpriv_io_move(const char *url_src, const char *url_dst)
return ret;
}
int avpriv_io_delete(const char *url)
int ffurl_delete(const char *url)
{
URLContext *h;
int ret = ffurl_alloc(&h, url, AVIO_FLAG_WRITE, NULL);
@ -661,7 +661,7 @@ int ff_check_interrupt(AVIOInterruptCB *cb)
int ff_rename(const char *url_src, const char *url_dst, void *logctx)
{
int ret = avpriv_io_move(url_src, url_dst);
int ret = ffurl_move(url_src, url_dst);
if (ret < 0)
av_log(logctx, AV_LOG_ERROR, "failed to rename file %s to %s: %s\n", url_src, url_dst, av_err2str(ret));
return ret;

View File

@ -374,25 +374,6 @@ const char *avio_find_protocol_name(const char *url);
*/
int avio_check(const char *url, int flags);
/**
* Move or rename a resource.
*
* @note url_src and url_dst should share the same protocol and authority.
*
* @param url_src url to resource to be moved
* @param url_dst new url to resource if the operation succeeded
* @return >=0 on success or negative on error.
*/
int avpriv_io_move(const char *url_src, const char *url_dst);
/**
* Delete a resource.
*
* @param url resource to be deleted.
* @return >=0 on success or negative on error.
*/
int avpriv_io_delete(const char *url);
/**
* Open directory for reading.
*

View File

@ -1845,7 +1845,7 @@ static void dashenc_delete_file(AVFormatContext *s, char *filename) {
av_dict_free(&http_opts);
ff_format_io_close(s, &out);
} else {
int res = avpriv_io_delete(filename);
int res = ffurl_delete(filename);
if (res < 0) {
char errbuf[AV_ERROR_MAX_STRING_SIZE];
av_strerror(res, errbuf, sizeof(errbuf));

View File

@ -792,7 +792,7 @@ int ff_stream_add_bitstream_filter(AVStream *st, const char *name, const char *a
int ff_stream_encode_params_copy(AVStream *dst, const AVStream *src);
/**
* Wrap avpriv_io_move and log if error happens.
* Wrap ffurl_move() and log if error happens.
*
* @param url_src source path
* @param url_dst destination path

View File

@ -388,4 +388,23 @@ typedef struct URLComponents {
*/
int ff_url_decompose(URLComponents *uc, const char *url, const char *end);
/**
* Move or rename a resource.
*
* @note url_src and url_dst should share the same protocol and authority.
*
* @param url_src url to resource to be moved
* @param url_dst new url to resource if the operation succeeded
* @return >=0 on success or negative on error.
*/
int ffurl_move(const char *url_src, const char *url_dst);
/**
* Delete a resource.
*
* @param url resource to be deleted.
* @return >=0 on success or negative on error.
*/
int ffurl_delete(const char *url);
#endif /* AVFORMAT_URL_H */