summaryrefslogtreecommitdiff
path: root/libavutil/file.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-16 15:21:58 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-16 17:12:37 +0200
commit885158c887384c6da247cc061458f2e53367e6b5 (patch)
treed915138f0a53ec1862a0e7782ade014cd0810957 /libavutil/file.h
parent7f16ec61e17ddc039e68637f1ca27844718312a6 (diff)
Move av_tempfile() into libavutil, it is a generically usefull thing and its small.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/file.h')
-rw-r--r--libavutil/file.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavutil/file.h b/libavutil/file.h
index f28627c9d8..c6d2692d52 100644
--- a/libavutil/file.h
+++ b/libavutil/file.h
@@ -49,4 +49,13 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size,
*/
void av_file_unmap(uint8_t *bufptr, size_t size);
+/**
+ * Wrapper to work around the lack of mkstemp() on mingw.
+ * Also, tries to create file in /tmp first, if possible.
+ * *prefix can be a character constant; *filename will be allocated internally.
+ * @return file descriptor of opened file (or -1 on error)
+ * and opened file name in **filename.
+ */
+int av_tempfile(const char *prefix, char **filename);
+
#endif /* AVUTIL_FILE_H */