World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Utility functions
+ Граф связей класса Utility functions:

Группы

 Pixel formats
 Functions for working with pixel formats.
 
 FFT functions
 

Классы

struct  AVBitStreamFilterContext
 
struct  AVBSFContext
 
struct  AVBitStreamFilter
 

Определения типов

typedef struct AVBitStreamFilterContext AVBitStreamFilterContext
 
typedef struct AVBSFInternal AVBSFInternal
 
typedef struct AVBSFContext AVBSFContext
 
typedef struct AVBitStreamFilter AVBitStreamFilter
 
typedef struct AVBSFList AVBSFList
 

Перечисления

enum  AVLockOp { AV_LOCK_CREATE, AV_LOCK_OBTAIN, AV_LOCK_RELEASE, AV_LOCK_DESTROY }
 

Функции

attribute_deprecated size_t av_get_codec_tag_string (char *buf, size_t buf_size, unsigned int codec_tag)
 
void avcodec_string (char *buf, int buf_size, AVCodecContext *enc, int encode)
 
const char * av_get_profile_name (const AVCodec *codec, int profile)
 
const char * avcodec_profile_name (enum AVCodecID codec_id, int profile)
 
int avcodec_default_execute (AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size)
 
int avcodec_default_execute2 (AVCodecContext *c, int(*func)(AVCodecContext *c2, void *arg2, int, int), void *arg, int *ret, int count)
 
int avcodec_fill_audio_frame (AVFrame *frame, int nb_channels, enum AVSampleFormat sample_fmt, const uint8_t *buf, int buf_size, int align)
 
void avcodec_flush_buffers (AVCodecContext *avctx)
 
int av_get_bits_per_sample (enum AVCodecID codec_id)
 
enum AVCodecID av_get_pcm_codec (enum AVSampleFormat fmt, int be)
 
int av_get_exact_bits_per_sample (enum AVCodecID codec_id)
 
int av_get_audio_frame_duration (AVCodecContext *avctx, int frame_bytes)
 
int av_get_audio_frame_duration2 (AVCodecParameters *par, int frame_bytes)
 
attribute_deprecated void av_register_bitstream_filter (AVBitStreamFilter *bsf)
 
attribute_deprecated AVBitStreamFilterContextav_bitstream_filter_init (const char *name)
 
attribute_deprecated int av_bitstream_filter_filter (AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe)
 
attribute_deprecated void av_bitstream_filter_close (AVBitStreamFilterContext *bsf)
 
const attribute_deprecated AVBitStreamFilterav_bitstream_filter_next (const AVBitStreamFilter *f)
 
const AVBitStreamFilterav_bsf_get_by_name (const char *name)
 
const AVBitStreamFilterav_bsf_iterate (void **opaque)
 
const attribute_deprecated AVBitStreamFilterav_bsf_next (void **opaque)
 
int av_bsf_alloc (const AVBitStreamFilter *filter, AVBSFContext **ctx)
 
int av_bsf_init (AVBSFContext *ctx)
 
int av_bsf_send_packet (AVBSFContext *ctx, AVPacket *pkt)
 
int av_bsf_receive_packet (AVBSFContext *ctx, AVPacket *pkt)
 
void av_bsf_flush (AVBSFContext *ctx)
 
void av_bsf_free (AVBSFContext **ctx)
 
const AVClassav_bsf_get_class (void)
 
AVBSFListav_bsf_list_alloc (void)
 
void av_bsf_list_free (AVBSFList **lst)
 
int av_bsf_list_append (AVBSFList *lst, AVBSFContext *bsf)
 
int av_bsf_list_append2 (AVBSFList *lst, const char *bsf_name, AVDictionary **options)
 
int av_bsf_list_finalize (AVBSFList **lst, AVBSFContext **bsf)
 
int av_bsf_list_parse_str (const char *str, AVBSFContext **bsf)
 
int av_bsf_get_null_filter (AVBSFContext **bsf)
 
