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

Файлы

файл  buffersrc.h
 

Классы

struct  AVBufferSrcParameters
 

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

typedef struct AVBufferSrcParameters AVBufferSrcParameters
 

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

enum  { AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT = 1, AV_BUFFERSRC_FLAG_PUSH = 4, AV_BUFFERSRC_FLAG_KEEP_REF = 8 }
 

Функции

unsigned av_buffersrc_get_nb_failed_requests (AVFilterContext *buffer_src)
 
AVBufferSrcParametersav_buffersrc_parameters_alloc (void)
 
int av_buffersrc_parameters_set (AVFilterContext *ctx, AVBufferSrcParameters *param)
 
av_warn_unused_result int av_buffersrc_write_frame (AVFilterContext *ctx, const AVFrame *frame)
 
av_warn_unused_result int av_buffersrc_add_frame (AVFilterContext *ctx, AVFrame *frame)
 
av_warn_unused_result int av_buffersrc_add_frame_flags (AVFilterContext *buffer_src, AVFrame *frame, int flags)
 
int av_buffersrc_close (AVFilterContext *ctx, int64_t pts, unsigned flags)
 

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

Типы

◆ AVBufferSrcParameters

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

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

It should be allocated with av_buffersrc_parameters_alloc() and freed with av_free(). All the allocated fields in it remain owned by the caller.

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

◆ anonymous enum

anonymous enum

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

Элементы перечислений
AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT 

Do not check for format changes.

AV_BUFFERSRC_FLAG_PUSH 

Immediately push the frame to the output.

AV_BUFFERSRC_FLAG_KEEP_REF 

Keep a reference to the frame. If the frame if reference-counted, create a new reference; otherwise copy the frame data.

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

36  {
37 
42 
47 
54 
55 };

Функции

◆ av_buffersrc_get_nb_failed_requests()

unsigned av_buffersrc_get_nb_failed_requests ( AVFilterContext buffer_src)

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

Get the number of failed requests.

A failed request is when the request_frame method is called while no frame is present in the buffer. The number is reset when a frame is added.

◆ av_buffersrc_parameters_alloc()

AVBufferSrcParameters* av_buffersrc_parameters_alloc ( void  )

◆ av_buffersrc_parameters_set()

int av_buffersrc_parameters_set ( AVFilterContext ctx,
AVBufferSrcParameters param 
)

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

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.

Аргументы
ctxan instance of the buffersrc or abuffersrc filter
paramthe stream parameters. The frames later passed to this filter must conform to those parameters. All the allocated fields in param remain owned by the caller, libavfilter will make internal copies or references when necessary.
Возвращает
0 on success, a negative AVERROR code on failure.

◆ av_buffersrc_write_frame()

av_warn_unused_result int av_buffersrc_write_frame ( AVFilterContext ctx,
const AVFrame frame 
)

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

Add a frame to the buffer source.

Аргументы
ctxan instance of the buffersrc filter
frameframe to be added. If the frame is reference counted, this function will make a new reference to it. Otherwise the frame data will be copied.
Возвращает
0 on success, a negative AVERROR on error

This function is equivalent to av_buffersrc_add_frame_flags() with the AV_BUFFERSRC_FLAG_KEEP_REF flag.

◆ av_buffersrc_add_frame()

av_warn_unused_result int av_buffersrc_add_frame ( AVFilterContext ctx,
AVFrame frame 
)

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

Add a frame to the buffer source.

Аргументы
ctxan instance of the buffersrc filter
frameframe to be added. If the frame is reference counted, this function will take ownership of the reference(s) and reset the frame. Otherwise the frame data will be copied. If this function returns an error, the input frame is not touched.
Возвращает
0 on success, a negative AVERROR on error.
Заметки
the difference between this function and av_buffersrc_write_frame() is that av_buffersrc_write_frame() creates a new reference to the input frame, while this function takes ownership of the reference passed to it.

This function is equivalent to av_buffersrc_add_frame_flags() without the AV_BUFFERSRC_FLAG_KEEP_REF flag.

◆ av_buffersrc_add_frame_flags()

av_warn_unused_result int av_buffersrc_add_frame_flags ( AVFilterContext buffer_src,
AVFrame frame,
int  flags 
)

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

Add a frame to the buffer source.

By default, if the frame is reference-counted, this function will take ownership of the reference(s) and reset the frame. This can be controlled using the flags.

If this function returns an error, the input frame is not touched.

Аргументы
buffer_srcpointer to a buffer source context
framea frame, or NULL to mark EOF
flagsa combination of AV_BUFFERSRC_FLAG_*
Возвращает
>= 0 in case of success, a negative AVERROR code in case of failure

◆ av_buffersrc_close()

int av_buffersrc_close ( AVFilterContext ctx,
int64_t  pts,
unsigned  flags 
)

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

Close the buffer source after EOF.

This is similar to passing NULL to av_buffersrc_add_frame_flags() except it takes the timestamp of the EOF, i.e. the timestamp of the end of the last frame.

AV_BUFFERSRC_FLAG_PUSH
@ AV_BUFFERSRC_FLAG_PUSH
Definition: buffersrc.h:46
AV_BUFFERSRC_FLAG_KEEP_REF
@ AV_BUFFERSRC_FLAG_KEEP_REF
Definition: buffersrc.h:53
AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT
@ AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT
Definition: buffersrc.h:41