FFmpeg
Data Structures | Enumerations | Functions | Variables
gif_parser.c File Reference
#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  GIFParseStates {
  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

◆ GIFParseStates

Enumerator
GIF_HEADER 
GIF_EXTENSION 
GIF_EXTENSION_BLOCK 
GIF_IMAGE 
GIF_IMAGE_BLOCK 

Definition at line 34 of file gif_parser.c.

Function Documentation

◆ gif_find_frame_end()

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

◆ 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

◆ ff_gif_parser

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,
}

Definition at line 183 of file gif_parser.c.

gif_parse
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
ff_parse_close
void ff_parse_close(AVCodecParserContext *s)
Definition: parser.c:315
GIFParseContext
Definition: gif_parser.c:42
AV_CODEC_ID_GIF
@ AV_CODEC_ID_GIF
Definition: avcodec.h:315