Libav
  • News
  • About
  • Download
  • Documentation
  • Bug Reports
  • FATE
  • Consulting
  • Contact
  • Legal
  • Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
Data Structures | Defines | Typedefs | Enumerations | Functions

Encoding
[Encoding/Decoding Library]

Data Structures

struct  RcOverride

Defines

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

Typedefs

typedef struct RcOverride RcOverride

Enumerations

enum  Motion_Est_ID {
  ME_ZERO = 1, ME_FULL, ME_LOG, ME_PHODS,
  ME_EPZS, ME_X1, ME_HEX, ME_UMH,
  ME_TESA
}
 

motion estimation type.

More...

Functions

AVCodec * avcodec_find_encoder (enum AVCodecID 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 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)

Define Documentation

#define FF_MIN_BUFFER_SIZE   16384

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

Definition at line 497 of file avcodec.h.


Typedef Documentation

typedef struct RcOverride RcOverride

Enumeration Type Documentation

enum Motion_Est_ID

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

Definition at line 504 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.
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.
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.

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.

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

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
int avcodec_encode_subtitle ( AVCodecContext *  avctx,
uint8_t *  buf,
int  buf_size,
const AVSubtitle *  sub 
)
Generated on Thu May 23 2013 06:05:38 for Libav by doxygen 1.7.1