Crate ffmpeg_sys_the_third

source ·

Structs§

Enums§

Constants§

Statics§

  • @defgroup lavu_aes AES @ingroup lavu_crypto @{
  • @file @brief Public header for libavutil CAMELLIA algorithm @defgroup lavu_camellia CAMELLIA @ingroup lavu_crypto @{
  • @file @brief Public header for libavutil CAST5 algorithm @defgroup lavu_cast5 CAST5 @ingroup lavu_crypto @{
  • AVOption table used by devices to implement device capabilities API. Should not be used by a user.
  • @defgroup lavu_md5 MD5 @ingroup lavu_hash MD5 hash function implementation.
  • @defgroup lavu_ripemd RIPEMD @ingroup lavu_hash RIPEMD hash function implementation.
  • @defgroup lavu_sha512 SHA-512 @ingroup lavu_hash SHA-512 (Secure Hash Algorithm) hash function implementations.
  • @defgroup lavu_sha SHA @ingroup lavu_hash SHA-1 and SHA-256 (Secure Hash Algorithm) hash function implementations.
  • @file @brief Public header for libavutil TWOFISH algorithm @defgroup lavu_twofish TWOFISH @ingroup lavu_crypto @{

Functions§

  • Create an AVABufferSinkParams structure.
  • Add an index entry into a sorted list. Update the entry if the list already contains it.
  • Add two rationals. @param b First rational @param c Second rational @return b+c
  • Add a value to a timestamp.
  • Calculate the Adler32 checksum of a buffer.
  • Allocate an AVAES context.
  • Encrypt or decrypt a buffer using a previously initialized context. @param count number of 16 byte blocks @param dst destination array, can be equal to src @param src source array, can be equal to dst @param iv initialization vector for CBC mode, if NULL then ECB will be used @param decrypt 0 for encryption, 1 for decryption
  • Initialize an AVAES context. @param key_bits 128, 192 or 256 @param decrypt 0 for encryption, 1 for decryption
  • Read data and append it to the current content of the AVPacket. If pkt->size is 0 this is identical to av_get_packet. Note that this uses av_grow_packet and thus involves a realloc which is inefficient. Thus this function should only be used when there is no reasonable way to know (an upper bound of) the final size.
  • Append path component to the existing path. Path separator ‘/’ is placed between when needed. Resulting string have to be freed with av_free(). @param path base path @param component component to be appended @return new path or NULL on error.
  • Apply a list of bitstream filters to a packet.
  • Print arguments following specified format into a large enough auto allocated buffer. It is similar to GNU asprintf(). @param fmt printf-compatible format string, specifying how the following parameters are used. @return the allocated string @note You have to free the string yourself with av_free().
  • Allocate an AVAudioFifo.
  • Drain data from an AVAudioFifo.
  • Free an AVAudioFifo.
  • Peek data from an AVAudioFifo.
  • Peek data from an AVAudioFifo.
  • Read data from an AVAudioFifo.
  • Reallocate an AVAudioFifo.
  • Reset the AVAudioFifo buffer.
  • Get the current number of samples in the AVAudioFifo available for reading.
  • Get the current number of samples in the AVAudioFifo available for writing.
  • Write data to an AVAudioFifo.
  • Decode a base64-encoded string.
  • Encode data to base64 and null-terminate.
  • Thread safe basename. @param path the string to parse, on DOS both \ and / are considered separators. @return pointer to the basename substring. If path does not contain a slash, the function returns a copy of path. If path is a NULL pointer or points to an empty string, a pointer to a string “.” is returned.
  • @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) is deprecated. Use av_bsf_free() from the new bitstream filtering API (using AVBSFContext).
  • @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) is deprecated. Use av_bsf_send_packet() and av_bsf_receive_packet() from the new bitstream filtering API (using AVBSFContext).
  • @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) is deprecated. Use av_bsf_get_by_name(), av_bsf_alloc(), and av_bsf_init() from the new bitstream filtering API (using AVBSFContext).
  • @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) is deprecated. Use av_bsf_iterate() from the new bitstream filtering API (using AVBSFContext).
  • Allocate an AVBlowfish context.
  • Encrypt or decrypt a buffer using a previously initialized context.
  • Encrypt or decrypt a buffer using a previously initialized context.
  • Initialize an AVBlowfish context.
  • Get the next two numbers generated by a Box-Muller Gaussian generator using the random numbers issued by lfg.
  • Append data to a print buffer.
  • Append a description of a channel layout to a bprint buffer.
  • Append char c n times to a print buffer.
  • Reset the string to “” but keep internal allocated data.
  • Escape the content in src and append it to dstbuf.
  • Finalize a print buffer.
  • Allocate bytes in the buffer for external use.
  • Init a print buffer.
  • Init a print buffer using a pre-existing buffer.
  • Append a formatted date and time to a print buffer.
  • Append a formatted string to a print buffer.
  • Allocate a context for a given bitstream filter. The caller must fill in the context parameters as described in the documentation and then call av_bsf_init() before sending any data to the filter.
  • Reset the internal bitstream filter state. Should be called e.g. when seeking.
  • Free a bitstream filter context and everything associated with it; write NULL into the supplied pointer.
  • @return a bitstream filter with the specified name or NULL if no such bitstream filter exists.
  • Get the AVClass for AVBSFContext. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options.
  • Get null/pass-through bitstream filter.
  • Prepare the filter for use, after all the parameters and options have been set.
  • Iterate over all registered bitstream filters.
  • Allocate empty list of bitstream filters. The list must be later freed by av_bsf_list_free() or finalized by av_bsf_list_finalize().
  • Append bitstream filter to the list of bitstream filters.
  • Construct new bitstream filter context given it’s name and options and append it to the list of bitstream filters.
  • Finalize list of bitstream filters.
  • Free list of bitstream filters.
  • Parse string describing list of bitstream filters and create single @ref AVBSFContext describing the whole chain of bitstream filters. Resulting @ref AVBSFContext can be treated as any other @ref AVBSFContext freshly allocated by av_bsf_alloc().
  • Retrieve a filtered packet.
  • Submit a packet for filtering.
  • Default free callback, which calls av_free() on the buffer data. This function is meant to be passed to av_buffer_create(), not called directly.
  • @return the opaque parameter set by av_buffer_create.
  • @return 1 if the caller may write to the data referred to by buf (which is true if and only if buf is the only reference to the underlying AVBuffer). Return 0 otherwise. A positive answer is valid until av_buffer_ref() is called on buf.
  • Create a writable reference from a given buffer reference, avoiding data copy if possible.
  • Query the original opaque parameter of an allocated buffer in the pool.
  • Allocate a new AVBuffer, reusing an old buffer from the pool when available. This function may be called simultaneously from multiple threads.
  • Mark the pool as being available for freeing. It will actually be freed only once all the allocated buffers associated with the pool are released. Thus it is safe to call this function while some of the allocated buffers are still in use.
  • Create a new reference to an AVBuffer.
  • Ensure dst refers to the same data as src.
  • Free a given reference and automatically free the buffer if there are no more references to it.
  • Get a frame with filtered data from sink and put it in frame.
  • Get a frame with filtered data from sink and put it in frame.
  • Same as av_buffersink_get_frame(), but with the ability to specify the number of samples read. This function is less efficient than av_buffersink_get_frame(), because it copies the data around.
  • @defgroup lavfi_buffersink_accessors Buffer sink accessors Get the properties of the stream @{
  • Create an AVBufferSinkParams structure.
  • Set the frame size for an audio buffer sink.
  • Add a frame to the buffer source.
  • Add a frame to the buffer source.
  • Close the buffer source after EOF.
  • Get the number of failed requests.
  • Allocate a new AVBufferSrcParameters instance. It should be freed by the caller with av_free().
  • Initialize the buffersrc or abuffersrc filter with the provided parameters. This function may be called multiple times, the later calls override the previous ones. Some of the parameters may also be set through AVOptions, then whatever method is used last takes precedence.
  • Add a frame to the buffer source.
  • Non-inlined equivalent of av_mallocz_array().
  • Allocate an AVCAMELLIA context To free the struct: av_free(ptr)
  • Encrypt or decrypt a buffer using a previously initialized context
  • Initialize an AVCAMELLIA context.
  • Allocate an AVCAST5 context To free the struct: av_free(ptr)
  • Encrypt or decrypt a buffer using a previously initialized context, ECB mode only
  • Encrypt or decrypt a buffer using a previously initialized context
  • Initialize an AVCAST5 context.
  • Get the channel with the given index in channel_layout.
  • @return the AVChromaLocation value for name or an AVError if not found.
  • @return the name for provided chroma location or NULL if unknown.
  • Get the AVCodecID for the given codec tag tag. If no codec id is found returns AV_CODEC_ID_NONE.
  • Accessors for some AVCodecContext fields. These used to be provided for ABI compatibility, and do not need to be used anymore.
  • Get the codec tag for the given codec id id. If no codec tag is found returns 0.
  • Get the codec tag for the given codec id.
  • @return a non-zero number if codec is a decoder, zero otherwise
  • @return a non-zero number if codec is an encoder, zero otherwise
  • Iterate over all registered codecs.
  • If c is NULL, returns the first registered codec, if c is non-NULL, returns the next registered codec after c, or NULL if c is the last one.
  • @return the AVColorPrimaries value for name or an AVError if not found.
  • @return the name for provided color primaries or NULL if unknown.
  • @return the AVColorRange value for name or an AVError if not found.
  • @return the name for provided color range or NULL if unknown.
  • @return the AVColorSpace value for name or an AVError if not found.
  • @return the name for provided color space or NULL if unknown.
  • @return the AVColorTransferCharacteristic value for name or an AVError if not found.
  • @return the name for provided color transfer or NULL if unknown.
  • Compare the remainders of two integer operands divided by a common divisor.
  • Compare two timestamps each in its own time base.
  • Copy packet, including contents
  • Copy packet side data
  • Allocate a CPB properties structure and initialize its fields to default values.
  • @return the number of logical CPU cores present.
  • Get the maximum data alignment that may be required by FFmpeg.
  • Calculate the CRC of a block. @param crc CRC of previous blocks if any or initial value for CRC @return CRC updated with the data from the given block
  • Get an initialized standard CRC table. @param crc_id ID of a standard CRC @return a pointer to the CRC table or NULL on failure
  • Initialize a CRC table. @param ctx must be an array of size sizeof(AVCRC)*257 or sizeof(AVCRC)*1024 @param le If 1, the lowest bit represents the coefficient for the highest exponent of the corresponding polynomial (both for poly and actual CRC). If 0, you must swap the CRC parameter and the result of av_crc if you need the standard representation (can be simplified in most cases to e.g. bswap16): av_bswap32(crc << (32-bits)) @param bits number of bits for the CRC @param poly generator polynomial without the x**bits coefficient, in the representation as specified by le @param ctx_size size of ctx in bytes @return <0 on failure
  • Convert a double precision floating point number to a rational.
  • Convert a number to an av_malloced string. @deprecated use av_asprintf() with “%f” or a more specific format
  • Set up DCT.
  • Return the context name
  • Iterate over all registered demuxers.
  • @deprecated Use an AVDictionary to pass options to a demuxer.
  • Copy entries from one AVDictionary struct into another. @param dst pointer to a pointer to a AVDictionary struct. If *dst is NULL, this function will allocate a struct for you and put it in *dst @param src pointer to source AVDictionary struct @param flags flags to use when setting entries in *dst @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag @return 0 on success, negative AVERROR code on failure. If dst was allocated by this function, callers should free the associated memory.
  • Get number of entries in dictionary.
  • Free all the memory allocated for an AVDictionary struct and all keys and values.
  • Get a dictionary entry with matching key.
  • Get dictionary entries as a string.
  • Parse the key/value pairs list and add the parsed entries to a dictionary.
  • Set the given entry in *pm, overwriting an existing entry.
  • Convenience wrapper for av_dict_set that converts the value to a string and stores it.
  • Thread safe dirname. @param path the string to parse, on DOS both \ and / are considered separators. @return A pointer to a string that’s the parent directory of path. If path is a NULL pointer or points to an empty string, a pointer to a string “.” is returned. @note the function may modify the contents of the path, so copies should be passed.
  • Flip the input matrix horizontally and/or vertically.
  • Extract the rotation component of the transformation matrix.
  • Initialize a transformation matrix describing a pure counterclockwise rotation by the specified angle (in degrees).
  • Divide one rational by another. @param b First rational @param c Second rational @return b/c
  • Get a frame’s AV_FRAME_DATA_DOWNMIX_INFO side data for editing.
  • Print detailed information about the input or output format, such as duration, bitrate, streams, container, programs, metadata, side data, codec and time base.
  • @warning This is a hack - the packet memory allocation stuff is broken. The packet is allocated if it was not really allocated.
  • Get a DV profile for the provided stream parameters.
  • Get a DV profile for the provided stream parameters. The frame rate is used as a best-effort parameter.
  • Get a DV profile for the provided compressed frame.
  • Add an element of size elem_size to a dynamic array.
  • Add the pointer to an element to a dynamic array.
  • Add an element to a dynamic array.
  • Escape string in src, and put the escaped string in an allocated string in *dst, which must be freed with av_free().
  • Track the presence of user provided functions and their number of occurrences in a parsed expression.
  • Track the presence of variables and their number of occurrences in a parsed expression
  • Evaluate a previously parsed expression.
  • Free a parsed expression previously created with av_expr_parse().
  • Parse an expression.
  • Parse and evaluate an expression. Note, this is significantly slower than av_expr_eval().
  • Allocate a buffer, reusing the given one if large enough.
  • Allocate and clear a buffer, reusing the given one if large enough.
  • Same behaviour av_fast_malloc but the buffer has additional AV_INPUT_BUFFER_PADDING_SIZE at the end which will always be 0.
  • Same behaviour av_fast_padded_malloc except that buffer will always be 0-initialized after call.
  • Reallocate the given buffer if it is not large enough, otherwise do nothing.
  • Do a complex FFT with the parameters defined in av_fft_init(). The input data must be permuted before. No 1.0/sqrt(n) normalization is done.
  • Set up a complex FFT. @param nbits log2 of the length of the input array @param inverse if 0 perform the forward transform, if 1 perform the inverse
  • Do the permutation needed BEFORE calling ff_fft_calc().
  • Initialize an AVFifoBuffer. @param size of FIFO @return AVFifoBuffer or NULL in case of memory allocation failure
  • Initialize an AVFifoBuffer. @param nmemb number of elements @param size size of the single element @return AVFifoBuffer or NULL in case of memory allocation failure
  • Read and discard the specified amount of data from an AVFifoBuffer. @param f AVFifoBuffer to read from @param size amount of data to read in bytes
  • Free an AVFifoBuffer. @param f AVFifoBuffer to free
  • Free an AVFifoBuffer and reset pointer to NULL. @param f AVFifoBuffer to free
  • Feed data from an AVFifoBuffer to a user-supplied callback. Similar as av_fifo_gereric_read but without discarding data. @param f AVFifoBuffer to read from @param buf_size number of bytes to read @param func generic read function @param dest data destination
  • Feed data at specific position from an AVFifoBuffer to a user-supplied callback. Similar as av_fifo_gereric_read but without discarding data. @param f AVFifoBuffer to read from @param offset offset from current read position @param buf_size number of bytes to read @param func generic read function @param dest data destination
  • Feed data from an AVFifoBuffer to a user-supplied callback. @param f AVFifoBuffer to read from @param buf_size number of bytes to read @param func generic read function @param dest data destination
  • Feed data from a user-supplied callback to an AVFifoBuffer. @param f AVFifoBuffer to write to @param src data source; non-const since it may be used as a modifiable context by the function defined in func @param size number of bytes to write @param func generic write function; the first parameter is src, the second is dest_buf, the third is dest_buf_size. func must return the number of bytes written to dest_buf, or <= 0 to indicate no more data available to write. If func is NULL, src is interpreted as a simple byte array for source data. @return the number of bytes written to the FIFO
  • Enlarge an AVFifoBuffer. In case of reallocation failure, the old FIFO is kept unchanged. The new fifo size may be larger than the requested size.
  • Resize an AVFifoBuffer. In case of reallocation failure, the old FIFO is kept unchanged.
  • Reset the AVFifoBuffer to the state right after av_fifo_alloc, in particular it is emptied. @param f AVFifoBuffer to reset
  • Return the amount of data in bytes in the AVFifoBuffer, that is the amount of data you can read from it. @param f AVFifoBuffer to read from @return size
  • Return the amount of space in bytes in the AVFifoBuffer, that is the amount of data you can write into it. @param f AVFifoBuffer to write into @return size
  • Read the file with name filename, and put its content in a newly allocated buffer or map it with mmap() when available. In case of success set *bufptr to the read or mmapped buffer, and *size to the size in bytes of the buffer in *bufptr. Unlike mmap this function succeeds with zero sized files, in this case *bufptr will be set to NULL and *size will be set to 0. The returned buffer must be released with av_file_unmap().
  • Unmap or free the buffer bufptr created by av_file_map().
  • Check whether filename actually is a numbered sequence generator.
  • Iterate over all registered filters.
  • Compute what kind of losses will occur when converting from one specific pixel format to another. When converting from one pixel format to another, information loss may occur. For example, when converting from RGB24 to GRAY, the color information will be lost. Similarly, other losses occur when converting from some formats to other formats. These losses can involve loss of chroma, but also loss of resolution, loss of color depth, loss due to the color space conversion, loss of the alpha bits or loss due to color quantization. av_get_fix_fmt_loss() informs you about the various types of losses which will occur when converting from one pixel format to another.
  • Find the “best” stream in the file. The best stream is determined according to various heuristics as the most likely to be what the user expects. If the decoder parameter is non-NULL, av_find_best_stream will find the default decoder for the stream’s codec; streams for which no decoder can be found are ignored.
  • Attempt to find a specific tag in a URL.
  • Find AVInputFormat based on the short name of the input format.
  • Find the value in a list of rationals nearest a given reference rational.
  • Find the programs which belong to a given stream.
  • Returns the method used to set ctx->duration.
  • Open a file using a UTF-8 filename. The API of this function matches POSIX fopen(), errors are returned through errno.
  • Disables cpu detection and forces the specified flags. -1 is a special case that disables forcing of specific flags.
  • Accessors for some AVFormatContext fields. These used to be provided for ABI compatibility, and do not need to be used anymore.
  • This function will cause global side data to be injected in the next packet of each stream as well as after any subsequent seek.
  • Fill the provided buffer with a string containing a FourCC (four-character code) representation.
  • Allocate an AVFrame and set its fields to default values. The resulting struct must be freed using av_frame_free().
  • Crop the given video AVFrame according to its crop_left/crop_top/crop_right/ crop_bottom fields. If cropping is successful, the function will adjust the data pointers and the width/height fields, and set the crop fields to 0.
  • Create a new frame that references the same data as src.
  • Copy the frame data from src to dst.
  • Copy only “metadata” fields from src to dst.
  • Free the frame and any dynamically allocated objects in it, e.g. extended_data. If the frame is reference counted, it will be unreferenced first.
  • Accessors for some AVFrame fields. These used to be provided for ABI compatibility, and do not need to be used anymore.
  • Allocate new buffer(s) for audio or video data.
  • Get the buffer reference a given data plane is stored in.
  • @return a pointer to the side data of a given type on success, NULL if there is no side data with such type in this frame.
  • Check if the frame data is writable.
  • Ensure that the frame data is writable, avoiding data copy if possible.
  • Move everything contained in src to dst and reset src.
  • Add a new side data to a frame.
  • Add a new side data to a frame from an existing AVBufferRef
  • Set up a new reference to the data described by the source frame.
  • Remove and free all side data instances of the given type.
  • @return a string identifying the side data type
  • Unreference all the buffers referenced by frame and reset the frame fields.
  • Free a memory block which has been allocated with a function of av_malloc() or av_realloc() family.
  • Free a packet.
  • Free a memory block which has been allocated with a function of av_malloc() or av_realloc() family, and set the pointer pointing to it to NULL.
  • Compute the greatest common divisor of two integer operands.
  • Return the best rational so that a and b are multiple of it. If the resulting denominator is larger than max_den, return def.
  • Return the planar<->packed alternative form of the given sample format, or AV_SAMPLE_FMT_NONE on error. If the passed sample_fmt is already in the requested planar/packed format, the format returned is the same as the input.
  • Return audio frame duration.
  • This function is the same as av_get_audio_frame_duration(), except it works with AVCodecParameters instead of an AVCodecContext.
  • Return the number of bits per pixel used by the pixel format described by pixdesc. Note that this is not the same as the number of bits per sample.
  • Return codec bits per sample.
  • Return number of bytes per sample.
  • Get the description of a given channel.
  • Return a channel layout id that matches name, or 0 if no match is found.
  • Get the index of a channel in channel_layout.
  • Return the number of channels in the channel layout.
  • Return a description of a channel layout. If nb_channels is <= 0, it is guessed from the channel_layout.
  • Get the name of a given channel.
  • Put a string representing the codec tag codec_tag in buf.
  • Get the name of a colorspace. @return a static string identifying the colorspace; can be NULL.
  • Return the flags which specify extensions supported by the CPU. The returned value is affected by av_force_cpu_flags() if that was used before. So av_get_cpu_flags() can easily be used in an application to detect the enabled cpu flags.
  • Return default channel layout for a given number of channels.
  • Return codec bits per sample. Only return non-zero if the bits per sample is exactly correct, not an approximation.
  • Return a channel layout and the number of channels based on the specified name.
  • Return in ‘buf’ the path with ‘%d’ replaced by a number.
  • Get the name of a color from the internal table of hard-coded named colors.
  • Return a string describing the media_type enum, NULL if media_type is unknown.
  • Get timing information for the data currently output. The exact meaning of “currently output” depends on the format. It is mostly relevant for devices that have an internal buffer and/or work in real time. @param s media file handle @param stream stream in the media file @param[out] dts DTS of the last packet output for the stream, in stream time_base units @param[out] wall absolute time when that packet whas output, in microsecond @return 0 if OK, AVERROR(ENOSYS) if the format does not support it Note: some formats or devices may not allow to measure dts and wall atomically.
  • Get the packed alternative form of the given sample format.
  • Allocate and read the payload of a packet and initialize its fields with default values.
  • Return the number of bits per pixel for the pixel format described by pixdesc, including any padding or unused bits.
  • Return the PCM codec associated with a sample format. @param be endianness, 0 for little, 1 for big, -1 (or anything else) for native @return AV_CODEC_ID_PCM_* or AV_CODEC_ID_NONE
  • Return a single letter to describe the given picture type pict_type.
  • Return the pixel format corresponding to name.
  • Compute what kind of losses will occur when converting from one specific pixel format to another. When converting from one pixel format to another, information loss may occur. For example, when converting from RGB24 to GRAY, the color information will be lost. Similarly, other losses occur when converting from some formats to other formats. These losses can involve loss of chroma, but also loss of resolution, loss of color depth, loss due to the color space conversion, loss of the alpha bits or loss due to color quantization. av_get_fix_fmt_loss() informs you about the various types of losses which will occur when converting from one pixel format to another.
  • Return the short name for a pixel format, NULL in case pix_fmt is unknown.
  • Print in buf the string corresponding to the pixel format with number pix_fmt, or a header if pix_fmt is negative.
  • Get the planar alternative form of the given sample format.
  • Return a name for the specified profile, if available.
  • Get a seed to use in conjunction with random functions. This function tries to provide a good seed at a best effort bases. Its possible to call this function multiple times if more bits are needed. It can be quite slow, which is why it should only be used as seed for a faster PRNG. The quality of the seed depends on the platform.
  • Return a sample format corresponding to name, or AV_SAMPLE_FMT_NONE on error.
  • Return the name of sample_fmt, or NULL if sample_fmt is not recognized.
  • Generate a string corresponding to the sample format with sample_fmt, or a header if sample_fmt is negative.
  • Get the value and name of a standard channel layout.
  • Return the fractional representation of the internal time base.
  • Unescape the given string until a non escaped terminating char, and return the token corresponding to the unescaped string.
  • Get the current time in microseconds.
  • Get the current time in microseconds since some unspecified starting point. On platforms that support it, the time comes from a monotonic clock This property makes this time source ideal for measuring relative time. The returned values may not be monotonic on platforms where a monotonic clock is not available.
  • Indicates with a boolean result if the av_gettime_relative() time source is monotonic.
  • Increase packet size, correctly zeroing padding
  • Guess the codec ID based upon muxer and filename.
  • Return the output format in the list of registered output formats which best matches the provided parameters, or return NULL if there is no match.
  • Guess the frame rate, based on both the container and codec information.
  • Guess the sample aspect ratio of a frame, based on both the stream and the frame aspect ratio.
  • Allocate a hash context for the algorithm specified by name.
  • Finalize a hash context and compute the actual hash value.
  • Finalize a hash context and store the Base64 representation of the actual hash value as a string.
  • Finalize a hash context and store the actual hash value in a buffer.
  • Finalize a hash context and store the hexadecimal representation of the actual hash value as a string.
  • Free hash context and set hash context pointer to NULL.
  • Get the name of the algorithm corresponding to the given hash context.
  • Get the size of the resulting hash value in bytes.
  • Initialize or reset a hash context.
  • Get the names of available hash algorithms.
  • Send a nice hexadecimal dump of a buffer to the specified file stream.
  • Send a nice hexadecimal dump of a buffer to the log.
  • Allocate an AVHMAC context. @param type The hash function used for the HMAC.
  • Hash an array of data with a key. @param ctx The HMAC context @param data The data to hash @param len The length of the data, in bytes @param key The authentication key @param keylen The length of the key, in bytes @param out The output buffer to write the digest into @param outlen The length of the out buffer, in bytes @return The number of bytes written to out, or a negative error code.
  • Finish hashing and output the HMAC digest. @param ctx The HMAC context @param out The output buffer to write the digest into @param outlen The length of the out buffer, in bytes @return The number of bytes written to out, or a negative error code.
  • Free an AVHMAC context. @param ctx The context to free, may be NULL
  • Initialize an AVHMAC context with an authentication key. @param ctx The HMAC context @param key The authentication key @param keylen The length of the key, in bytes
  • Hash data with the HMAC. @param ctx The HMAC context @param data The data to hash @param len The length of the data, in bytes
  • If hwaccel is NULL, returns the first registered hardware accelerator, if hwaccel is non-NULL, returns the next registered hardware accelerator after hwaccel, or NULL if hwaccel is the last one.
  • Allocate an AVHWDeviceContext for a given hardware type.
  • Open a device of the specified type and create an AVHWDeviceContext for it.
  • Create a new device of the specified type from an existing device.
  • Create a new device of the specified type from an existing device.
  • Finalize the device context before use. This function must be called after the context is filled with all the required information and before it is used in any way.
  • Look up an AVHWDeviceType by name.
  • Get the constraints on HW frames given a device and the HW-specific configuration to be used with that device. If no HW-specific configuration is provided, returns the maximum possible capabilities of the device.
  • Get the string name of an AVHWDeviceType.
  • Allocate a HW-specific configuration structure for a given HW device. After use, the user must free all members as required by the specific hardware structure being used, then free the structure itself with av_free().
  • Iterate over supported device types.
  • Free an AVHWFrameConstraints structure.
  • Allocate an AVHWFramesContext tied to a given device context.
  • Create and initialise an AVHWFramesContext as a mapping of another existing AVHWFramesContext on a different device.
  • Finalize the context before use. This function must be called after the context is filled with all the required information and before it is attached to any frames.
  • Allocate a new frame attached to the given AVHWFramesContext.
  • Map a hardware frame.
  • Copy data to or from a hw surface. At least one of dst/src must have an AVHWFramesContext attached.
  • Get a list of possible source or target formats usable in av_hwframe_transfer_data().
  • If f is NULL, returns the first registered input format, if f is non-NULL, returns the next registered input format after f or NULL if f is the last one.
  • Allocate an image with size w and h and pixel format pix_fmt, and fill pointers and linesizes accordingly. The allocated image buffer has to be freed by using av_freep(&pointers[0]).
  • Check if the given sample aspect ratio of an image is valid.
  • Check if the given dimension of an image is valid, meaning that all bytes of the image can be addressed with a signed int.
  • Check if the given dimension of an image is valid, meaning that all bytes of a plane of an image with the specified pix_fmt can be addressed with a signed int.
  • Copy image in src_data to dst_data.
  • Copy image plane from src to dst. That is, copy “height” number of lines of “bytewidth” bytes each. The first byte of each successive line is separated by *_linesize bytes.
  • Copy image data from an image into a buffer.
  • Copy image data located in uncacheable (e.g. GPU mapped) memory. Where available, this function will use special functionality for reading from such memory, which may result in greatly improved performance compared to plain av_image_copy().
  • Setup the data pointers and linesizes based on the specified image parameters and the provided array.
  • Overwrite the image data with black. This is suitable for filling a sub-rectangle of an image, meaning the padding between the right most pixel and the left most pixel on the next line will not be overwritten. For some formats, the image size might be rounded up due to inherent alignment.
  • Fill plane linesizes for an image with pixel format pix_fmt and width width.
  • Compute the max pixel step for each plane of an image with a format described by pixdesc.
  • Fill plane sizes for an image with pixel format pix_fmt and height height.
  • Fill plane data pointers for an image with pixel format pix_fmt and height height.
  • Return the size in bytes of the amount of data required to store an image with the given parameters.
  • Compute the size of an image line with format pix_fmt and width width for the plane plane.
  • Get the index for a specific timestamp.
  • Initialize optional fields of a packet with default values.
  • Audio input devices iterator.
  • Video input devices iterator.
  • Compute the length of an integer list.
  • Write a packet to an output media file ensuring correct interleaving.
  • Write an uncoded frame to an output media file.
  • Seed the state of the ALFG using binary data.
  • Register a user provided lock manager supporting the operations specified by AVLockOp. The “mutex” argument to the function points to a (void *) where the lockmgr should store/get a pointer to a user allocated mutex. It is NULL upon AV_LOCK_CREATE and equal to the value left by the last call for all other ops. If the lock manager is unable to perform the op then it should leave the mutex in the same state as when it was called and return a non-zero value. However, when called with AV_LOCK_DESTROY the mutex will always be assumed to have been successfully destroyed. If av_lockmgr_register succeeds it will return a non-negative value, if it fails it will return a negative value and destroy all mutex and unregister all callbacks. av_lockmgr_register is not thread-safe, it must be called from a single thread before any calls which make use of locking are used.
  • Send the specified message to the log if the level is less than or equal to the current av_log_level. By default, all logging messages are sent to stderr. This behavior can be altered by setting a different logging callback function. @see av_log_set_callback
  • Default logging callback
  • Format a line of log the same way as the default callback. @param line buffer to receive the formatted line @param line_size size of the buffer @param print_prefix used to store whether the prefix must be printed; must point to a persistent integer initially set to 1
  • Format a line of log the same way as the default callback. @param line buffer to receive the formatted line; may be NULL if line_size is 0 @param line_size size of the buffer; at most line_size-1 characters will be written to the buffer, plus one null terminator @param print_prefix used to store whether the prefix must be printed; must point to a persistent integer initially set to 1 @return Returns a negative value if an error occurred, otherwise returns the number of characters that would have been written for a sufficiently large buffer, not including the terminating null character. If the return value is not less than line_size, it means that the log message was truncated to fit the buffer.
  • Get the current log level
  • Send the specified message to the log once with the initial_level and then with the subsequent_level. By default, all logging messages are sent to stderr. This behavior can be altered by setting a different logging callback function. @see av_log
  • Set the logging callback
  • Set the log level
  • @brief Decodes LZO 1x compressed data. @param out output buffer @param outlen size of output buffer, number of bytes left are returned here @param in input buffer @param inlen size of input buffer, number of bytes left are returned here @return 0 on success, otherwise a combination of the error flags above
  • Allocate a memory block with alignment suitable for all memory accesses (including vectors if available on the CPU).
  • Allocate a memory block for an array with av_malloc().
  • Allocate a memory block with alignment suitable for all memory accesses (including vectors if available on the CPU) and zero all the bytes of the block.
  • Allocate a memory block for an array with av_mallocz().
  • Return a positive value if the given filename has one of the given extensions, 0 otherwise.
  • Check if a name is in a list. @returns 0 if not found, or the 1 based index where it has been found in the list.
  • Match instances of a name in a comma-separated list of names. List entries are checked from the start to the end of the names list, the first match ends further processing. If an entry prefixed with ‘-’ matches, then 0 is returned. The “ALL” list entry is considered to match all names.
  • Set the maximum size that may be allocated in one block.
  • Allocate an AVMD5 context.
  • Finish hashing and output digest value.
  • Initialize MD5 hashing.
  • Overlapping memcpy() implementation.
  • Duplicate a buffer with av_malloc().
  • Multiply two rationals. @param b First rational @param c Second rational @return b*c
  • Allocate an AVMurMur3 hash context.
  • Finish hashing and output digest value.
  • Initialize or reinitialize an AVMurMur3 hash context.
  • Initialize or reinitialize an AVMurMur3 hash context with a seed.
  • Iterate over all registered muxers.
  • Find which of the two rationals is closer to another rational.
  • Allocate the payload of a packet and initialize its fields with default values.
  • If f is NULL, returns the first registered output format, if f is non-NULL, returns the next registered output format after f or NULL if f is the last one.
  • Iterate over potential AVOptions-enabled children of parent.
  • Iterate over potential AVOptions-enabled children of parent.
  • Iterate over AVOptions-enabled children of obj.
  • Copy options from src object into dest object.
  • @defgroup opt_eval_funcs Evaluating option strings @{ This group of functions can be used to evaluate option strings and get numbers out of them. They do the same thing as av_opt_set(), except the result is written into the caller-supplied pointer.
  • Look for an option in an object. Consider only options which have all the specified flags set.
  • Look for an option in an object. Consider only options which have all the specified flags set.
  • Check whether a particular flag is set in a flags field.
  • Free all allocated objects in obj.
  • Free an AVOptionRanges struct and set it to NULL.
  • @defgroup opt_get_funcs Option getting functions @{ Those functions get a value of the option with the given name from an object.
  • @param[out] out_val The returned dictionary is a copy of the actual value and must be freed with av_dict_free() by the caller
  • Extract a key-value pair from the beginning of a string.
  • Check if given option is set to its default value.
  • Check if given option is set to its default value.
  • Iterate over all AVOptions belonging to obj.
  • @} / /** Gets a pointer to the requested field in a struct. This function allows accessing a struct even when its fields are moved or renamed since the application making the access has been compiled,
  • Get a list of allowed ranges for the given option.
  • Get a default list of allowed ranges for the given option.
  • Serialize object’s options.
  • @defgroup opt_set_funcs Option setting functions @{ Those functions set the field of obj with the given name to value.
  • Set the values of all AVOption fields to their default values.
  • Set the values of all AVOption fields to their default values. Only these AVOption fields for which (opt->flags & mask) == flags will have their default applied to s.
  • Set all the options from a given dictionary on an object.
  • Set all the options from a given dictionary on an object.
  • @note Any old dictionary present is discarded and replaced with a copy of the new one. The caller still owns val is and responsible for freeing it.
  • Parse the key-value pairs list in opts. For each key=value pair found, set the value of the corresponding option in ctx.
  • Show the obj options.
  • Audio output devices iterator.
  • Video output devices iterator.
  • Wrap an existing array as a packet side data.
  • Allocate an AVPacket and set its fields to default values. The resulting struct must be freed using av_packet_free().
  • Create a new packet that references the same data as src.
  • Copy only “properties” fields from src to dst.
  • Free the packet, if the packet is reference counted, it will be unreferenced first.
  • Convenience function to free all the side data stored. All the other fields stay untouched.
  • Initialize a reference-counted packet from av_malloc()ed data.
  • Get side information from packet.
  • Ensure the data described by a given packet is reference counted.
  • Create a writable reference for the data described by a given packet, avoiding data copy if possible.
  • Move every field in src to dst and reset src.
  • Allocate new information of a packet.
  • Setup a new reference to the data described by a given packet
  • Convert valid timing fields (timestamps / durations) in a packet from one timebase to another. Timestamps with unknown values (AV_NOPTS_VALUE) will be ignored.
  • Shrink the already allocated side data buffer
  • Wipe the packet.
  • Put the RGBA values that correspond to color_string in rgba_color.
  • Parse CPU caps from a string and update the given AV_CPU_* flags based on that.
  • Parse CPU flags from a string.
  • Parse str and store the parsed ratio in q.
  • Parse timestr and return in *time a corresponding number of microseconds.
  • Parse str and store the detected values in *rate.
  • Parse str and put in width_ptr and height_ptr the detected values.
  • @return 0 if the output buffer is a subset of the input, 1 if it is allocated and must be freed @deprecated Use dump_extradata, remove_extra or extract_extradata bitstream filters instead.
  • Iterate over all registered codec parsers.
  • Parse a packet.
  • @deprecated av_image_copy() instead.
  • @deprecated unused
  • @deprecated unused
  • @return number of planes in pix_fmt, a negative AVERROR if pix_fmt is not a valid pixel format.
  • @return a pixel format descriptor for provided pixel format or NULL if this pixel format is unknown.
  • @return an AVPixelFormat id described by desc, or AV_PIX_FMT_NONE if desc is not a valid pointer to a pixel format descriptor.
  • Iterate over all pixel format descriptors known to libavutil.
  • Utility function to access log2_chroma_w log2_chroma_h from the pixel format AVPixFmtDescriptor.
  • Utility function to swap the endianness of a pixel format.
  • Send a nice dump of a packet to the specified file stream.
  • Send a nice dump of a packet to the log.
  • Like av_probe_input_buffer2() but returns 0 on success
  • Probe a bytestream to determine the input format. Each time a probe returns with a score that is too low, the probe buffer size is increased and another attempt is made. When the maximum probe size is reached, the input format with the highest score is returned.
  • Guess the file format.
  • Guess the file format.
  • Guess the file format.
  • Convert an AVRational to a IEEE 32-bit float expressed in fixed-point format.
  • Set up a real FFT. @param nbits log2 of the length of the input array @param trans the type of transform
  • Return the next frame of a stream. This function returns what is stored in the file, and does not validate that what is there are valid frames for the decoder. It will split what is stored in the file into frames and return one for each call. It will not omit invalid data between valid frames so as to give the decoder the maximum information possible for decoding.
  • Read a line from an image, and write the values of the pixel format component c to dst.
  • Pause a network-based stream (e.g. RTSP stream).
  • Start playing a network-based stream (e.g. RTSP stream) at the current position.
  • Allocate, reallocate, or free a block of memory.
  • Allocate, reallocate, or free an array.
  • Allocate, reallocate, or free a block of memory.
  • Allocate, reallocate, or free a block of memory through a pointer to a pointer.
  • Allocate, reallocate, or free an array through a pointer to a pointer.
  • Reduce a fraction.
  • Initialize libavformat and register all the muxers, demuxers and protocols. If you do not call this function, then you can select exactly which formats you want to support.
  • @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) is deprecated. Use the new bitstream filtering API (using AVBSFContext).
  • Register the hardware accelerator hwaccel.
  • Rescale a 64-bit integer with rounding to nearest.
  • Rescale a timestamp while preserving known durations.
  • Rescale a 64-bit integer by 2 rational numbers.
  • Rescale a 64-bit integer by 2 rational numbers with specified rounding.
  • Rescale a 64-bit integer with specified rounding.
  • Allocate an AVRIPEMD context.
  • Finish hashing and output digest value.
  • Initialize RIPEMD hashing.
  • Check if the sample format is planar.
  • Allocate a samples buffer for nb_samples samples, and fill data pointers and linesize accordingly. The allocated samples buffer can be freed by using av_freep(&audio_data[0]) Allocated data will be initialized to silence.
  • Allocate a data pointers array, samples buffer for nb_samples samples, and fill data pointers and linesize accordingly.
  • Copy samples from src to dst.
  • Fill plane data pointers and linesize for samples with sample format sample_fmt.
  • Get the required buffer size for the given audio parameters.
  • Fill an audio buffer with silence.
  • Generate an SDP for an RTP session.
  • Seek to the keyframe at timestamp. ‘timestamp’ in ‘stream_index’.
  • Set a mask on flags returned by av_get_cpu_flags(). This function is mainly useful for testing. Please use av_force_cpu_flags() and av_get_cpu_flags() instead which are more flexible
  • Parse the key/value pairs list in opts. For each key/value pair found, stores the value in the field in ctx that is named like the key. ctx must be an AVClass context, storing is done using AVOptions.
  • Allocate an AVSHA512 context.
  • Finish hashing and output digest value.
  • Initialize SHA-2 512 hashing.
  • Allocate an AVSHA context.
  • Finish hashing and output digest value.
  • Initialize SHA-1 or SHA-2 hashing.
  • Reduce packet size, correctly zeroing padding
  • Simplified version of strptime
  • See libc sscanf manual for more information. Locale-independent sscanf implementation.
  • Allocate an AVStereo3D structure and set its fields to default values. The resulting struct can be freed using av_freep().
  • Allocate a complete AVFrameSideData and add it to the frame.
  • Get the AVStereo3DType form a human-readable name.
  • Provide a human-readable name of a given stereo3d type.
  • Locale-independent case-insensitive compare. @note This means only ASCII-range characters are case-insensitive
  • Duplicate a string.
  • Wrap an existing array as stream side data.
  • Get the internal codec timebase from a stream.
  • Returns the pts of the last muxed packet + its duration
  • Accessors for some AVStream fields. These used to be provided for ABI compatibility, and do not need to be used anymore.
  • Get side information from stream.
  • Allocate new information from stream.
  • Put a description of the AVERROR code errnum in errbuf. In case of failure the global variable errno is set to indicate the error. Even in case of failure av_strerror() will print a generic error message indicating the errnum provided to errbuf.
  • Locale-independent strings replace. @note This means only ASCII-range characters are replace
  • Return non-zero if pfx is a prefix of str independent of case. If it is, *ptr is set to the address of the first character in str after the prefix.
  • Locate the first case-independent occurrence in the string haystack of the string needle. A zero-length string needle is considered to match at the start of haystack.
  • Append the string src to the string dst, but to a total length of no more than size - 1 bytes, and null-terminate dst.
  • Append output to a string, according to a format. Never write out of the destination buffer, and always put a terminating 0 within the buffer. @param dst destination buffer (string to which the output is appended) @param size total size of the destination buffer @param fmt printf-compatible format string, specifying how the following parameters are used @return the length of the string that would have been generated if enough space had been available
  • Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.
  • Locale-independent case-insensitive compare. @note This means only ASCII-range characters are case-insensitive
  • Duplicate a substring of a string.
  • Locate the first occurrence of the string needle in the string haystack where not more than hay_length characters are searched. A zero-length string needle is considered to match at the start of haystack.
  • Return non-zero if pfx is a prefix of str. If it is, *ptr is set to the address of the first character in str after the prefix.
  • Parse the string in numstr and return its value as a double. If the string is empty, contains only whitespaces, or does not contain an initial substring that has the expected syntax for a floating-point number, no conversion is performed. In this case, returns a value of zero and the value returned in tail is the value of numstr.
  • Split the string into several tokens which can be accessed by successive calls to av_strtok().
  • Subtract one rational from another. @param b First rational @param c Second rational @return b-c
  • 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. @deprecated as fd numbers cannot be passed saftely between libs on some platforms
  • Flush the message queue
  • Allocate a new message queue.
  • Free a message queue.
  • Return the current number of messages in the queue.
  • Receive a message from the queue.
  • Send a message on the queue.
  • Set the receiving error code.
  • Set the sending error code.
  • Set the optional free message callback function which will be called if an operation is removing messages from the queue.
  • Adjust frame number for NTSC drop frame time code.
  • Check if the timecode feature is available for the given frame rate
  • Convert sei info to SMPTE 12M binary representation.
  • Convert frame number to SMPTE 12M binary representation.
  • Init a timecode struct with the passed parameters.
  • Init a timecode struct from the passed timecode components.
  • Parse timecode representation (hh:mm:ss[:;.]ff).
  • Get the timecode string from the 25-bit timecode format (MPEG GOP format).
  • Get the timecode string from the SMPTE timecode format.
  • Get the timecode string from the SMPTE timecode format.
  • Load timecode string in buf.
  • Convert the decomposed UTC time in tm to a time_t value.
  • Allocate an AVTWOFISH context To free the struct: av_free(ptr)
  • Encrypt or decrypt a buffer using a previously initialized context
  • Initialize an AVTWOFISH context.
  • Split a URL string into components.
  • Sleep for a period of time. Although the duration is expressed in microseconds, the actual delay may be rounded to the precision of the system timer.
  • Read and decode a single UTF-8 code point (character) from the buffer in *buf, and update *buf to point to the next byte to decode.
  • Append a formatted string to a print buffer.
  • Return an informative version string. This usually is the actual release version number or a git commit description. This string has no fixed format and can change any time. It should never be parsed by code.
  • Send the specified message to the log if the level is less than or equal to the current av_log_level. By default, all logging messages are sent to stderr. This behavior can be altered by setting a different logging callback function. @see av_log_set_callback
  • Get the duration for a Vorbis packet.
  • Get the duration for a Vorbis packet.
  • Free the parser and everything associated with it.
  • Allocate and initialize the Vorbis parser using headers in the extradata.
  • Write a packet to an output media file.
  • Write the values from src to the pixel format component c of an image line.
  • Write the stream trailer to an output media file and free the file private data.
  • Write an uncoded frame to an output media file.
  • Test whether a muxer supports uncoded frame.
  • Encode extradata length to a buffer. Used by xiph codecs.
  • Allocate an AVXTEA context.
  • Encrypt or decrypt a buffer using a previously initialized context, in big endian format.
  • Initialize an AVXTEA context.
  • Encrypt or decrypt a buffer using a previously initialized context, in little endian format.
  • Initialize an AVXTEA context.
  • Modify width and height values so that they will result in a memory buffer that is acceptable for the codec if you do not use any horizontal padding.
  • Modify width and height values so that they will result in a memory buffer that is acceptable for the codec if you also ensure that all line sizes are a multiple of the respective linesize_align[i].
  • Allocate an AVCodecContext and set its fields to default values. The resulting struct should be freed with avcodec_free_context().
  • Converts swscale x/y chroma position to AVChromaLocation.
  • Close a given AVCodecContext and free all the data associated with it (but not the AVCodecContext itself).
  • Return the libavcodec build-time configuration.
  • Copy the settings of the source AVCodecContext into the destination AVCodecContext. The resulting destination codec context will be unopened, i.e. you are required to call avcodec_open2() before you can use this AVCodecContext to decode/encode video/audio data.
  • Decode the audio frame of size avpkt->size from avpkt->data into frame.
  • Decode a subtitle message. Return a negative value on error, otherwise return the number of bytes used. If no subtitle could be decompressed, got_sub_ptr is zero. Otherwise, the subtitle is stored in *sub. Note that AV_CODEC_CAP_DR1 is not available for subtitle codecs. This is for simplicity, because the performance difference is expected to be negligible and reusing a get_buffer written for video codecs would probably perform badly due to a potentially very different allocation pattern.
  • Decode the video frame of size avpkt->size from avpkt->data into picture. Some decoders may support multiple frames in a single AVPacket, such decoders would then just decode the first frame.
  • The default callback for AVCodecContext.get_buffer2(). It is made public so it can be called by custom get_buffer2() implementations for decoders without AV_CODEC_CAP_DR1 set.
  • The default callback for AVCodecContext.get_encode_buffer(). It is made public so it can be called by custom get_encode_buffer() implementations for encoders without AV_CODEC_CAP_DR1 set.
  • @return descriptor for given codec ID or NULL if no descriptor exists.
  • @return codec descriptor with the given name or NULL if no such descriptor exists.
  • Iterate over all codec descriptors known to libavcodec.
  • Encode a frame of audio.
  • Encode a frame of video.
  • Converts AVChromaLocation to swscale x/y chroma position.
  • Fill AVFrame audio data and linesize pointers.
  • @deprecated see av_find_best_pix_fmt_of_2()
  • Find the best pixel format to convert to given a certain source pixel format. When converting from one pixel format to another, information loss may occur. For example, when converting from RGB24 to GRAY, the color information will be lost. Similarly, other losses occur when converting from some formats to other formats. avcodec_find_best_pix_fmt_of_2() searches which of the given pixel formats should be used to suffer the least amount of loss. The pixel formats from which it chooses one, are determined by the pix_fmt_list parameter.
  • Find a registered decoder with a matching codec ID.
  • Find a registered decoder with the specified name.
  • Find a registered encoder with a matching codec ID.
  • Find a registered encoder with the specified name.
  • Reset the internal codec state / flush internal buffers. Should be called e.g. when seeking or when switching to a different stream.
  • Free the codec context and everything associated with it and write NULL to the provided pointer.
  • @deprecated Use av_pix_fmt_get_chroma_sub_sample
  • Get the AVClass for AVCodecContext. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options.
  • @deprecated This function should not be used, as closing and opening a codec context multiple time is not supported. A new codec context should be allocated for each new use.
  • @deprecated This function should not be used.
  • Retrieve supported hardware configurations for a codec.
  • Create and return a AVHWFramesContext with values adequate for hardware decoding. This is meant to get called from the get_format callback, and is a helper for preparing a AVHWFramesContext for AVCodecContext.hw_frames_ctx. This API is for decoding with certain hardware acceleration modes/APIs only.
  • Get the name of a codec. @return a static string identifying the codec; never NULL
  • @deprecated see av_get_pix_fmt_loss()
  • Get the AVClass for AVSubtitleRect. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options.
  • Get the type of the given codec.
  • @return a positive value if s is open (i.e. avcodec_open2() was called on it with no corresponding avcodec_close()), 0 otherwise.
  • Return the libavcodec license.
  • Initialize the AVCodecContext to use the given AVCodec. Prior to using this function the context has to be allocated with avcodec_alloc_context3().
  • Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0). The returned struct must be freed with avcodec_parameters_free().
  • Copy the contents of src to dst. Any allocated fields in dst are freed and replaced with newly allocated duplicates of the corresponding fields in src.
  • Free an AVCodecParameters instance and everything associated with it and write NULL to the supplied pointer.
  • Fill the parameters struct based on the values from the supplied codec context. Any allocated fields in par are freed and replaced with duplicates of the corresponding fields in codec.
  • Fill the codec context based on the values from the supplied codec parameters. Any allocated fields in codec that have a corresponding field in par are freed and replaced with duplicates of the corresponding field in par. Fields in codec that do not have a counterpart in par are not touched.
  • Return a value representing the fourCC code associated to the pixel format pix_fmt, or 0 if no associated fourCC code can be found.
  • Return a name for the specified profile, if available.
  • Return decoded output data from a decoder.
  • Read encoded data from the encoder.
  • @deprecated Calling this function is unnecessary.
  • @deprecated Calling this function is unnecessary.
  • Supply a raw video or audio frame to the encoder. Use avcodec_receive_packet() to retrieve buffered output packets.
  • Supply raw packet data as input to a decoder.
  • Return the LIBAVCODEC_VERSION_INT constant.
  • Send control message from application to device.
  • Initialize capabilities probing API based on AVOption API.
  • Free resources created by avdevice_capabilities_create()
  • Return the libavdevice build-time configuration.
  • Send control message from device to application.
  • Convenient function to free result of avdevice_list_devices().
  • Return the libavdevice license.
  • List devices.
  • List devices.
  • Initialize libavdevice and register all the input and output devices.
  • Return the LIBAVDEVICE_VERSION_INT constant.
  • Negotiate the media format, dimensions, etc of all inputs to a filter.
  • Return the libavfilter build-time configuration.
  • Free a filter context. This will also remove the filter from its filtergraph’s list of filters.
  • Get a filter definition matching the given name.
  • @return AVClass for AVFilterContext.
  • Allocate a filter graph.
  • Create a new filter instance in a filter graph.
  • Check validity and configure all the links and formats in the graph.
  • Create and add a filter instance into an existing graph. The filter instance is created from the filter filt and inited with the parameter args. opaque is currently ignored.
  • Dump a graph into a human-readable string representation.
  • Free a graph, destroy its links, and set *graph to NULL. If *graph is NULL, do nothing.
  • Get a filter instance identified by instance name from graph.
  • Add a graph described by a string to a graph.
  • Add a graph described by a string to a graph.
  • Add a graph described by a string to a graph.
  • Queue a command for one or more filter instances.
  • Request a frame on the oldest sink link.
  • Send a command to one or more filter instances.
  • Enable or disable automatic format conversion inside the graph.
  • Initialize a filter with the supplied dictionary of options.
  • Initialize a filter with the supplied parameters.
  • Allocate a single AVFilterInOut entry. Must be freed with avfilter_inout_free(). @return allocated AVFilterInOut on success, NULL on failure.
  • Free the supplied list of AVFilterInOut and set *inout to NULL. If *inout is NULL, do nothing.
  • Insert a filter in the middle of an existing link.
  • Return the libavfilter license.
  • Link two filters together.
  • Free the link in *link, and set its pointer to NULL.
  • Get the number of channels of a link. @deprecated Use av_buffersink_get_channels()
  • Set the closed field of a link. @deprecated applications are not supposed to mess with links, they should close the sinks.
  • Iterate over all registered filters. @return If prev is non-NULL, next registered filter after prev or NULL if prev is the last filter. If prev is NULL, return the first registered filter.
  • Get the number of elements in a NULL-terminated array of AVFilterPads (e.g. AVFilter.inputs/outputs).
  • Get the name of an AVFilterPad.
  • Get the type of an AVFilterPad.
  • Make the filter instance process a command. It is recommended to use avfilter_graph_send_command().
  • Register a filter. This is only needed if you plan to use avfilter_get_by_name later to lookup the AVFilter structure by name. A filter can still by instantiated with avfilter_graph_alloc_filter even if it is not registered.
  • Initialize the filter system. Register all builtin filters.
  • Return the LIBAVFILTER_VERSION_INT constant.
  • Allocate an AVFormatContext. avformat_free_context() can be used to free the context and everything allocated by the framework within it.
  • Allocate an AVFormatContext for an output format. avformat_free_context() can be used to free the context and everything allocated by the framework within it.
  • Close an opened input AVFormatContext. Free it and all its contents and set *s to NULL.
  • Return the libavformat build-time configuration.
  • Read packets of a media file to get stream information. This is useful for file formats with no headers such as MPEG. This function also computes the real framerate in case of MPEG-2 repeat frame mode. The logical file position is not changed by this function; examined packets may be buffered for later processing.
  • Discard all internally buffered data. This can be useful when dealing with discontinuities in the byte stream. Generally works only with formats that can resync. This includes headerless formats like MPEG-TS/TS but should also work with NUT, Ogg and in a limited way AVI for example.
  • Free an AVFormatContext and all its streams. @param s context to free
  • Get the AVClass for AVFormatContext. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options.
  • @return the table mapping MOV FourCCs for audio to AVCodecID.
  • @return the table mapping MOV FourCCs for video to libavcodec AVCodecID.
  • @return the table mapping RIFF FourCCs for audio to AVCodecID.
  • @defgroup riff_fourcc RIFF FourCCs @{ Get the tables mapping RIFF FourCCs to libavcodec AVCodecIDs. The tables are meant to be passed to av_codec_get_id()/av_codec_get_tag() as in the following code: @code uint32_t tag = MKTAG(‘H’, ‘2’, ‘6’, ‘4’); const struct AVCodecTag table[] = { avformat_get_riff_video_tags(), 0 }; enum AVCodecID id = av_codec_get_id(table, tag); @endcode / /* @return the table mapping RIFF FourCCs for video to libavcodec AVCodecID.
  • Allocate the stream private data and initialize the codec, but do not write the header. May optionally be used before avformat_write_header to initialize stream parameters before actually writing the header. If using this function, do not pass the same options to avformat_write_header.
  • Return the libavformat license.
  • Check if the stream st contained in s is matched by the stream specifier spec.
  • Undo the initialization done by avformat_network_init. Call it only once for each time you called avformat_network_init.
  • Do global initialization of network libraries. This is optional, and not recommended anymore.
  • Add a new stream to a media file.
  • Open an input stream and read the header. The codecs are not opened. The stream must be closed with avformat_close_input().
  • Test if the given container can store a codec.
  • Seek to timestamp ts. Seeking will be done so that the point from which all active streams can be presented successfully will be closest to ts and within min/max_ts. Active streams are all streams that have AVStream.discard < AVDISCARD_ALL.
  • Transfer internal timing information from one stream to another.
  • Return the LIBAVFORMAT_VERSION_INT constant.
  • Allocate the stream private data and write the stream header to an output media file.
  • Accept and allocate a client context on a server context. @param s the server context @param c the client context, must be unallocated @return >= 0 on success or a negative value corresponding to an AVERROR on failure
  • Allocate and initialize an AVIOContext for buffered I/O. It must be later freed with avio_context_free().
  • Return AVIO_FLAG_* access flags corresponding to the access permissions of the resource in url, or a negative value corresponding to an AVERROR code in case of failure. The returned access flags are masked by the value in flags.
  • Close the resource accessed by the AVIOContext s and free it. This function can only be used if s was opened by avio_open().
  • Close directory.
  • Return the written size and a pointer to the buffer. The buffer must be freed with av_free(). Padding of AV_INPUT_BUFFER_PADDING_SIZE is added to the buffer.
  • Close the resource accessed by the AVIOContext *s, free it and set the pointer pointing to it to NULL. This function can only be used if s was opened by avio_open().
  • Free the supplied IO context and everything associated with it.
  • Iterate through names of available protocols.
  • Similar to feof() but also returns nonzero on read errors. @return non zero if and only if at end of file or a read error happened when reading.
  • Return the name of the protocol that will handle the passed URL.
  • Force flushing of buffered data.
  • Free entry allocated by avio_read_dir().
  • Return the written size and a pointer to the buffer. The AVIOContext stream is left intact. The buffer must NOT be freed. No padding is added to the buffer.
  • Read a string from pb into buf. The reading will terminate when either a NULL character was encountered, maxlen bytes have been read, or nothing more can be read from pb. The result is guaranteed to be NULL-terminated, it will be truncated if buf is too small. Note that the string is not interpreted or validated in any way, it might get truncated in the middle of a sequence for multi-byte encodings.
  • Read a UTF-16 string from pb and convert it to UTF-8. The reading will terminate when either a null or invalid character was encountered or maxlen bytes have been read. @return number of bytes read (is always <= maxlen)
  • Perform one step of the protocol handshake to accept a new client. This function must be called on a client returned by avio_accept() before using it as a read/write context. It is separate from avio_accept() because it may block. A step of the handshake is defined by places where the application may decide to change the proceedings. For example, on a protocol with a request header and a reply header, each one can constitute a step because the application may use the parameters from the request to change parameters in the reply; or each individual chunk of the request can constitute a step. If the handshake is already finished, avio_handshake() does nothing and returns 0 immediately.
  • Create and initialize a AVIOContext for accessing the resource indicated by url. @note When the resource indicated by url has been opened in read+write mode, the AVIOContext can be used only for writing.
  • Create and initialize a AVIOContext for accessing the resource indicated by url. @note When the resource indicated by url has been opened in read+write mode, the AVIOContext can be used only for writing.
  • Open directory for reading.
  • Open a write only memory stream.
  • Pause and resume playing - only meaningful if using a network streaming protocol (e.g. MMS).
  • Write a NULL terminated array of strings to the context. Usually you don’t need to use this function directly but its macro wrapper, avio_print.
  • Writes a formatted string to the context. @return number of bytes written, < 0 on error.
  • Get AVClass by names of available protocols.
  • Write a NULL-terminated string. @return number of bytes written.
  • Convert an UTF-8 string to UTF-16BE and write it. @param s the AVIOContext @param str NULL-terminated UTF-8 string
  • Convert an UTF-8 string to UTF-16LE and write it. @param s the AVIOContext @param str NULL-terminated UTF-8 string
  • @name Functions for reading from AVIOContext @{
  • Read size bytes from AVIOContext into buf. @return number of bytes read or AVERROR
  • Get next directory entry.
  • Read size bytes from AVIOContext into buf. Unlike avio_read(), this is allowed to read fewer bytes than requested. The missing bytes can be read in the next call. This always tries to read at least 1 byte. Useful to reduce latency in certain cases. @return number of bytes read or AVERROR
  • Read contents of h into print buffer, up to max_size bytes, or up to EOF.
  • fseek() equivalent for AVIOContext. @return new position or AVERROR.
  • Seek to a given timestamp relative to some component stream. Only meaningful if using a network streaming protocol (e.g. MMS.).
  • Get the filesize. @return filesize or AVERROR
  • Skip given number of bytes forward @return new position or AVERROR.
  • Mark the written bytestream as a specific type.
  • @deprecated unused
  • @deprecated use av_image_fill_arrays() instead.
  • @deprecated unused
  • @deprecated use av_image_get_buffer_size() instead.
  • @deprecated use av_image_copy_to_buffer() instead.
  • Delete a resource.
  • Move or rename a resource.
  • Free all allocated data in the given subtitle struct.
  • Return the libavutil build-time configuration.
  • Return the libavutil license.
  • Return the LIBAVUTIL_VERSION_INT constant.
  • Allocate SwrContext.
  • Allocate SwrContext if needed and set/reset common parameters.
  • Generate a channel mixing matrix.
  • Closes the context so that swr_is_initialized() returns 0.
  • Configure or reconfigure the SwrContext using the information provided by the AVFrames.
  • Convert audio.
  • Convert the samples in the input AVFrame and write them to the output AVFrame.
  • Drops the specified number of output samples.
  • Free the given SwrContext and set the pointer to NULL.
  • Get the AVClass for SwrContext. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options.
  • Gets the delay the next input sample will experience relative to the next output sample.
  • Find an upper bound on the number of samples that the next swr_convert call will output, if called with in_samples of input samples. This depends on the internal state, and anything changing the internal state (like further swr_convert() calls) will may change the number of samples swr_get_out_samples() returns for the same number of input samples.
  • Initialize context after user parameters have been set. @note The context must be configured using the AVOption API.
  • Injects the specified number of silence samples.
  • Check whether an swr context has been initialized or not.
  • Convert the next timestamp from input to output timestamps are in 1/(in_sample_rate * out_sample_rate) units.
  • Set a customized input channel mapping.
  • Activate resampling compensation (“soft” compensation). This function is internally called when needed in swr_next_pts().
  • Set a customized remix matrix.
  • Return the swr build-time configuration.
  • Return the swr license.
  • Return the @ref LIBSWRESAMPLE_VERSION_INT constant.
  • Allocate and return an uninitialized vector with length coefficients.
  • Allocate an empty SwsContext. This must be filled and passed to sws_init_context(). For filling see AVOptions, options.c and sws_setColorspaceDetails().
  • Convert an 8-bit paletted frame into a frame with a color depth of 24 bits.
  • Convert an 8-bit paletted frame into a frame with a color depth of 32 bits.
  • Free the swscaler context swsContext. If swsContext is NULL, then does nothing.
  • Check if context can be reused, otherwise reallocate a new one.
  • Return a pointer to yuv<->rgb coefficients for the given colorspace suitable for sws_setColorspaceDetails().
  • @return -1 if not supported
  • Allocate and return an SwsContext. You need it to perform scaling/conversion operations using sws_scale().
  • Return a normalized Gaussian curve used to filter stuff quality = 3 is high quality, lower is lower quality.
  • Get the AVClass for swsContext. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options.
  • Initialize the swscaler context sws_context.
  • @param[in] pix_fmt the pixel format @return a positive value if an endianness conversion for pix_fmt is supported, 0 otherwise.
  • Return a positive value if pix_fmt is a supported input format, 0 otherwise.
  • Return a positive value if pix_fmt is a supported output format, 0 otherwise.
  • Scale all the coefficients of a so that their sum equals height.
  • Scale the image slice in srcSlice and put the resulting scaled slice in the image in dst. A slice is a sequence of consecutive rows in an image.
  • Scale all the coefficients of a by the scalar value.
  • @param dstRange flag indicating the while-black range of the output (1=jpeg / 0=mpeg) @param srcRange flag indicating the while-black range of the input (1=jpeg / 0=mpeg) @param table the yuv2rgb coefficients describing the output yuv space, normally ff_yuv2rgb_coeffs[x] @param inv_table the yuv2rgb coefficients describing the input yuv space, normally ff_yuv2rgb_coeffs[x] @param brightness 16.16 fixed point brightness correction @param contrast 16.16 fixed point contrast correction @param saturation 16.16 fixed point saturation correction @return -1 if not supported
  • Return the libswscale build-time configuration.
  • Return the libswscale license.
  • @defgroup libsws libswscale Color conversion and scaling library.

Type Aliases§

Unions§