FFmpeg
Data Structures | Macros | Functions | Variables
pcmdec.c File Reference
#include "avformat.h"
#include "internal.h"
#include "pcm.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/avassert.h"

Go to the source code of this file.

Data Structures

struct  PCMAudioDemuxerContext
 

Macros

#define PCMDEF(name_, long_name_, ext, codec, ...)
 

Functions

static int pcm_read_header (AVFormatContext *s)
 
 PCMDEF (f64be, "PCM 64-bit floating-point big-endian", PCMDEF(NULL, AV_CODEC_ID_PCM_F64BE)
 

Variables

static const AVOption pcm_options []
 
static const AVClass sln_demuxer_class
 
AVInputFormat ff_sln_demuxer
 

Macro Definition Documentation

◆ PCMDEF

#define PCMDEF (   name_,
  long_name_,
  ext,
  codec,
  ... 
)
Value:
static const AVClass name_ ## _demuxer_class = { \
.class_name = #name_ " demuxer", \
.item_name = av_default_item_name, \
.option = pcm_options, \
.version = LIBAVUTIL_VERSION_INT, \
}; \
AVInputFormat ff_pcm_ ## name_ ## _demuxer = { \
.name = #name_, \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
.priv_data_size = sizeof(PCMAudioDemuxerContext), \
.extensions = ext, \
.raw_codec_id = codec, \
.priv_class = &name_ ## _demuxer_class, \
__VA_ARGS__ \
};

Definition at line 107 of file pcmdec.c.

Function Documentation

◆ pcm_read_header()

static int pcm_read_header ( AVFormatContext s)
static

Definition at line 35 of file pcmdec.c.

◆ PCMDEF()

PCMDEF ( f64be  ,
"PCM 64-bit floating-point big-endian"  ,
PCMDEF(  NULL,
AV_CODEC_ID_PCM_F64BE   
)

Definition at line 128 of file pcmdec.c.

Variable Documentation

◆ pcm_options

const AVOption pcm_options[]
static
Initial value:
= {
{ "sample_rate", "", 0x42, AV_OPT_TYPE_INT, {.i64 = 44100}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
{ "channels", "", 0x42, AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
{ NULL },
}

Definition at line 101 of file pcmdec.c.

◆ sln_demuxer_class

const AVClass sln_demuxer_class
static
Initial value:
= {
.class_name = "sln demuxer",
.item_name = av_default_item_name,
.option = sln_options,
}

Definition at line 197 of file pcmdec.c.

◆ ff_sln_demuxer

AVInputFormat ff_sln_demuxer
Initial value:
= {
.name = "sln",
.long_name = NULL_IF_CONFIG_SMALL("Asterisk raw pcm"),
.priv_data_size = sizeof(PCMAudioDemuxerContext),
.extensions = "sln",
.raw_codec_id = AV_CODEC_ID_PCM_S16LE,
.priv_class = &sln_demuxer_class,
}

Definition at line 204 of file pcmdec.c.

AV_CODEC_ID_PCM_S16LE
@ AV_CODEC_ID_PCM_S16LE
Definition: codec_id.h:301
read_seek
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:153
AVFMT_GENERIC_INDEX
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition: avformat.h:463
pcm_options
static const AVOption pcm_options[]
Definition: pcmdec.c:101
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:527
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:67
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:235
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:188
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:277
ff_pcm_read_packet
int ff_pcm_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: pcm.c:29
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
AVClass::class_name
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
Definition: log.h:72
ff_pcm_read_seek
int ff_pcm_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Definition: pcm.c:56
sln_demuxer_class
static const AVClass sln_demuxer_class
Definition: pcmdec.c:197
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
PCMAudioDemuxerContext
Definition: pcmdec.c:29
pcm_read_header
static int pcm_read_header(AVFormatContext *s)
Definition: pcmdec.c:35
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565