void av_fast_padded_malloc (void *ptr, unsigned int *size, size_t min_size)
 
void av_fast_padded_mallocz (void *ptr, unsigned int *size, size_t min_size)
 
unsigned int av_xiphlacing (unsigned char *s, unsigned int v)
 
attribute_deprecated void av_register_hwaccel (AVHWAccel *hwaccel)
 
attribute_deprecated AVHWAccelav_hwaccel_next (const AVHWAccel *hwaccel)
 
attribute_deprecated int av_lockmgr_register (int(*cb)(void **mutex, enum AVLockOp op))
 
enum AVMediaType avcodec_get_type (enum AVCodecID codec_id)
 
const char * avcodec_get_name (enum AVCodecID id)
 
int avcodec_is_open (AVCodecContext *s)
 
int av_codec_is_encoder (const AVCodec *codec)
 
int av_codec_is_decoder (const AVCodec *codec)
 
const AVCodecDescriptoravcodec_descriptor_get (enum AVCodecID id)
 
const AVCodecDescriptoravcodec_descriptor_next (const AVCodecDescriptor *prev)
 
const AVCodecDescriptoravcodec_descriptor_get_by_name (const char *name)
 
AVCPBPropertiesav_cpb_properties_alloc (size_t *size)
 

Подробное описание

Miscellaneous utility functions related to both encoding and decoding (or neither).

Типы

◆ AVBitStreamFilterContext

◆ AVBSFInternal

typedef struct AVBSFInternal AVBSFInternal

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

См. определение в файле avcodec.h строка 5751

◆ AVBSFContext

typedef struct AVBSFContext AVBSFContext

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

The bitstream filter state.

This struct must be allocated with av_bsf_alloc() and freed with av_bsf_free().

The fields in the struct will only be changed (by the caller or by the filter) as described in their documentation, and are to be considered immutable otherwise.

◆ AVBitStreamFilter

◆ AVBSFList

typedef struct AVBSFList AVBSFList

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Structure for chain/list of bitstream filters. Empty list can be allocated by av_bsf_list_alloc().

См. определение в файле avcodec.h строка 5995

Перечисления

◆ AVLockOp

enum AVLockOp

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Lock operation used by lockmgr

Уст.:
Deprecated together with av_lockmgr_register().
Элементы перечислений
AV_LOCK_CREATE 

Create a mutex.

AV_LOCK_OBTAIN 

Lock the mutex.

AV_LOCK_RELEASE 

Unlock the mutex.

AV_LOCK_DESTROY 

Free mutex resources.

См. определение в файле avcodec.h строка 6129

6129  {
6130  AV_LOCK_CREATE,
6131  AV_LOCK_OBTAIN,
6132  AV_LOCK_RELEASE,
6133  AV_LOCK_DESTROY,
6134 };

Функции

◆ av_get_codec_tag_string()

