Crate ffmpeg_sys[][src]

Macros

Structs

Struct to use for initializing an abuffersink context.

Buffer to print data progressively

The bitstream filter state.

Struct to use for initializing a buffersink context.

This structure contains the parameters describing the frames that will be passed to this filter.

This structure describes the bitrate properties of an encoded bitstream. It roughly corresponds to a subset the VBV parameters for MPEG-2 or HRD parameters for H.264/HEVC.

AVCodec.

main external API structure. New fields can be added to the end with minor version bumps. Removal, reordering and changes to existing fields require a major version bump. You can use AVOptions (av_opt* / av_set/get*()) to access these fields from user applications. The name string for AVOptions options matches the associated command line parameter name and can be found in libavcodec/options_table.h The AVOption/command line parameter names differ in some cases from the C structure field names for historic reasons or brevity. sizeof(AVCodecContext) must not be used outside libav*.

This struct describes the properties of a single codec described by an AVCodecID. @see avcodec_descriptor_get()

Array of pointers to hardware configurations supported by the codec, or NULL if no hardware supported. The array is terminated by a NULL pointer.

@}

This struct describes the properties of an encoded stream.

Structure describes device capabilities.

Structure describes basic parameters of the device.

List of devices.

This structure describes optional metadata relevant to a downmix procedure.

Filter definition. This defines the pads a filter contains, and all the callback functions used to interact with the filter.

An instance of a filter

A linked-list of the inputs/outputs of the filter chain.

A link between two filters. This contains pointers to the source and destination filters between which this link exists, and the indexes of the pads involved. In addition, this link also contains the parameters which have been negotiated and agreed upon between the filter, such as image dimensions, format, etc.

@defgroup lavc_hwaccel AVHWAccel

@example ffhash.c This example is a simple command line application that takes one or more arguments. It demonstrates a typical use of the hashing API with allocation, initialization, updating, and finalizing.

Context structure for the Lagged Fibonacci PRNG. The exact layout, types and content of this struct may change and should not be accessed directly. Only its sizeof() is guranteed to stay the same to allow easy instanciation.

This structure stores compressed data. It is typically exported by demuxers and then passed as input to decoders, or received as output from encoders and then passed to muxers.

Pan Scan area. This specifies the area which should be displayed. Note there may be multiple such areas for one frame.

Picture data structure.

Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes of an image. It also stores the subsampling factors and number of components.

AVProfile.

ReplayGain information (see http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1.0_specification). The size of this struct is a part of the public ABI.

Stereo 3D type: this structure describes how two videos are packed within a single video surface, with additional information as needed.

@file @brief Public header for libavutil XTEA algorithm @defgroup lavu_xtea XTEA @ingroup lavu_crypto @{

@ingroup lavc_encoding

This structure is used to share data between the FFmpeg library and the client video application. This shall be zero-allocated and available as AVCodecContext.hwaccel_context. All user members can be set once during initialization or through each AVCodecContext.get_buffer() function call. In any case, they must be valid prior to calling decoding functions.

Enums

Message types used by avdevice_app_to_dev_control_message().

Identify the syntax and semantics of the bitstream. The principle is roughly: Two decoders with the same ID can decode the same streams. Two encoders with the same ID can encode compatible streams. There may be slight deviations from the principle due to implementation details.

Message types used by avdevice_dev_to_app_control_message().

@ingroup lavc_decoding

Possible downmix types.

stage of the initialization of the link properties (dimensions, etc)

@defgroup lavu_hmac HMAC @ingroup lavu_crypto @{

Lock operation used by lockmgr

@defgroup lavc_packet AVPacket

@defgroup lavc_parsing Frame parsing @{

List of possible 3D Types

List of possible view types.

Dithering algorithms

Resampling Engines

Resampling Filter Types

@defgroup lavfi_buffersrc Buffer source API @ingroup lavfi @{

Constants

Statics

Functions

Create an AVABufferSinkParams structure.

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

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.

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 path, on DOS both \ and / are considered separators. @return pointer to the basename substring.

@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 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 / flush internal buffers.

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.

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.

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.

@return the AVChromaLocation value for name or an AVError if not found.

@return the name for provided chroma location or NULL if unknown.

Accessors for some AVCodecContext fields. These used to be provided for ABI compatibility, and do not need to be used anymore.

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

Copy packet, including contents

Copy packet side data

Allocate a CPB properties structure and initialize its fields to default values.

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 number to an av_malloced string.

Set up DCT.

Thread safe dirname. @param path the path, on DOS both \ and / are considered separators. @return the path with the separator replaced by the string terminator or “.”. @note the function may change the input string.

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

Get a frame’s AV_FRAME_DATA_DOWNMIX_INFO side data for editing.

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

Escape string in src, and put the escaped string in an allocated string in *dst, which must be freed with av_free().

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().

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.

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().

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.

Attempt to find a specific tag in a URL.

Free a packet.

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.

Put a string representing the codec tag codec_tag in buf.

Return codec bits per sample. Only return non-zero if the bits per sample is exactly correct, not an approximation.

Get the name of a color from the internal table of hard-coded named colors.

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

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.

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

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.

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

Initialize optional fields of a packet with default values.

Audio input devices iterator.

Video input devices iterator.

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.

@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

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.

Allocate an AVMD5 context.

Finish hashing and output digest value.

Initialize MD5 hashing.

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.

Allocate the payload of a packet and initialize its fields with default values.

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.

Pack a dictionary for use in side_data.

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

Unpack a dictionary from side_data.

Wipe the packet.

Put the RGBA values that correspond to color_string in rgba_color.

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 AVBitStreamFilter

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.

Set up a real FFT. @param nbits log2 of the length of the input array @param trans the type of transform

Read a line from an image, and write the values of the pixel format component c to dst.

@deprecated the old bitstream filtering API (using AVBitStreamFilterContext) is deprecated. Use the new bitstream filtering API (using AVBSFContext).

Register the hardware accelerator hwaccel.

Allocate an AVRIPEMD context.

Finish hashing and output digest value.

Initialize RIPEMD hashing.

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

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

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().

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 frame number to SMPTE 12M binary representation.

Init a timecode struct with the passed parameters.

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.

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.

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.

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 the values from src to the pixel format component c of an image line.

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

@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 decoder 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.

Get the AVClass for AVFrame. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options.

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.

Register the codec codec and initialize libavcodec.

Register all the codecs, parsers and bitstream filters which were enabled at configuration time. If you do not call this function you can select exactly which formats you want to support, by using the individual registration functions.

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 parameters args and opaque.

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.

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

Free all allocated data in the given subtitle struct.

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 Definitions

@defgroup lavu_crc32 CRC @ingroup lavu_hash CRC (Cyclic Redundancy Check) hash function implementation.

@defgroup lavc_fft FFT functions @ingroup lavc_misc

A function pointer passed to the @ref AVFilterGraph.execute callback to be executed multiple times, possibly in parallel.

A function executing multiple jobs, possibly in parallel.

Unions