libavcodec/parser.c File Reference

#include "parser.h"

Go to the source code of this file.

Functions

AVCodecParserav_parser_next (AVCodecParser *p)
void av_register_codec_parser (AVCodecParser *parser)
AVCodecParserContextav_parser_init (int codec_id)
int av_parser_parse (AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int64_t pts, int64_t dts)
int av_parser_change (AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe)
void av_parser_close (AVCodecParserContext *s)
int ff_combine_frame (ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
 combines the (truncated) bitstream to a complete frame
void ff_parse_close (AVCodecParserContext *s)
void ff_parse1_close (AVCodecParserContext *s)
int ff_mpeg4video_split (AVCodecContext *avctx, const uint8_t *buf, int buf_size)

Variables

AVCodecParserav_first_parser = NULL


Function Documentation

int av_parser_change ( AVCodecParserContext s,
AVCodecContext avctx,
uint8_t **  poutbuf,
int *  poutbuf_size,
const uint8_t buf,
int  buf_size,
int  keyframe 
)

Returns:
0 if the output buffer is a subset of the input, 1 if it is allocated and must be freed
Deprecated:
use AVBitstreamFilter

Definition at line 182 of file parser.c.

Referenced by output_packet().

void av_parser_close ( AVCodecParserContext s  ) 

AVCodecParserContext* av_parser_init ( int  codec_id  ) 

Definition at line 38 of file parser.c.

Referenced by av_find_stream_info(), av_read_frame_internal(), and remove_extradata().

AVCodecParser* av_parser_next ( AVCodecParser p  ) 

Definition at line 27 of file parser.c.

int av_parser_parse ( AVCodecParserContext s,
AVCodecContext avctx,
uint8_t **  poutbuf,
int *  poutbuf_size,
const uint8_t buf,
int  buf_size,
int64_t  pts,
int64_t  dts 
)

Parameters:
buf input
buf_size input length, to signal EOF, this should be 0 (so that the last frame can be output)
pts input presentation timestamp
dts input decoding timestamp
poutbuf will contain a pointer to the first byte of the output frame
poutbuf_size will contain the length of the output frame
Returns:
the number of bytes of the input bitstream used
Example:
   while(in_len){
       len = av_parser_parse(myparser, AVCodecContext, &data, &size,
                                       in_data, in_len,
                                       pts, dts);
       in_data += len;
       in_len  -= len;

       if(size)
          decode_frame(data, size);
   }

Definition at line 103 of file parser.c.

Referenced by av_read_frame_internal().

void av_register_codec_parser ( AVCodecParser parser  ) 

Definition at line 32 of file parser.c.

int ff_combine_frame ( ParseContext pc,
int  next,
const uint8_t **  buf,
int *  buf_size 
)

combines the (truncated) bitstream to a complete frame

Returns:
-1 if no complete frame could be created

Definition at line 229 of file parser.c.

Referenced by cavsvideo_parse(), dca_parse(), decode_frame(), ff_h263_decode_frame(), h261_parse(), h263_parse(), h264_parse(), jpeg_parse(), mlp_parse(), mpeg4video_parse(), mpeg_decode_frame(), mpegvideo_parse(), pnm_parse(), and vc1_parse().

int ff_mpeg4video_split ( AVCodecContext avctx,
const uint8_t buf,
int  buf_size 
)

Definition at line 304 of file parser.c.

void ff_parse1_close ( AVCodecParserContext s  ) 

Definition at line 294 of file parser.c.

void ff_parse_close ( AVCodecParserContext s  ) 

Definition at line 287 of file parser.c.


Variable Documentation

Definition at line 25 of file parser.c.


Generated on Sat Sep 6 21:24:39 2008 for ffmpeg by  doxygen 1.5.6