FFmpeg  4.0
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 "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 (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
 
AVInputFormat ff_gsm_demuxer
 

Macro Definition Documentation

◆ GSM_BLOCK_SIZE

#define GSM_BLOCK_SIZE   33

Definition at line 28 of file gsmdec.c.

Referenced by gsm_init(), gsm_read_header(), and gsm_read_packet().

◆ GSM_BLOCK_SAMPLES

#define GSM_BLOCK_SAMPLES   160

Definition at line 29 of file gsmdec.c.

Referenced by gsm_read_header().

◆ GSM_SAMPLE_RATE

#define GSM_SAMPLE_RATE   8000

Definition at line 30 of file gsmdec.c.

Referenced by gsm_read_header().

Function Documentation

◆ gsm_probe()

static int gsm_probe ( AVProbeData p)
static

Definition at line 37 of file gsmdec.c.

◆ gsm_read_packet()

static int gsm_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 54 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 },
}
#define NULL
Definition: coverity.c:32
#define GSM_BLOCK_SIZE
Definition: gsmdec.c:28
#define GSM_SAMPLE_RATE
Definition: gsmdec.c:30
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
Definition: opt.h:277

Definition at line 93 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,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
static const AVOption options[]
Definition: gsmdec.c:93
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191

Definition at line 100 of file gsmdec.c.

◆ ff_gsm_demuxer

AVInputFormat ff_gsm_demuxer
Initial value:
= {
.name = "gsm",
.long_name = NULL_IF_CONFIG_SMALL("raw GSM"),
.priv_data_size = sizeof(GSMDemuxerContext),
.extensions = "gsm",
.raw_codec_id = AV_CODEC_ID_GSM,
.priv_class = &gsm_class,
}
static int flags
Definition: log.c:55
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVClass gsm_class
Definition: gsmdec.c:100
static int read_probe(AVProbeData *pd)
Definition: jvdec.c:55
static int gsm_probe(AVProbeData *p)
Definition: gsmdec.c:37
static int gsm_read_header(AVFormatContext *s)
Definition: gsmdec.c:74
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:530
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition: avformat.h:470
static int gsm_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: gsmdec.c:54
as in Berlin toast format
Definition: avcodec.h:569

Definition at line 107 of file gsmdec.c.