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

Классы

struct  RcOverride
 

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

typedef struct RcOverride RcOverride
 

Функции

AVCodecavcodec_find_encoder (enum AVCodecID id)
 
AVCodecavcodec_find_encoder_by_name (const char *name)
 
attribute_deprecated int avcodec_encode_audio2 (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
 
attribute_deprecated int avcodec_encode_video2 (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
 
int avcodec_encode_subtitle (AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVSubtitle *sub)
 

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

Типы

◆ RcOverride

Функции

◆ avcodec_find_encoder()

AVCodec* avcodec_find_encoder ( enum AVCodecID  id)

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

Find a registered encoder with a matching codec ID.

Аргументы
idAVCodecID of the requested encoder
Возвращает
An encoder if one was found, NULL otherwise.

◆ avcodec_find_encoder_by_name()

AVCodec* avcodec_find_encoder_by_name ( const char *  name)

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

Find a registered encoder with the specified name.

Аргументы
namename of the requested encoder
Возвращает
An encoder if one was found, NULL otherwise.

◆ avcodec_encode_audio2()

attribute_deprecated int avcodec_encode_audio2 ( AVCodecContext avctx,
AVPacket avpkt,
const AVFrame frame,
int *  got_packet_ptr 
)

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

Encode a frame of audio.

Takes input samples from frame and writes the next output packet, if available, to avpkt. The output packet does not necessarily contain data for the most recent frame, as encoders can delay, split, and combine input frames internally as needed.

Аргументы
avctxcodec context
avpktoutput AVPacket. The user can supply an output buffer by setting avpkt->data and avpkt->size prior to calling the function, but if the size of the user-provided data is not large enough, encoding will fail. If avpkt->data and avpkt->size are set, avpkt->destruct must also be set. All other AVPacket fields will be reset by the encoder using av_init_packet(). If avpkt->data is NULL, the encoder will allocate it. The encoder will set avpkt->size to the size of the output packet.

If this function fails or produces no output, avpkt will be freed using av_packet_unref().

Аргументы
[in]frameAVFrame containing the raw audio data to be encoded. May be NULL when flushing an encoder that has the AV_CODEC_CAP_DELAY capability set. If AV_CODEC_CAP_VARIABLE_FRAME_SIZE is set, then each frame can have any number of samples. If it is not set, frame->nb_samples must be equal to avctx->frame_size for all frames except the last. The final frame may be smaller than avctx->frame_size.
[out]got_packet_ptrThis field is set to 1 by libavcodec if the output packet is non-empty, and to 0 if it is empty. If the function returns an error, the packet can be assumed to be invalid, and the value of got_packet_ptr is undefined and should not be used.
Возвращает
0 on success, negative error code on failure
Уст.:
use avcodec_send_frame()/avcodec_receive_packet() instead

◆ avcodec_encode_video2()

attribute_deprecated int avcodec_encode_video2 ( AVCodecContext avctx,
AVPacket avpkt,
const AVFrame frame,
int *  got_packet_ptr 
)

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

Encode a frame of video.

Takes input raw video data from frame and writes the next output packet, if available, to avpkt. The output packet does not necessarily contain data for the most recent frame, as encoders can delay and reorder input frames internally as needed.

Аргументы
avctxcodec context
avpktoutput AVPacket. The user can supply an output buffer by setting avpkt->data and avpkt->size prior to calling the function, but if the size of the user-provided data is not large enough, encoding will fail. All other AVPacket fields will be reset by the encoder using av_init_packet(). If avpkt->data is NULL, the encoder will allocate it. The encoder will set avpkt->size to the size of the output packet. The returned data (if any) belongs to the caller, he is responsible for freeing it.

If this function fails or produces no output, avpkt will be freed using av_packet_unref().

Аргументы
[in]frameAVFrame containing the raw video data to be encoded. May be NULL when flushing an encoder that has the AV_CODEC_CAP_DELAY capability set.
[out]got_packet_ptrThis field is set to 1 by libavcodec if the output packet is non-empty, and to 0 if it is empty. If the function returns an error, the packet can be assumed to be invalid, and the value of got_packet_ptr is undefined and should not be used.
Возвращает
0 on success, negative error code on failure
Уст.:
use avcodec_send_frame()/avcodec_receive_packet() instead

◆ avcodec_encode_subtitle()

int avcodec_encode_subtitle ( AVCodecContext avctx,
uint8_t buf,
int  buf_size,
const AVSubtitle sub 
)