Data Structures | |
struct | RcOverride |
Defines | |
#define | FF_MIN_BUFFER_SIZE 16384 |
minimum encoding buffer size Used to avoid some checks during header writing. | |
Enumerations | |
enum | Motion_Est_ID { ME_ZERO = 1, ME_FULL, ME_LOG, ME_PHODS, ME_EPZS, ME_X1, ME_HEX, ME_UMH, ME_ITER, ME_TESA } |
motion estimation type. More... | |
Functions | |
AVCodec * | avcodec_find_encoder (enum CodecID id) |
Find a registered encoder with a matching codec ID. | |
AVCodec * | avcodec_find_encoder_by_name (const char *name) |
Find a registered encoder with the specified name. | |
int attribute_deprecated | avcodec_encode_audio (AVCodecContext *avctx, uint8_t *buf, int buf_size, const short *samples) |
Encode an audio frame from samples into buf. | |
int | avcodec_encode_audio2 (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) |
Encode a frame of audio. | |
attribute_deprecated int | avcodec_encode_video (AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVFrame *pict) |
int | avcodec_encode_video2 (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) |
Encode a frame of video. | |
int | avcodec_encode_subtitle (AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVSubtitle *sub) |
#define FF_MIN_BUFFER_SIZE 16384 |
minimum encoding buffer size Used to avoid some checks during header writing.
Definition at line 465 of file avcodec.h.
Referenced by avcodec_encode_video(), encode_frame(), encode_nals(), encode_picture_lossless(), encode_picture_ls(), flashsv2_encode_frame(), gif_encode_frame(), prores_encode_frame(), svq1_encode_frame(), and xvid_encode_frame().
enum Motion_Est_ID |
motion estimation type.
int attribute_deprecated avcodec_encode_audio | ( | AVCodecContext * | avctx, | |
uint8_t * | buf, | |||
int | buf_size, | |||
const short * | samples | |||
) |
Encode an audio frame from samples into buf.
avctx | the codec context | |
[out] | buf | the output buffer |
[in] | buf_size | the output buffer size |
[in] | samples | the input buffer containing the samples The number of samples read from this buffer is frame_size*channels, both of which are defined in avctx. For codecs which have avctx->frame_size equal to 0 (e.g. PCM) the number of samples read from samples is equal to: buf_size * 8 / (avctx->channels * av_get_bits_per_sample(avctx->codec_id)) This also implies that av_get_bits_per_sample() must not return 0 for these codecs. |
Definition at line 1172 of file utils.c.
Referenced by audio_encode_example().
int avcodec_encode_audio2 | ( | AVCodecContext * | avctx, | |
AVPacket * | avpkt, | |||
const AVFrame * | frame, | |||
int * | got_packet_ptr | |||
) |
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.
avctx | codec context | |
avpkt | output 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. |
[in] | frame | AVFrame containing the raw audio data to be encoded. May be NULL when flushing an encoder that has the CODEC_CAP_DELAY capability set. If 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_ptr | This 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. |
Definition at line 1050 of file utils.c.
Referenced by avcodec_encode_audio(), do_audio_out(), flush_encoders(), wrap(), and write_audio_frame().
int avcodec_encode_subtitle | ( | AVCodecContext * | avctx, | |
uint8_t * | buf, | |||
int | buf_size, | |||
const AVSubtitle * | sub | |||
) |
attribute_deprecated int avcodec_encode_video | ( | AVCodecContext * | avctx, | |
uint8_t * | buf, | |||
int | buf_size, | |||
const AVFrame * | pict | |||
) |
avctx | the codec context | |
[out] | buf | the output buffer for the bitstream of encoded frame |
[in] | buf_size | the size of the output buffer in bytes |
[in] | pict | the input picture to encode |
Definition at line 1249 of file utils.c.
Referenced by estimate_best_b_count(), filter(), video_encode_example(), wrap(), and write_video_frame().
int avcodec_encode_video2 | ( | AVCodecContext * | avctx, | |
AVPacket * | avpkt, | |||
const AVFrame * | frame, | |||
int * | got_packet_ptr | |||
) |
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.
avctx | codec context | |
avpkt | output 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. |
[in] | frame | AVFrame containing the raw video data to be encoded. May be NULL when flushing an encoder that has the CODEC_CAP_DELAY capability set. |
[out] | got_packet_ptr | This 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. |
Definition at line 1283 of file utils.c.
Referenced by avcodec_encode_video(), do_video_out(), and flush_encoders().
Find a registered encoder with a matching codec ID.
id | CodecID of the requested encoder |
Definition at line 1692 of file utils.c.
Referenced by add_audio_stream(), add_video_stream(), asf_write_header1(), assert_codec_experimental(), audio_encode_example(), avcodec_get_name(), avcodec_get_type(), avcodec_string(), choose_encoder(), compute_status(), config(), estimate_best_b_count(), ffserver_opt_preset(), list_formats(), read_ffserver_streams(), transcode_init(), and video_encode_example().
AVCodec* avcodec_find_encoder_by_name | ( | const char * | name | ) |
Find a registered encoder with the specified name.
name | name of the requested encoder |
Definition at line 1709 of file utils.c.
Referenced by find_codec_or_die(), opt_audio_codec(), and opt_video_codec().