FFmpeg
[フレーム]
Data Structures | Macros | Enumerations | Functions
Encoding
Encoding/Decoding Library

Data Structures

struct   RcOverride
 

Macros

#define  FF_MIN_BUFFER_SIZE   16384
  minimum encoding buffer size Used to avoid some checks during header writing.
 

Enumerations

  motion estimation type. More...
 

Functions

  Find a registered encoder with a matching codec ID.
 
  Find a registered encoder with the specified name.
 
int  avcodec_encode_audio2 (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
  Encode a frame of audio.
 
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)
 

Detailed Description

Macro Definition Documentation

#define FF_MIN_BUFFER_SIZE   16384

minimum encoding buffer size Used to avoid some checks during header writing.

Definition at line 587 of file avcodec.h.

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

Enumeration Type Documentation

motion estimation type.

Enumerator:
ME_ZERO

no search, that is use 0,0 vector whenever one is needed

ME_FULL
ME_LOG
ME_PHODS
ME_EPZS

enhanced predictive zonal search

ME_X1

reserved for experiments

ME_HEX

hexagon based search

ME_UMH

uneven multi-hexagon search

ME_TESA

transformed exhaustive search algorithm

ME_ITER

iterative search

Definition at line 594 of file avcodec.h.

Function Documentation

AVCodec* avcodec_find_encoder ( enum AVCodecID  id )

Find a registered encoder with a matching codec ID.

Parameters
id AVCodecID of the requested encoder
Returns
An encoder if one was found, NULL otherwise.
Examples:
doc/examples/decoding_encoding.c, and doc/examples/muxing.c.

Definition at line 2601 of file utils.c.

Referenced by add_stream(), asf_write_header1(), audio_encode_example(), avcodec_get_name(), avcodec_get_type(), avcodec_open2(), avcodec_string(), choose_encoder(), compute_status(), config(), config_props(), estimate_best_b_count(), ffserver_opt_preset(), filter_codec_opts(), find_codec_or_die(), read_ffserver_streams(), show_codecs(), transcode_init(), and video_encode_example().

AVCodec* avcodec_find_encoder_by_name ( const char *  name )

Find a registered encoder with the specified name.

Parameters
name name of the requested encoder
Returns
An encoder if one was found, NULL otherwise.

Definition at line 2606 of file utils.c.

Referenced by find_codec_or_die(), opt_audio_codec(), opt_video_codec(), and show_help_codec().

int avcodec_encode_audio2 ( AVCodecContextavctx,
AVPacketavpkt,
const AVFrameframe,
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.

Parameters
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. 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_free_packet() (i.e. avpkt->destruct will be called to free the user supplied buffer).

Parameters
[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.
Returns
0 on success, negative error code on failure
Examples:
doc/examples/decoding_encoding.c, and doc/examples/muxing.c.

Definition at line 1590 of file utils.c.

Referenced by audio_encode_example(), do_audio_out(), flush_encoders(), wrap(), and write_audio_frame().

int avcodec_encode_video2 ( AVCodecContextavctx,
AVPacketavpkt,
const AVFrameframe,
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.

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

If this function fails or produces no output, avpkt will be freed using av_free_packet() (i.e. avpkt->destruct will be called to free the user supplied buffer).

Parameters
[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.
Returns
0 on success, negative error code on failure
Examples:
doc/examples/decoding_encoding.c, and doc/examples/muxing.c.

Definition at line 1833 of file utils.c.

Referenced by do_video_out(), encode_frame(), filter_frame(), flush_encoders(), video_encode_example(), worker(), wrap(), and write_video_frame().

int avcodec_encode_subtitle ( AVCodecContextavctx,
uint8_tbuf,
int  buf_size,
const AVSubtitlesub 
)

Definition at line 1910 of file utils.c.

Referenced by do_subtitle_out(), and wrap().


Generated on Sat Jan 25 2014 19:52:23 for FFmpeg by   doxygen 1.8.2

AltStyle によって変換されたページ (->オリジナル) /