Go to the documentation of this file.
36 #elif HAVE_MAPVIEWOFFILE
56 int log_offset,
void *log_ctx)
74 if (fstat(fd, &st) < 0) {
82 off_size = st.st_size;
83 if (off_size > SIZE_MAX) {
85 "File size for file '%s' is too big\n", filename);
97 ptr = mmap(
NULL, *
size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
98 if (ptr == MAP_FAILED) {
107 #elif HAVE_MAPVIEWOFFILE
109 HANDLE
mh, fh = (HANDLE)_get_osfhandle(fd);
111 mh = CreateFileMapping(fh,
NULL, PAGE_READONLY, 0, 0,
NULL);
119 ptr = MapViewOfFile(
mh, FILE_MAP_READ, 0, 0, *
size);
148 if (!
size || !bufptr)
151 munmap(bufptr,
size);
152 #elif HAVE_MAPVIEWOFFILE
153 UnmapViewOfFile(bufptr);
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
int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, int log_offset, void *log_ctx)
Read the file with name filename, and put its content in a newly allocated buffer or map it with mmap...
int av_strerror(int errnum, char *errbuf, size_t errbuf_size)
Put a description of the AVERROR code errnum in errbuf.
#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.
void av_file_unmap(uint8_t *bufptr, size_t size)
Unmap or free the buffer bufptr created by av_file_map().
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
const char * av_default_item_name(void *ptr)
Return the context name.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
static const AVClass file_log_ctx_class
static uint32_t BS_FUNC() read(BSCTX *bc, unsigned int n)
Return n bits from the buffer, n has to be in the 0-32 range.