Go to the documentation of this file.
43 static int win32_open(
const char *filename_utf8,
int oflag,
int pmode)
49 if (get_extended_win32_path(filename_utf8, &filename_w))
54 fd = _wsopen(filename_w, oflag, SH_DENYNO, pmode);
57 if (fd != -1 || (oflag & O_CREAT))
62 return _sopen(filename_utf8, oflag, SH_DENYNO, pmode);
64 #define open win32_open
70 unsigned int mode = 0;
75 mode = va_arg(ap,
unsigned int);
88 if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
111 int avpriv_tempfile(
const char *prefix,
char **filename,
int log_offset,
void *log_ctx)
116 void *ptr= tempnam(
NULL, prefix);
118 ptr= tempnam(
".", prefix);
123 size_t len = strlen(prefix) + 12;
141 fd = mkstemp(*filename);
142 #if defined(_WIN32) || defined (__ANDROID__) || defined(__DJGPP__)
145 fd = mkstemp(*filename);
152 av_log(&file_log_ctx,
AV_LOG_ERROR,
"ff_tempfile: Cannot open temporary file %s\n", *filename);
163 const char *m =
mode;
166 case 'r': access = O_RDONLY;
break;
167 case 'w': access = O_CREAT|O_WRONLY|O_TRUNC;
break;
168 case 'a': access = O_CREAT|O_WRONLY|O_APPEND;
break;
175 access &= ~(O_RDONLY | O_WRONLY);
177 }
else if (*m ==
'b') {
190 return fdopen(fd,
mode);
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int avpriv_open(const char *filename, int flags,...)
A wrapper for open() setting O_CLOEXEC.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
const char * av_default_item_name(void *ptr)
Return the context name.
int avpriv_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx)
Wrapper to work around the lack of mkstemp() on mingw.
static const AVClass file_log_ctx_class
FILE * avpriv_fopen_utf8(const char *path, const char *mode)
Open a file using a UTF-8 filename.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
char * av_strdup(const char *s)
Duplicate a string.
#define flags(name, subs,...)