attribute_deprecated size_t av_get_codec_tag_string ( char *  buf,
size_t  buf_size,
unsigned int  codec_tag 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Put a string representing the codec tag codec_tag in buf.

Аргументы
bufbuffer to place codec tag in
buf_sizesize in bytes of buf
codec_tagcodec tag to assign
Возвращает
the length of the string that would have been generated if enough space had been available, excluding the trailing null
Уст.:
see av_fourcc_make_string() and av_fourcc2str().

◆ avcodec_string()

void avcodec_string ( char *  buf,
int  buf_size,
AVCodecContext enc,
int  encode 
)

◆ av_get_profile_name()

const char* av_get_profile_name ( const AVCodec codec,
int  profile 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Return a name for the specified profile, if available.

Аргументы
codecthe codec that is searched for the given profile
profilethe profile value for which a name is requested
Возвращает
A name for the profile if found, NULL otherwise.

◆ avcodec_profile_name()

const char* avcodec_profile_name ( enum AVCodecID  codec_id,
int  profile 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Return a name for the specified profile, if available.

Аргументы
codec_idthe ID of the codec to which the requested profile belongs
profilethe profile value for which a name is requested
Возвращает
A name for the profile if found, NULL otherwise.
Заметки
unlike av_get_profile_name(), which searches a list of profiles supported by a specific decoder or encoder implementation, this function searches the list of profiles from the AVCodecDescriptor

◆ avcodec_default_execute()

int avcodec_default_execute ( AVCodecContext c,
int(*)(AVCodecContext *c2, void *arg2 func,
void arg,
int *  ret,
int  count,
int  size 
)

◆ avcodec_default_execute2()

int avcodec_default_execute2 ( AVCodecContext c,
int(*)(AVCodecContext *c2, void *arg2, int, int)  func,
void arg,
int *  ret,
int  count 
)

◆ avcodec_fill_audio_frame()

int avcodec_fill_audio_frame ( AVFrame frame,
int  nb_channels,
enum AVSampleFormat  sample_fmt,
const uint8_t buf,
int  buf_size,
int  align 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Fill AVFrame audio data and linesize pointers.

The buffer buf must be a preallocated buffer with a size big enough to contain the specified samples amount. The filled AVFrame data pointers will point to this buffer.

AVFrame extended_data channel pointers are allocated if necessary for planar audio.

Аргументы
framethe AVFrame frame->nb_samples must be set prior to calling the function. This function fills in frame->data, frame->extended_data, frame->linesize[0].
nb_channelschannel count
sample_fmtsample format
bufbuffer to use for frame data
buf_sizesize of buffer
alignplane size sample alignment (0 = default)
Возвращает
>=0 on success, negative error code on failure
Необходимо сделать:
return the size in bytes required to store the samples in case of success, at the next libavutil bump

◆ avcodec_flush_buffers()

void avcodec_flush_buffers ( AVCodecContext avctx)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Reset the internal decoder state / flush internal buffers. Should be called e.g. when seeking or when switching to a different stream.

Заметки
when refcounted frames are not used (i.e. avctx->refcounted_frames is 0), this invalidates the frames previously returned from the decoder. When refcounted frames are used, the decoder just releases any references it might keep internally, but the caller's reference remains valid.

Используется в AVStreamWrapper::reset().

+ Граф вызова функции:

◆ av_get_bits_per_sample()

int av_get_bits_per_sample ( enum AVCodecID  codec_id)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Return codec bits per sample.

Аргументы
[in]codec_idthe codec
Возвращает
Number of bits per sample or zero if unknown for the given codec.

◆ av_get_pcm_codec()

enum AVCodecID av_get_pcm_codec ( enum AVSampleFormat  fmt,
int  be 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Return the PCM codec associated with a sample format.

Аргументы
beendianness, 0 for little, 1 for big, -1 (or anything else) for native
Возвращает
AV_CODEC_ID_PCM_* or AV_CODEC_ID_NONE

◆ av_get_exact_bits_per_sample()

int av_get_exact_bits_per_sample ( enum AVCodecID  codec_id)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

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

Аргументы
[in]codec_idthe codec
Возвращает
Number of bits per sample or zero if unknown for the given codec.

◆ av_get_audio_frame_duration()

int av_get_audio_frame_duration ( AVCodecContext avctx,
int  frame_bytes 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Return audio frame duration.

Аргументы
avctxcodec context
frame_bytessize of the frame, or 0 if unknown
Возвращает
frame duration, in samples, if known. 0 if not able to determine.

◆ av_get_audio_frame_duration2()

int av_get_audio_frame_duration2 ( AVCodecParameters par,
int  frame_bytes 
)

◆ av_register_bitstream_filter()

attribute_deprecated void av_register_bitstream_filter ( AVBitStreamFilter bsf)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Уст.:
the old bitstream filtering API (using AVBitStreamFilterContext) is deprecated. Use the new bitstream filtering API (using AVBSFContext).

◆ av_bitstream_filter_init()

attribute_deprecated AVBitStreamFilterContext* av_bitstream_filter_init ( const char *  name)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Уст.:
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).

◆ av_bitstream_filter_filter()

attribute_deprecated int av_bitstream_filter_filter ( AVBitStreamFilterContext bsfc,
AVCodecContext avctx,
const char *  args,
uint8_t **  poutbuf,
int *  poutbuf_size,
const uint8_t buf,
int  buf_size,
int  keyframe 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Уст.:
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).

◆ av_bitstream_filter_close()

attribute_deprecated void av_bitstream_filter_close ( AVBitStreamFilterContext bsf)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Уст.:
the old bitstream filtering API (using AVBitStreamFilterContext) is deprecated. Use av_bsf_free() from the new bitstream filtering API (using AVBSFContext).

◆ av_bitstream_filter_next()

const attribute_deprecated AVBitStreamFilter* av_bitstream_filter_next ( const AVBitStreamFilter f)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Уст.:
the old bitstream filtering API (using AVBitStreamFilterContext) is deprecated. Use av_bsf_iterate() from the new bitstream filtering API (using AVBSFContext).

◆ av_bsf_get_by_name()

const AVBitStreamFilter* av_bsf_get_by_name ( const char *  name)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Возвращает
a bitstream filter with the specified name or NULL if no such bitstream filter exists.

◆ av_bsf_iterate()

const AVBitStreamFilter* av_bsf_iterate ( void **  opaque)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Iterate over all registered bitstream filters.

Аргументы
opaquea pointer where libavcodec will store the iteration state. Must point to NULL to start the iteration.
Возвращает
the next registered bitstream filter or NULL when the iteration is finished

◆ av_bsf_next()

◆ av_bsf_alloc()

int av_bsf_alloc ( const AVBitStreamFilter filter,
AVBSFContext **  ctx 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

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.

Аргументы
filterthe filter for which to allocate an instance.
ctxa pointer into which the pointer to the newly-allocated context will be written. It must be freed with av_bsf_free() after the filtering is done.
Возвращает
0 on success, a negative AVERROR code on failure

◆ av_bsf_init()

int av_bsf_init ( AVBSFContext ctx)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Prepare the filter for use, after all the parameters and options have been set.

◆ av_bsf_send_packet()

int av_bsf_send_packet ( AVBSFContext ctx,
AVPacket pkt 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Submit a packet for filtering.

After sending each packet, the filter must be completely drained by calling av_bsf_receive_packet() repeatedly until it returns AVERROR(EAGAIN) or AVERROR_EOF.

Аргументы
pktthe packet to filter. The bitstream filter will take ownership of the packet and reset the contents of pkt. pkt is not touched if an error occurs. This parameter may be NULL, which signals the end of the stream (i.e. no more packets will be sent). That will cause the filter to output any packets it may have buffered internally.
Возвращает
0 on success, a negative AVERROR on error.

◆ av_bsf_receive_packet()

int av_bsf_receive_packet ( AVBSFContext ctx,
AVPacket pkt 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Retrieve a filtered packet.

Аргументы
[out]pktthis struct will be filled with the contents of the filtered packet. It is owned by the caller and must be freed using av_packet_unref() when it is no longer needed. This parameter should be "clean" (i.e. freshly allocated with av_packet_alloc() or unreffed with av_packet_unref()) when this function is called. If this function returns successfully, the contents of pkt will be completely overwritten by the returned data. On failure, pkt is not touched.
Возвращает
0 on success. AVERROR(EAGAIN) if more packets need to be sent to the filter (using av_bsf_send_packet()) to get more output. AVERROR_EOF if there will be no further output from the filter. Another negative AVERROR value if an error occurs.
Заметки
one input packet may result in several output packets, so after sending a packet with av_bsf_send_packet(), this function needs to be called repeatedly until it stops returning 0. It is also possible for a filter to output fewer packets than were sent to it, so this function may return AVERROR(EAGAIN) immediately after a successful av_bsf_send_packet() call.

◆ av_bsf_flush()

void av_bsf_flush ( AVBSFContext ctx)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Reset the internal bitstream filter state / flush internal buffers.

◆ av_bsf_free()

void av_bsf_free ( AVBSFContext **  ctx)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Free a bitstream filter context and everything associated with it; write NULL into the supplied pointer.

◆ av_bsf_get_class()

const AVClass* av_bsf_get_class ( void  )

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

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

См. также
av_opt_find().

◆ av_bsf_list_alloc()

AVBSFList* av_bsf_list_alloc ( void  )

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Allocate empty list of bitstream filters. The list must be later freed by av_bsf_list_free() or finalized by av_bsf_list_finalize().

Возвращает
Pointer to AVBSFList on success, NULL in case of failure

◆ av_bsf_list_free()

void av_bsf_list_free ( AVBSFList **  lst)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Free list of bitstream filters.

Аргументы
lstPointer to pointer returned by av_bsf_list_alloc()

◆ av_bsf_list_append()

int av_bsf_list_append ( AVBSFList lst,
AVBSFContext bsf 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Append bitstream filter to the list of bitstream filters.

Аргументы
lstList to append to
bsfFilter context to be appended
Возвращает
>=0 on success, negative AVERROR in case of failure

◆ av_bsf_list_append2()

int av_bsf_list_append2 ( AVBSFList lst,
const char *  bsf_name,
AVDictionary **  options 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Construct new bitstream filter context given it's name and options and append it to the list of bitstream filters.

Аргументы
lstList to append to
bsf_nameName of the bitstream filter
optionsOptions for the bitstream filter, can be set to NULL
Возвращает
>=0 on success, negative AVERROR in case of failure

◆ av_bsf_list_finalize()

int av_bsf_list_finalize ( AVBSFList **  lst,
AVBSFContext **  bsf 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Finalize list of bitstream filters.

This function will transform AVBSFList to single AVBSFContext, so the whole chain of bitstream filters can be treated as single filter freshly allocated by av_bsf_alloc(). If the call is successful, AVBSFList structure is freed and lst will be set to NULL. In case of failure, caller is responsible for freeing the structure by av_bsf_list_free()

Аргументы
lstFilter list structure to be transformed
[out]bsfPointer to be set to newly created AVBSFContext structure representing the chain of bitstream filters
Возвращает
>=0 on success, negative AVERROR in case of failure

◆ av_bsf_list_parse_str()

int av_bsf_list_parse_str ( const char *  str,
AVBSFContext **  bsf 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Parse string describing list of bitstream filters and create single AVBSFContext describing the whole chain of bitstream filters. Resulting AVBSFContext can be treated as any other AVBSFContext freshly allocated by av_bsf_alloc().

Аргументы
strString describing chain of bitstream filters in format bsf1[=opt1=val1:opt2=val2][,bsf2]
[out]bsfPointer to be set to newly created AVBSFContext structure representing the chain of bitstream filters
Возвращает
>=0 on success, negative AVERROR in case of failure

◆ av_bsf_get_null_filter()

int av_bsf_get_null_filter ( AVBSFContext **  bsf)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Get null/pass-through bitstream filter.

Аргументы
[out]bsfPointer to be set to new instance of pass-through bitstream filter
Возвращает

◆ av_fast_padded_malloc()

void av_fast_padded_malloc ( void ptr,
unsigned int *  size,
size_t  min_size 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Same behaviour av_fast_malloc but the buffer has additional AV_INPUT_BUFFER_PADDING_SIZE at the end which will always be 0.

In addition the whole buffer will initially and after resizes be 0-initialized so that no uninitialized data will ever appear.

◆ av_fast_padded_mallocz()

void av_fast_padded_mallocz ( void ptr,
unsigned int *  size,
size_t  min_size 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Same behaviour av_fast_padded_malloc except that buffer will always be 0-initialized after call.

◆ av_xiphlacing()

unsigned int av_xiphlacing ( unsigned char *  s,
unsigned int  v 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Encode extradata length to a buffer. Used by xiph codecs.

Аргументы
sbuffer to write to; must be at least (v/255+1) bytes long
vsize of extradata in bytes
Возвращает
number of bytes written to the buffer.

◆ av_register_hwaccel()

attribute_deprecated void av_register_hwaccel ( AVHWAccel hwaccel)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Register the hardware accelerator hwaccel.

Уст.:
This function doesn't do anything.

◆ av_hwaccel_next()

attribute_deprecated AVHWAccel* av_hwaccel_next ( const AVHWAccel hwaccel)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

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.

Уст.:
AVHWaccel structures contain no user-serviceable parts, so this function should not be used.

◆ av_lockmgr_register()

attribute_deprecated int av_lockmgr_register ( int(*)(void **mutex, enum AVLockOp op)  cb)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

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.

Аргументы
cbUser defined callback. av_lockmgr_register invokes calls to this callback and the previously registered callback. The callback will be used to create more than one mutex each of which must be backed by its own underlying locking mechanism (i.e. do not use a single static object to implement your lock manager). If cb is set to NULL the lockmgr will be unregistered.
Уст.:
This function does nothing, and always returns 0. Be sure to build with thread support to get basic thread safety.

◆ avcodec_get_type()

enum AVMediaType avcodec_get_type ( enum AVCodecID  codec_id)

◆ avcodec_get_name()

const char* avcodec_get_name ( enum AVCodecID  id)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Get the name of a codec.

Возвращает
a static string identifying the codec; never NULL

◆ avcodec_is_open()

int avcodec_is_open ( AVCodecContext s)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Возвращает
a positive value if s is open (i.e. avcodec_open2() was called on it with no corresponding avcodec_close()), 0 otherwise.

◆ av_codec_is_encoder()

int av_codec_is_encoder ( const AVCodec codec)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Возвращает
a non-zero number if codec is an encoder, zero otherwise

◆ av_codec_is_decoder()

int av_codec_is_decoder ( const AVCodec codec)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Возвращает
a non-zero number if codec is a decoder, zero otherwise

◆ avcodec_descriptor_get()

const AVCodecDescriptor* avcodec_descriptor_get ( enum AVCodecID  id)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Возвращает
descriptor for given codec ID or NULL if no descriptor exists.

◆ avcodec_descriptor_next()

const AVCodecDescriptor* avcodec_descriptor_next ( const AVCodecDescriptor prev)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Iterate over all codec descriptors known to libavcodec.

Аргументы
prevprevious descriptor. NULL to get the first descriptor.
Возвращает
next descriptor or NULL after the last descriptor

◆ avcodec_descriptor_get_by_name()

const AVCodecDescriptor* avcodec_descriptor_get_by_name ( const char *  name)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

Возвращает
codec descriptor with the given name or NULL if no such descriptor exists.

◆ av_cpb_properties_alloc()

AVCPBProperties* av_cpb_properties_alloc ( size_t size)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libavcodec/avcodec.h>

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

Аргументы
sizeif non-NULL, the size of the allocated struct will be written here. This is useful for embedding it in side data.
Возвращает
the newly allocated struct or NULL on failure
AV_LOCK_RELEASE
@ AV_LOCK_RELEASE
Unlock the mutex.
Definition: avcodec.h:6132
AV_LOCK_OBTAIN
@ AV_LOCK_OBTAIN
Lock the mutex.
Definition: avcodec.h:6131
AV_LOCK_CREATE
@ AV_LOCK_CREATE
Create a mutex.
Definition: avcodec.h:6130
AV_LOCK_DESTROY
@ AV_LOCK_DESTROY
Free mutex resources.
Definition: avcodec.h:6133