You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	avutil/internal: Move avpriv-file API to a header of its own
It is not used by the large majority of files that include lavu/internal.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
		| @@ -27,6 +27,7 @@ | |||||||
|  |  | ||||||
| #include "libavutil/attributes.h" | #include "libavutil/attributes.h" | ||||||
| #include "libavutil/colorspace.h" | #include "libavutil/colorspace.h" | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include "libavutil/bswap.h" | #include "libavutil/bswap.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -30,7 +30,7 @@ | |||||||
| #include <xvid.h> | #include <xvid.h> | ||||||
|  |  | ||||||
| #include "libavutil/avassert.h" | #include "libavutil/avassert.h" | ||||||
| #include "libavutil/file.h" | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/internal.h" | #include "libavutil/internal.h" | ||||||
| #include "libavutil/intreadwrite.h" | #include "libavutil/intreadwrite.h" | ||||||
| #include "libavutil/mathematics.h" | #include "libavutil/mathematics.h" | ||||||
|   | |||||||
| @@ -25,6 +25,7 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "libavformat/internal.h" | #include "libavformat/internal.h" | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/internal.h" | #include "libavutil/internal.h" | ||||||
| #include "libavutil/log.h" | #include "libavutil/log.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
|   | |||||||
| @@ -26,6 +26,7 @@ | |||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| #include "fbdev_common.h" | #include "fbdev_common.h" | ||||||
| #include "libavutil/common.h" | #include "libavutil/common.h" | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "avdevice.h" | #include "avdevice.h" | ||||||
|  |  | ||||||
| struct rgb_pixfmt_map_entry { | struct rgb_pixfmt_map_entry { | ||||||
|   | |||||||
| @@ -34,6 +34,7 @@ | |||||||
| #include <time.h> | #include <time.h> | ||||||
| #include <linux/fb.h> | #include <linux/fb.h> | ||||||
|  |  | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/internal.h" | #include "libavutil/internal.h" | ||||||
| #include "libavutil/log.h" | #include "libavutil/log.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
|   | |||||||
| @@ -23,6 +23,7 @@ | |||||||
| #include <sys/ioctl.h> | #include <sys/ioctl.h> | ||||||
| #include <sys/mman.h> | #include <sys/mman.h> | ||||||
| #include <linux/fb.h> | #include <linux/fb.h> | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/pixdesc.h" | #include "libavutil/pixdesc.h" | ||||||
| #include "libavutil/log.h" | #include "libavutil/log.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
|   | |||||||
| @@ -30,6 +30,7 @@ | |||||||
| #include <sys/ioctl.h> | #include <sys/ioctl.h> | ||||||
| #include <sys/soundcard.h> | #include <sys/soundcard.h> | ||||||
|  |  | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/log.h" | #include "libavutil/log.h" | ||||||
|  |  | ||||||
| #include "avdevice.h" | #include "avdevice.h" | ||||||
|   | |||||||
| @@ -31,10 +31,8 @@ | |||||||
|  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include <float.h> |  | ||||||
|  |  | ||||||
| #include "libavutil/avassert.h" | #include "libavutil/avassert.h" | ||||||
| #include "libavutil/avstring.h" | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/float_dsp.h" | #include "libavutil/float_dsp.h" | ||||||
| #include "libavutil/mem_internal.h" | #include "libavutil/mem_internal.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
|   | |||||||
| @@ -19,6 +19,7 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "libavutil/channel_layout.h" | #include "libavutil/channel_layout.h" | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include "libavutil/eval.h" | #include "libavutil/eval.h" | ||||||
| #include "libavutil/avassert.h" | #include "libavutil/avassert.h" | ||||||
|   | |||||||
| @@ -19,6 +19,7 @@ | |||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
| #include <string.h> | #include <string.h> | ||||||
|  |  | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/mem.h" | #include "libavutil/mem.h" | ||||||
| #include "libavutil/pixdesc.h" | #include "libavutil/pixdesc.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -22,12 +22,12 @@ | |||||||
| #include "libavutil/bprint.h" | #include "libavutil/bprint.h" | ||||||
| #include "libavutil/eval.h" | #include "libavutil/eval.h" | ||||||
| #include "libavutil/file.h" | #include "libavutil/file.h" | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/intreadwrite.h" | #include "libavutil/intreadwrite.h" | ||||||
| #include "libavutil/avassert.h" | #include "libavutil/avassert.h" | ||||||
| #include "libavutil/pixdesc.h" | #include "libavutil/pixdesc.h" | ||||||
| #include "avfilter.h" | #include "avfilter.h" | ||||||
| #include "drawutils.h" | #include "drawutils.h" | ||||||
| #include "formats.h" |  | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "video.h" | #include "video.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -50,10 +50,10 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "avfilter.h" | #include "avfilter.h" | ||||||
| #include "formats.h" |  | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "video.h" | #include "video.h" | ||||||
| #include "libavutil/common.h" | #include "libavutil/common.h" | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/mem.h" | #include "libavutil/mem.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include "libavutil/pixdesc.h" | #include "libavutil/pixdesc.h" | ||||||
|   | |||||||
| @@ -21,14 +21,10 @@ | |||||||
|  * implementing an classification filter using deep learning networks. |  * implementing an classification filter using deep learning networks. | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "libavformat/avio.h" | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include "libavutil/pixdesc.h" |  | ||||||
| #include "libavutil/avassert.h" |  | ||||||
| #include "libavutil/imgutils.h" |  | ||||||
| #include "filters.h" | #include "filters.h" | ||||||
| #include "dnn_filter_common.h" | #include "dnn_filter_common.h" | ||||||
| #include "formats.h" |  | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "libavutil/time.h" | #include "libavutil/time.h" | ||||||
| #include "libavutil/avstring.h" | #include "libavutil/avstring.h" | ||||||
|   | |||||||
| @@ -21,14 +21,10 @@ | |||||||
|  * implementing an object detecting filter using deep learning networks. |  * implementing an object detecting filter using deep learning networks. | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "libavformat/avio.h" | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include "libavutil/pixdesc.h" |  | ||||||
| #include "libavutil/avassert.h" |  | ||||||
| #include "libavutil/imgutils.h" |  | ||||||
| #include "filters.h" | #include "filters.h" | ||||||
| #include "dnn_filter_common.h" | #include "dnn_filter_common.h" | ||||||
| #include "formats.h" |  | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "libavutil/time.h" | #include "libavutil/time.h" | ||||||
| #include "libavutil/avstring.h" | #include "libavutil/avstring.h" | ||||||
|   | |||||||
| @@ -19,6 +19,7 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "libavutil/avassert.h" | #include "libavutil/avassert.h" | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/imgutils.h" | #include "libavutil/imgutils.h" | ||||||
| #include "libavutil/internal.h" | #include "libavutil/internal.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
|   | |||||||
| @@ -29,13 +29,11 @@ | |||||||
| #include "float.h" | #include "float.h" | ||||||
|  |  | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include "libavutil/file.h" | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/intreadwrite.h" |  | ||||||
| #include "libavutil/intfloat.h" | #include "libavutil/intfloat.h" | ||||||
| #include "libavutil/avassert.h" | #include "libavutil/avassert.h" | ||||||
| #include "libavutil/avstring.h" | #include "libavutil/avstring.h" | ||||||
| #include "drawutils.h" | #include "drawutils.h" | ||||||
| #include "formats.h" |  | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "video.h" | #include "video.h" | ||||||
| #include "lut3d.h" | #include "lut3d.h" | ||||||
|   | |||||||
| @@ -22,13 +22,13 @@ | |||||||
| #include <float.h> | #include <float.h> | ||||||
|  |  | ||||||
| #include "libavutil/common.h" | #include "libavutil/common.h" | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/float_dsp.h" | #include "libavutil/float_dsp.h" | ||||||
| #include "libavutil/imgutils.h" | #include "libavutil/imgutils.h" | ||||||
| #include "libavutil/mem_internal.h" | #include "libavutil/mem_internal.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include "libavutil/pixdesc.h" | #include "libavutil/pixdesc.h" | ||||||
| #include "avfilter.h" | #include "avfilter.h" | ||||||
| #include "formats.h" |  | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "video.h" | #include "video.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -24,6 +24,7 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "libavutil/bprint.h" | #include "libavutil/bprint.h" | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/internal.h" | #include "libavutil/internal.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include "libavutil/qsort.h" | #include "libavutil/qsort.h" | ||||||
|   | |||||||
| @@ -26,15 +26,14 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "libavutil/avstring.h" | #include "libavutil/avstring.h" | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include "libavutil/pixdesc.h" | #include "libavutil/pixdesc.h" | ||||||
| #include "avfilter.h" | #include "avfilter.h" | ||||||
| #include "drawutils.h" | #include "drawutils.h" | ||||||
| #include "formats.h" |  | ||||||
| #include "framesync.h" | #include "framesync.h" | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "psnr.h" | #include "psnr.h" | ||||||
| #include "video.h" |  | ||||||
|  |  | ||||||
| typedef struct PSNRContext { | typedef struct PSNRContext { | ||||||
|     const AVClass *class; |     const AVClass *class; | ||||||
|   | |||||||
| @@ -24,13 +24,11 @@ | |||||||
|  * @see http://epubs.surrey.ac.uk/531590/1/MPEG-7%20Video%20Signature%20Author%27s%20Copy.pdf |  * @see http://epubs.surrey.ac.uk/531590/1/MPEG-7%20Video%20Signature%20Author%27s%20Copy.pdf | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include <float.h> |  | ||||||
| #include "libavcodec/put_bits.h" | #include "libavcodec/put_bits.h" | ||||||
| #include "libavformat/avformat.h" | #include "libavformat/avformat.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include "libavutil/avstring.h" | #include "libavutil/avstring.h" | ||||||
| #include "libavutil/intreadwrite.h" | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/timestamp.h" |  | ||||||
| #include "avfilter.h" | #include "avfilter.h" | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "signature.h" | #include "signature.h" | ||||||
|   | |||||||
| @@ -35,15 +35,14 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "libavutil/avstring.h" | #include "libavutil/avstring.h" | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include "libavutil/pixdesc.h" | #include "libavutil/pixdesc.h" | ||||||
| #include "avfilter.h" | #include "avfilter.h" | ||||||
| #include "drawutils.h" | #include "drawutils.h" | ||||||
| #include "formats.h" |  | ||||||
| #include "framesync.h" | #include "framesync.h" | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "ssim.h" | #include "ssim.h" | ||||||
| #include "video.h" |  | ||||||
|  |  | ||||||
| typedef struct SSIMContext { | typedef struct SSIMContext { | ||||||
|     const AVClass *class; |     const AVClass *class; | ||||||
|   | |||||||
| @@ -23,8 +23,9 @@ | |||||||
| #include <vid.stab/libvidstab.h> | #include <vid.stab/libvidstab.h> | ||||||
|  |  | ||||||
| #include "libavutil/common.h" | #include "libavutil/common.h" | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include "libavutil/imgutils.h" | #include "libavutil/pixdesc.h" | ||||||
| #include "avfilter.h" | #include "avfilter.h" | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -23,8 +23,9 @@ | |||||||
| #include <vid.stab/libvidstab.h> | #include <vid.stab/libvidstab.h> | ||||||
|  |  | ||||||
| #include "libavutil/common.h" | #include "libavutil/common.h" | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include "libavutil/imgutils.h" | #include "libavutil/pixdesc.h" | ||||||
| #include "avfilter.h" | #include "avfilter.h" | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -24,6 +24,7 @@ | |||||||
|  * Calculate VMAF Motion score. |  * Calculate VMAF Motion score. | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include "libavutil/pixdesc.h" | #include "libavutil/pixdesc.h" | ||||||
| #include "avfilter.h" | #include "avfilter.h" | ||||||
|   | |||||||
| @@ -29,10 +29,10 @@ | |||||||
|  |  | ||||||
| #include "libavutil/avassert.h" | #include "libavutil/avassert.h" | ||||||
| #include "libavutil/avstring.h" | #include "libavutil/avstring.h" | ||||||
| #include "libavutil/internal.h" | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include "libavutil/tree.h" | #include "libavutil/tree.h" | ||||||
| #include "avformat.h" | #include "avio.h" | ||||||
| #include <fcntl.h> | #include <fcntl.h> | ||||||
| #if HAVE_IO_H | #if HAVE_IO_H | ||||||
| #include <io.h> | #include <io.h> | ||||||
|   | |||||||
| @@ -22,9 +22,10 @@ | |||||||
| #include "config_components.h" | #include "config_components.h" | ||||||
|  |  | ||||||
| #include "libavutil/avstring.h" | #include "libavutil/avstring.h" | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/internal.h" | #include "libavutil/internal.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include "avformat.h" | #include "avio.h" | ||||||
| #if HAVE_DIRENT_H | #if HAVE_DIRENT_H | ||||||
| #include <dirent.h> | #include <dirent.h> | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -20,6 +20,7 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "libavutil/avstring.h" | #include "libavutil/avstring.h" | ||||||
|  | #include "libavutil/file_open.h" | ||||||
| #include "libavutil/getenv_utf8.h" | #include "libavutil/getenv_utf8.h" | ||||||
| #include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||||
| #include <sys/stat.h> | #include <sys/stat.h> | ||||||
|   | |||||||
| @@ -18,6 +18,7 @@ | |||||||
|  |  | ||||||
| #include "config.h" | #include "config.h" | ||||||
| #include "file.h" | #include "file.h" | ||||||
|  | #include "file_open.h" | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "log.h" | #include "log.h" | ||||||
| #include "mem.h" | #include "mem.h" | ||||||
|   | |||||||
| @@ -17,7 +17,8 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "config.h" | #include "config.h" | ||||||
| #include "internal.h" | #include "avutil.h" | ||||||
|  | #include "file_open.h" | ||||||
| #include "mem.h" | #include "mem.h" | ||||||
| #include <stdarg.h> | #include <stdarg.h> | ||||||
| #include <fcntl.h> | #include <fcntl.h> | ||||||
|   | |||||||
							
								
								
									
										57
									
								
								libavutil/file_open.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								libavutil/file_open.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,57 @@ | |||||||
|  | /* | ||||||
|  |  * This file is part of FFmpeg. | ||||||
|  |  * | ||||||
|  |  * FFmpeg is free software; you can redistribute it and/or | ||||||
|  |  * modify it under the terms of the GNU Lesser General Public | ||||||
|  |  * License as published by the Free Software Foundation; either | ||||||
|  |  * version 2.1 of the License, or (at your option) any later version. | ||||||
|  |  * | ||||||
|  |  * FFmpeg is distributed in the hope that it will be useful, | ||||||
|  |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
|  |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | ||||||
|  |  * Lesser General Public License for more details. | ||||||
|  |  * | ||||||
|  |  * You should have received a copy of the GNU Lesser General Public | ||||||
|  |  * License along with FFmpeg; if not, write to the Free Software | ||||||
|  |  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | #ifndef AVUTIL_FILE_OPEN_H | ||||||
|  | #define AVUTIL_FILE_OPEN_H | ||||||
|  |  | ||||||
|  | #include <stdio.h> | ||||||
|  |  | ||||||
|  | #include "config.h" | ||||||
|  | #include "attributes.h" | ||||||
|  |  | ||||||
|  | #if HAVE_LIBC_MSVCRT | ||||||
|  | #define avpriv_fopen_utf8 ff_fopen_utf8 | ||||||
|  | #define avpriv_open ff_open | ||||||
|  | #define avpriv_tempfile ff_tempfile | ||||||
|  | #endif | ||||||
|  |  | ||||||
|  |  /** | ||||||
|  |  * A wrapper for open() setting O_CLOEXEC. | ||||||
|  |  */ | ||||||
|  | av_warn_unused_result | ||||||
|  | int avpriv_open(const char *filename, int flags, ...); | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * Open a file using a UTF-8 filename. | ||||||
|  |  */ | ||||||
|  | FILE *avpriv_fopen_utf8(const char *path, const char *mode); | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 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 negative value corresponding to an | ||||||
|  |  * AVERROR code on error) | ||||||
|  |  * and opened file name in **filename. | ||||||
|  |  * @note On very old libcs it is necessary to set a secure umask before | ||||||
|  |  *       calling this, av_tempfile() can't call umask itself as it is used in | ||||||
|  |  *       libraries and could interfere with the calling application. | ||||||
|  |  */ | ||||||
|  | int avpriv_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx); | ||||||
|  |  | ||||||
|  | #endif /* AVUTIL_FILE_OPEN_H */ | ||||||
| @@ -155,10 +155,6 @@ void avpriv_request_sample(void *avc, | |||||||
| #pragma comment(linker, "/include:" EXTERN_PREFIX "avpriv_snprintf") | #pragma comment(linker, "/include:" EXTERN_PREFIX "avpriv_snprintf") | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #define avpriv_fopen_utf8 ff_fopen_utf8 |  | ||||||
| #define avpriv_open ff_open |  | ||||||
| #define avpriv_tempfile ff_tempfile |  | ||||||
|  |  | ||||||
| #define PTRDIFF_SPECIFIER "Id" | #define PTRDIFF_SPECIFIER "Id" | ||||||
| #define SIZE_SPECIFIER "Iu" | #define SIZE_SPECIFIER "Iu" | ||||||
| #else | #else | ||||||
| @@ -188,30 +184,6 @@ void avpriv_request_sample(void *avc, | |||||||
| #define SUINT32 uint32_t | #define SUINT32 uint32_t | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * A wrapper for open() setting O_CLOEXEC. |  | ||||||
|  */ |  | ||||||
| av_warn_unused_result |  | ||||||
| int avpriv_open(const char *filename, int flags, ...); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * Open a file using a UTF-8 filename. |  | ||||||
|  */ |  | ||||||
| FILE *avpriv_fopen_utf8(const char *path, const char *mode); |  | ||||||
|  |  | ||||||
| /** |  | ||||||
|  * 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 negative value corresponding to an |  | ||||||
|  * AVERROR code on error) |  | ||||||
|  * and opened file name in **filename. |  | ||||||
|  * @note On very old libcs it is necessary to set a secure umask before |  | ||||||
|  *       calling this, av_tempfile() can't call umask itself as it is used in |  | ||||||
|  *       libraries and could interfere with the calling application. |  | ||||||
|  */ |  | ||||||
| int avpriv_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx); |  | ||||||
|  |  | ||||||
| int avpriv_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt); | int avpriv_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt); | ||||||
|  |  | ||||||
| static av_always_inline av_const int avpriv_mirror(int x, int w) | static av_always_inline av_const int avpriv_mirror(int x, int w) | ||||||
|   | |||||||
| @@ -35,6 +35,7 @@ | |||||||
| #include <time.h> | #include <time.h> | ||||||
| #include <string.h> | #include <string.h> | ||||||
| #include "avassert.h" | #include "avassert.h" | ||||||
|  | #include "file_open.h" | ||||||
| #include "internal.h" | #include "internal.h" | ||||||
| #include "intreadwrite.h" | #include "intreadwrite.h" | ||||||
| #include "timer.h" | #include "timer.h" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user