FFmpeg
Data Structures | Macros | Functions | Variables
gsmdec.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "avformat.h"
#include "demux.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  GSMDemuxerContext
 

Macros

#define GSM_BLOCK_SIZE   33
 
#define GSM_BLOCK_SAMPLES   160
 
#define GSM_SAMPLE_RATE   8000
 

Functions

static int gsm_probe (const AVProbeData *p)
 
static int gsm_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int gsm_read_header (AVFormatContext *s)
 

Variables

static const AVOption options []
 
static const AVClass gsm_class
 
const FFInputFormat ff_gsm_demuxer
 

Macro Definition Documentation

◆ GSM_BLOCK_SIZE

#define GSM_BLOCK_SIZE   33

Definition at line 29 of file gsmdec.c.

◆ GSM_BLOCK_SAMPLES

#define GSM_BLOCK_SAMPLES   160

Definition at line 30 of file gsmdec.c.

◆ GSM_SAMPLE_RATE

#define GSM_SAMPLE_RATE   8000

Definition at line 31 of file gsmdec.c.

Function Documentation

◆ gsm_probe()

static int gsm_probe ( const AVProbeData p)
static

Definition at line 38 of file gsmdec.c.

◆ gsm_read_packet()

static int gsm_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 55 of file gsmdec.c.

◆ gsm_read_header()

static int gsm_read_header ( AVFormatContext s)
static

Definition at line 74 of file gsmdec.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "sample_rate", "", 0x42,
{ NULL },
}

Definition at line 92 of file gsmdec.c.

◆ gsm_class

const AVClass gsm_class
static
Initial value:
= {
.class_name = "gsm demuxer",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 99 of file gsmdec.c.

◆ ff_gsm_demuxer

const FFInputFormat ff_gsm_demuxer
Initial value:
= {
.p.name = "gsm",
.p.long_name = NULL_IF_CONFIG_SMALL("raw GSM"),
.p.flags = AVFMT_GENERIC_INDEX,
.p.extensions = "gsm",
.p.priv_class = &gsm_class,
.priv_data_size = sizeof(GSMDemuxerContext),
.raw_codec_id = AV_CODEC_ID_GSM,
}

Definition at line 106 of file gsmdec.c.

options
static const AVOption options[]
Definition: gsmdec.c:92
AVFMT_GENERIC_INDEX
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition: avformat.h:480
GSM_BLOCK_SIZE
#define GSM_BLOCK_SIZE
Definition: gsmdec.c:29
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_read_callback.c:41
gsm_class
static const AVClass gsm_class
Definition: gsmdec.c:99
gsm_probe
static int gsm_probe(const AVProbeData *p)
Definition: gsmdec.c:38
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:550
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
AV_CODEC_ID_GSM
@ AV_CODEC_ID_GSM
as in Berlin toast format
Definition: codec_id.h:458
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:106
GSM_SAMPLE_RATE
#define GSM_SAMPLE_RATE
Definition: gsmdec.c:31
gsm_read_header
static int gsm_read_header(AVFormatContext *s)
Definition: gsmdec.c:74
GSMDemuxerContext
Definition: gsmdec.c:33
gsm_read_packet
static int gsm_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: gsmdec.c:55
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:235
AV_OPT_FLAG_DECODING_PARAM
#define AV_OPT_FLAG_DECODING_PARAM
A generic parameter which can be set by the user for demuxing or decoding.
Definition: opt.h:273
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:30