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

const 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 33 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 55 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 161 of file gif_parser.c.

Variable Documentation

◆ ff_gif_parser

const 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 182 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:161
ff_parse_close
void ff_parse_close(AVCodecParserContext *s)
Definition: parser.c:284
GIFParseContext
Definition: gif_parser.c:41
AV_CODEC_ID_GIF
@ AV_CODEC_ID_GIF
Definition: codec_id.h:149