FFmpeg
Data Structures | Enumerations | Functions | Variables
gif_parser.c File Reference

GIF parser. More...

#include "libavutil/avassert.h"
#include "libavutil/bswap.h"
#include "libavutil/common.h"
#include "gif.h"
#include "parser.h"

Go to the source code of this file.

Data Structures

struct  GIFParseContext
 

Enumerations

enum  gif_states {
  GIF_HEADER = 1, GIF_EXTENSION, GIF_EXTENSION_BLOCK, GIF_IMAGE,
  GIF_IMAGE_BLOCK
}
 

Functions

static int gif_find_frame_end (GIFParseContext *g, const uint8_t *buf, int buf_size, void *logctx)
 
static int gif_parse (AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
 

Variables

AVCodecParser ff_gif_parser
 

Detailed Description

GIF parser.

Definition in file gif_parser.c.

Enumeration Type Documentation

enum gif_states
Enumerator
GIF_HEADER 
GIF_EXTENSION 
GIF_EXTENSION_BLOCK 
GIF_IMAGE 
GIF_IMAGE_BLOCK 

Definition at line 34 of file gif_parser.c.

Function Documentation

static int gif_find_frame_end ( GIFParseContext g,
const uint8_t buf,
int  buf_size,
void logctx 
)
static

Definition at line 56 of file gif_parser.c.

Referenced by gif_parse().

static int gif_parse ( AVCodecParserContext s,
AVCodecContext avctx,
const uint8_t **  poutbuf,
int poutbuf_size,
const uint8_t buf,
int  buf_size 
)
static

Definition at line 162 of file gif_parser.c.

Variable Documentation

AVCodecParser ff_gif_parser
Initial value:
= {
.codec_ids = { AV_CODEC_ID_GIF },
.priv_data_size = sizeof(GIFParseContext),
.parser_parse = gif_parse,
.parser_close = ff_parse_close,
}
void ff_parse_close(AVCodecParserContext *s)
Definition: parser.c:319
static int gif_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition: gif_parser.c:162

Definition at line 183 of file gif_parser.c.