X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Favio.h;h=5ac5d38568136144863b081d1be51e338717805a;hb=a4d76faf45cf1ec7d39d62b4707260e211a932c7;hp=51913e39fc20014b9baaa5c9d1faab05717ab6b7;hpb=f939bf58b22896fadfcfadaddb9c222a86e7ecfa;p=ffmpeg diff --git a/libavformat/avio.h b/libavformat/avio.h index 51913e39fc2..5ac5d385681 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -79,7 +79,7 @@ typedef struct AVIODirEntry { char *name; /**< Filename */ int type; /**< Type of the entry */ int utf8; /**< Set to 1 when name is encoded with UTF-8, 0 otherwise. - Name can be encoded with UTF-8 eventhough 0 is set. */ + Name can be encoded with UTF-8 even though 0 is set. */ int64_t size; /**< File size in bytes, -1 if unknown. */ int64_t modification_timestamp; /**< Time of last modification in microseconds since unix epoch, -1 if unknown. */ @@ -196,6 +196,12 @@ typedef struct AVIOContext { * This field is internal to libavformat and access from outside is not allowed. */ int orig_buffer_size; + + /** + * Threshold to favor readahead over seek. + * This is current internal only, do not use from outside. + */ + int short_seek_threshold; } AVIOContext; /* unbuffered I/O */ @@ -223,6 +229,25 @@ 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 avio_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 avio_delete(const char *url); + /** * Open directory for reading. * @@ -315,12 +340,18 @@ int avio_put_str(AVIOContext *s, const char *str); /** * Convert an UTF-8 string to UTF-16LE and write it. + * @param s the AVIOContext + * @param str NULL-terminated UTF-8 string + * * @return number of bytes written. */ int avio_put_str16le(AVIOContext *s, const char *str); /** * Convert an UTF-8 string to UTF-16BE and write it. + * @param s the AVIOContext + * @param str NULL-terminated UTF-8 string + * * @return number of bytes written. */ int avio_put_str16be(AVIOContext *s, const char *str);