FFmpeg
Functions
file_open.h File Reference
#include <stdio.h>
#include "config.h"
#include "attributes.h"

Go to the source code of this file.

Functions

av_warn_unused_result int avpriv_open (const char *filename, int flags,...)
 A wrapper for open() setting O_CLOEXEC. More...
 
FILE * avpriv_fopen_utf8 (const char *path, const char *mode)
 Open a file using a UTF-8 filename. More...
 
int avpriv_tempfile (const char *prefix, char **filename, int log_offset, void *log_ctx)
 Wrapper to work around the lack of mkstemp() on mingw. More...
 

Function Documentation

◆ avpriv_open()

av_warn_unused_result int avpriv_open ( const char *  filename,
int  flags,
  ... 
)

A wrapper for open() setting O_CLOEXEC.

Definition at line 67 of file file_open.c.

Referenced by av_file_map(), avpriv_fopen_utf8(), bktr_init(), fbdev_read_header(), fbdev_write_header(), ff_fbdev_get_device_list(), and ff_oss_audio_open().

◆ avpriv_fopen_utf8()

FILE* avpriv_fopen_utf8 ( const char *  path,
const char *  mode 
)

◆ avpriv_tempfile()

int avpriv_tempfile ( const char *  prefix,
char **  filename,
int  log_offset,
void *  log_ctx 
)

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.

Returns
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.

Definition at line 111 of file file_open.c.

Referenced by av_tempfile(), cache_open(), and xvid_encode_init().