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 "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 AVInputFormat ff_gsm_demuxer
 

Macro Definition Documentation

◆ GSM_BLOCK_SIZE

#define GSM_BLOCK_SIZE   33

Definition at line 28 of file gsmdec.c.

◆ GSM_BLOCK_SAMPLES

#define GSM_BLOCK_SAMPLES   160

Definition at line 29 of file gsmdec.c.

◆ GSM_SAMPLE_RATE

#define GSM_SAMPLE_RATE   8000

Definition at line 30 of file gsmdec.c.

Function Documentation

◆ gsm_probe()

static int gsm_probe ( const 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 73 of file gsmdec.c.

Variable Documentation

◆ options

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

Definition at line 91 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 98 of file gsmdec.c.

◆ ff_gsm_demuxer

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

Definition at line 105 of file gsmdec.c.

options
static const AVOption options[]
Definition: gsmdec.c:91
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:28
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:98
gsm_probe
static int gsm_probe(const AVProbeData *p)
Definition: gsmdec.c:37
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:545
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:456
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:115
GSM_SAMPLE_RATE
#define GSM_SAMPLE_RATE
Definition: gsmdec.c:30
gsm_read_header
static int gsm_read_header(AVFormatContext *s)
Definition: gsmdec.c:73
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:282
GSMDemuxerContext
Definition: gsmdec.c:32
gsm_read_packet
static int gsm_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: gsmdec.c:54
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:29
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561